class DwarfFile

Declaration

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

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:49

Member Variables

private llvm::AsmPrinter* Asm
private llvm::BumpPtrAllocator AbbrevAllocator
private llvm::DIEAbbrevSet Abbrevs
private SmallVector<std::unique_ptr<DwarfCompileUnit>, 1> CUs
private llvm::DwarfStringPool StrPool
private SmallVector<llvm::RangeSpanList, 1> CURangeLists
private llvm::MCSymbol* StringOffsetsStartSym = nullptr
DWARF v5: The symbol that designates the start of the contribution to the string offsets table. The contribution is shared by all units.
private llvm::MCSymbol* RnglistsTableBaseSym = nullptr
DWARF v5: The symbol that designates the base of the range list table. The table is shared by all units.
private DenseMap<llvm::LexicalScope*, llvm::DwarfFile::ScopeVars> ScopeVariables
Collection of DbgVariables of each lexical scope.
private DenseMap<llvm::LexicalScope*, llvm::DwarfFile::LabelList> ScopeLabels
private DenseMap<const llvm::MDNode*, llvm::DIE*> AbstractSPDies
private DenseMap<const llvm::DINode*, std::unique_ptr<DbgEntity>> AbstractEntities
private DenseMap<const llvm::MDNode*, llvm::DIE*> DITypeNodeToDieMap
Maps MDNodes for type system with the corresponding DIEs. These DIEs can be shared across CUs, that is why we keep the map here instead of in DwarfCompileUnit.

Method Overview

Methods

DwarfFile(llvm::AsmPrinter* AP,
          llvm::StringRef Pref,
          llvm::BumpPtrAllocator& DA)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:99

Parameters

llvm::AsmPrinter* AP
llvm::StringRef Pref
llvm::BumpPtrAllocator& DA

std::pair<uint32_t, RangeSpanList*> addRange(
    const llvm::DwarfCompileUnit& CU,
    SmallVector<llvm::RangeSpan, 2> R)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:105

Parameters

const llvm::DwarfCompileUnit& CU
SmallVector<llvm::RangeSpan, 2> R

void addScopeLabel(llvm::LexicalScope* LS,
                   llvm::DbgLabel* Label)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:155

Parameters

llvm::LexicalScope* LS
llvm::DbgLabel* Label

bool addScopeVariable(llvm::LexicalScope* LS,
                      llvm::DbgVariable* Var)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:153

Parameters

llvm::LexicalScope* LS
llvm::DbgVariable* Var

Returns

false if the variable was merged with a previous one.

void addUnit(std::unique_ptr<DwarfCompileUnit> U)

Description

Add a unit to the list of CUs.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:124

Parameters

std::unique_ptr<DwarfCompileUnit> U

unsigned int computeSizeAndOffset(
    llvm::DIE& Die,
    unsigned int Offset)

Description

Compute the size and offset of a DIE given an incoming Offset.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:114

Parameters

llvm::DIE& Die
unsigned int Offset

void computeSizeAndOffsets()

Description

Compute the size and offset of all the DIEs.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:117

unsigned int computeSizeAndOffsetsForUnit(
    llvm::DwarfUnit* TheU)

Description

Compute the size and offset of all the DIEs in the given unit.

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

Parameters

llvm::DwarfUnit* TheU

Returns

The size of the root DIE.

void emitAbbrevs(llvm::MCSection*)

Description

Emit a set of abbreviations to the specific section.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:134

Parameters

llvm::MCSection*

void emitStrings(
    llvm::MCSection* StrSection,
    llvm::MCSection* OffsetSection = nullptr,
    bool UseRelativeOffsets = false)

Description

Emit all of the strings to the section given. If OffsetSection is non-null, emit a table of string offsets to it. If UseRelativeOffsets is false, emit absolute offsets to the strings. Otherwise, emit relocatable references to the strings if they are supported by the target.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:140

Parameters

llvm::MCSection* StrSection
llvm::MCSection* OffsetSection = nullptr
bool UseRelativeOffsets = false

void emitUnit(llvm::DwarfUnit* TheU,
              bool UseOffsets)

Description

Emit the given unit to its section.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:131

Parameters

llvm::DwarfUnit* TheU
bool UseOffsets

void emitUnits(bool UseOffsets)

Description

Emit all of the units to the section listed with the given abbreviation section.

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

Parameters

bool UseOffsets

DenseMap<const llvm::DINode*,
         std::unique_ptr<DbgEntity>>&
getAbstractEntities()

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:169

DenseMap<const llvm::MDNode*, llvm::DIE*>&
getAbstractSPDies()

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:165

llvm::DIE* getDIE(const llvm::MDNode* TypeMD)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:177

Parameters

const llvm::MDNode* TypeMD

const SmallVectorImpl<llvm::RangeSpanList>&
getRangeLists() const

Description

getRangeLists - Get the vector of range lists.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:109

llvm::MCSymbol* getRnglistsTableBaseSym() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:149

DenseMap<llvm::LexicalScope*,
         llvm::DwarfFile::LabelList>&
getScopeLabels()

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:161

DenseMap<llvm::LexicalScope*,
         llvm::DwarfFile::ScopeVars>&
getScopeVariables()

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:157

llvm::MCSymbol* getStringOffsetsStartSym() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:146

llvm::DwarfStringPool& getStringPool()

Description

Returns the string pool.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:144

const SmallVectorImpl<
    std::unique_ptr<DwarfCompileUnit>>&
getUnits()

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:101

void insertDIE(const llvm::MDNode* TypeMD,
               llvm::DIE* Die)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:173

Parameters

const llvm::MDNode* TypeMD
llvm::DIE* Die

void setRnglistsTableBaseSym(llvm::MCSymbol* Sym)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:150

Parameters

llvm::MCSymbol* Sym

void setStringOffsetsStartSym(llvm::MCSymbol* Sym)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:147

Parameters

llvm::MCSymbol* Sym