LLVM  8.0.0svn
Classes | Public Member Functions | List of all members
llvm::DwarfFile Class Reference

#include "CodeGen/AsmPrinter/DwarfFile.h"

Public Member Functions

 DwarfFile (AsmPrinter *AP, StringRef Pref, BumpPtrAllocator &DA)
 
const SmallVectorImpl< std::unique_ptr< DwarfCompileUnit > > & getUnits ()
 
unsigned computeSizeAndOffset (DIE &Die, unsigned Offset)
 Compute the size and offset of a DIE given an incoming Offset. More...
 
void computeSizeAndOffsets ()
 Compute the size and offset of all the DIEs. More...
 
unsigned computeSizeAndOffsetsForUnit (DwarfUnit *TheU)
 Compute the size and offset of all the DIEs in the given unit. More...
 
void addUnit (std::unique_ptr< DwarfCompileUnit > U)
 Add a unit to the list of CUs. More...
 
void emitUnits (bool UseOffsets)
 Emit all of the units to the section listed with the given abbreviation section. More...
 
void emitUnit (DwarfUnit *U, bool UseOffsets)
 Emit the given unit to its section. More...
 
void emitAbbrevs (MCSection *)
 Emit a set of abbreviations to the specific section. More...
 
void emitStrings (MCSection *StrSection, MCSection *OffsetSection=nullptr, bool UseRelativeOffsets=false)
 Emit all of the strings to the section given. More...
 
DwarfStringPoolgetStringPool ()
 Returns the string pool. More...
 
MCSymbolgetStringOffsetsStartSym () const
 
void setStringOffsetsStartSym (MCSymbol *Sym)
 
MCSymbolgetRnglistsTableBaseSym () const
 
void setRnglistsTableBaseSym (MCSymbol *Sym)
 
bool addScopeVariable (LexicalScope *LS, DbgVariable *Var)
 
void addScopeLabel (LexicalScope *LS, DbgLabel *Label)
 
DenseMap< LexicalScope *, ScopeVars > & getScopeVariables ()
 
DenseMap< LexicalScope *, LabelList > & getScopeLabels ()
 
DenseMap< const MDNode *, DIE * > & getAbstractSPDies ()
 
DenseMap< const DINode *, std::unique_ptr< DbgEntity > > & getAbstractEntities ()
 
void insertDIE (const MDNode *TypeMD, DIE *Die)
 
DIEgetDIE (const MDNode *TypeMD)
 

Detailed Description

Definition at line 35 of file DwarfFile.h.

Constructor & Destructor Documentation

◆ DwarfFile()

DwarfFile::DwarfFile ( AsmPrinter AP,
StringRef  Pref,
BumpPtrAllocator DA 
)

Definition at line 24 of file DwarfFile.cpp.

Member Function Documentation

◆ addScopeLabel()

void DwarfFile::addScopeLabel ( LexicalScope LS,
DbgLabel Label 
)

◆ addScopeVariable()

bool DwarfFile::addScopeVariable ( LexicalScope LS,
DbgVariable Var 
)

◆ addUnit()

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

Add a unit to the list of CUs.

Definition at line 27 of file DwarfFile.cpp.

Referenced by getUnits(), and llvm::DwarfDebug::shareAcrossDWOCUs().

◆ computeSizeAndOffset()

unsigned DwarfFile::computeSizeAndOffset ( DIE Die,
unsigned  Offset 
)

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

Definition at line 79 of file DwarfFile.cpp.

References llvm::DIE::computeOffsetsAndAbbrevs().

Referenced by computeSizeAndOffsetsForUnit(), and getUnits().

◆ computeSizeAndOffsets()

void DwarfFile::computeSizeAndOffsets ( )

Compute the size and offset of all the DIEs.

Definition at line 52 of file DwarfFile.cpp.

References computeSizeAndOffsetsForUnit().

Referenced by llvm::DwarfDebug::beginModule(), and getUnits().

◆ computeSizeAndOffsetsForUnit()

unsigned DwarfFile::computeSizeAndOffsetsForUnit ( DwarfUnit TheU)

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

Returns
The size of the root DIE.

Definition at line 67 of file DwarfFile.cpp.

References computeSizeAndOffset(), llvm::DwarfUnit::getHeaderSize(), and llvm::DIEUnit::getUnitDie().

Referenced by computeSizeAndOffsets(), and getUnits().

◆ emitAbbrevs()

void DwarfFile::emitAbbrevs ( MCSection Section)

Emit a set of abbreviations to the specific section.

Definition at line 83 of file DwarfFile.cpp.

References llvm::DIEAbbrevSet::Emit().

Referenced by llvm::DwarfDebug::endFunctionImpl(), and getUnits().

◆ emitStrings()

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

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.

Definition at line 86 of file DwarfFile.cpp.

References llvm::DwarfStringPool::emit().

Referenced by computeIndexValue(), and getUnits().

◆ emitUnit()

void DwarfFile::emitUnit ( DwarfUnit U,
bool  UseOffsets 
)

◆ emitUnits()

void DwarfFile::emitUnits ( bool  UseOffsets)

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

Definition at line 33 of file DwarfFile.cpp.

References emitUnit().

Referenced by llvm::DwarfDebug::endFunctionImpl(), and getUnits().

◆ getAbstractEntities()

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

Definition at line 145 of file DwarfFile.h.

◆ getAbstractSPDies()

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

◆ getDIE()

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

◆ getRnglistsTableBaseSym()

MCSymbol* llvm::DwarfFile::getRnglistsTableBaseSym ( ) const
inline

Definition at line 124 of file DwarfFile.h.

Referenced by llvm::DwarfUnit::addRnglistsBase(), and emitRnglistsTableHeader().

◆ getScopeLabels()

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

◆ getScopeVariables()

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

◆ getStringOffsetsStartSym()

MCSymbol* llvm::DwarfFile::getStringOffsetsStartSym ( ) const
inline

◆ getStringPool()

DwarfStringPool& llvm::DwarfFile::getStringPool ( )
inline

Returns the string pool.

Definition at line 118 of file DwarfFile.h.

Referenced by llvm::DwarfDebug::addDwarfTypeUnitType(), llvm::DwarfUnit::addString(), and llvm::DwarfDebug::endFunctionImpl().

◆ getUnits()

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

◆ insertDIE()

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

◆ setRnglistsTableBaseSym()

void llvm::DwarfFile::setRnglistsTableBaseSym ( MCSymbol Sym)
inline

Definition at line 126 of file DwarfFile.h.

References addScopeLabel(), addScopeVariable(), and llvm::AArch64CC::LS.

◆ setStringOffsetsStartSym()

void llvm::DwarfFile::setStringOffsetsStartSym ( MCSymbol Sym)
inline

Definition at line 122 of file DwarfFile.h.


The documentation for this class was generated from the following files: