class DebugLocStream

Declaration

class DebugLocStream { /* full declaration omitted */ };

Description

Byte stream of .debug_loc entries. Stores a unified stream of .debug_loc entries. There's \a List for each variable/inlined-at pair, and an \a Entry for each \a DebugLocEntry. FIXME: Do we need all these temp symbols? FIXME: Why not output directly to the output stream?

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:31

Member Variables

private SmallVector<llvm::DebugLocStream::List, 4> Lists
private SmallVector<llvm::DebugLocStream::Entry, 32> Entries
private SmallString<256> DWARFBytes
private std::vector<std::string> Comments
private llvm::MCSymbol* Sym
private bool GenerateComments
Only verbose textual output needs comments. This will be set to true for that case, and false otherwise.

Method Overview

  • public DebugLocStream(bool GenerateComments)
  • private void finalizeEntry()
  • private bool finalizeList(llvm::AsmPrinter & Asm)
  • public ArrayRef<char> getBytes(const llvm::DebugLocStream::Entry & E) const
  • public ArrayRef<std::string> getComments(const llvm::DebugLocStream::Entry & E) const
  • public ArrayRef<llvm::DebugLocStream::Entry> getEntries(const llvm::DebugLocStream::List & L) const
  • private size_t getIndex(const llvm::DebugLocStream::Entry & E) const
  • private size_t getIndex(const llvm::DebugLocStream::List & L) const
  • public const llvm::DebugLocStream::List & getList(size_t LI) const
  • public ArrayRef<llvm::DebugLocStream::List> getLists() const
  • private size_t getNumBytes(size_t EI) const
  • private size_t getNumComments(size_t EI) const
  • private size_t getNumEntries(size_t LI) const
  • public size_t getNumLists() const
  • public llvm::BufferByteStreamer getStreamer()
  • public llvm::MCSymbol * getSym() const
  • public void setSym(llvm::MCSymbol * Sym)
  • private void startEntry(const llvm::MCSymbol * BeginSym, const llvm::MCSymbol * EndSym)
  • private size_t startList(llvm::DwarfCompileUnit * CU)

Methods

DebugLocStream(bool GenerateComments)

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:59

Parameters

bool GenerateComments

void finalizeEntry()

Description

Finalize a .debug_loc entry, deleting if it's empty.

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:103

bool finalizeList(llvm::AsmPrinter& Asm)

Description

Finalize a .debug_loc entry list. If there are no entries in this list, delete it outright. Otherwise, create a label with \a Asm.

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:92

Parameters

llvm::AsmPrinter& Asm

Returns

false iff the list is deleted.

ArrayRef<char> getBytes(
    const llvm::DebugLocStream::Entry& E) const

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:116

Parameters

const llvm::DebugLocStream::Entry& E

ArrayRef<std::string> getComments(
    const llvm::DebugLocStream::Entry& E) const

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:121

Parameters

const llvm::DebugLocStream::Entry& E

ArrayRef<llvm::DebugLocStream::Entry> getEntries(
    const llvm::DebugLocStream::List& L) const

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:110

Parameters

const llvm::DebugLocStream::List& L

size_t getIndex(
    const llvm::DebugLocStream::Entry& E) const

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:133

Parameters

const llvm::DebugLocStream::Entry& E

size_t getIndex(
    const llvm::DebugLocStream::List& L) const

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:128

Parameters

const llvm::DebugLocStream::List& L

const llvm::DebugLocStream::List& getList(
    size_t LI) const

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:61

Parameters

size_t LI

ArrayRef<llvm::DebugLocStream::List> getLists()
    const

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:62

size_t getNumBytes(size_t EI) const

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:143

Parameters

size_t EI

size_t getNumComments(size_t EI) const

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:148

Parameters

size_t EI

size_t getNumEntries(size_t LI) const

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:138

Parameters

size_t LI

size_t getNumLists() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:60

llvm::BufferByteStreamer getStreamer()

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:106

llvm::MCSymbol* getSym() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:63

void setSym(llvm::MCSymbol* Sym)

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:66

Parameters

llvm::MCSymbol* Sym

void startEntry(const llvm::MCSymbol* BeginSym,
                const llvm::MCSymbol* EndSym)

Description

Start a new .debug_loc entry. Until the next call, bytes added to the stream will be added to this entry.

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:98

Parameters

const llvm::MCSymbol* BeginSym
const llvm::MCSymbol* EndSym

size_t startList(llvm::DwarfCompileUnit* CU)

Description

Start a new .debug_loc entry list. Start a new .debug_loc entry list. Return the new list's index so it can be retrieved later via \a getList(). Until the next call, \a startEntry() will add entries to this list.

Declared at: llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h:80

Parameters

llvm::DwarfCompileUnit* CU