LLVM 20.0.0git
|
This dwarf writer support class manages information associated with a source file. More...
#include "CodeGen/AsmPrinter/DwarfUnit.h"
Public Member Functions | |
unsigned | getUniqueID () const |
Gets Unique ID for this unit. | |
AsmPrinter * | getAsmPrinter () const |
MCSymbol * | getLabelBegin () const |
Get the the symbol for start of the section for this unit. | |
MCSymbol * | getEndLabel () const |
uint16_t | getLanguage () const |
const DICompileUnit * | getCUNode () const |
DwarfDebug & | getDwarfDebug () const |
bool | hasContent () const |
Return true if this compile unit has something to write out. | |
std::string | getParentContextString (const DIScope *Context) const |
Get string containing language specific context for a global name. | |
virtual void | addGlobalName (StringRef Name, const DIE &Die, const DIScope *Context)=0 |
Add a new global name to the compile unit. | |
virtual void | addGlobalTypeImpl (const DIType *Ty, const DIE &Die, const DIScope *Context)=0 |
Add a new global type to the compile unit. | |
void | addGlobalType (const DIType *Ty, const DIE &Die, const DIScope *Context) |
DIE * | getDIE (const DINode *D) const |
Returns the DIE map slot for the specified debug variable. | |
DIELoc * | getDIELoc () |
Returns a fresh newly allocated DIELoc. | |
void | insertDIE (const DINode *Desc, DIE *D) |
Insert DIE into the map. | |
void | insertDIE (DIE *D) |
void | addFlag (DIE &Die, dwarf::Attribute Attribute) |
Add a flag that is true to the DIE. | |
void | addUInt (DIEValueList &Die, dwarf::Attribute Attribute, std::optional< dwarf::Form > Form, uint64_t Integer) |
Add an unsigned integer attribute data and value. | |
void | addUInt (DIEValueList &Block, dwarf::Form Form, uint64_t Integer) |
void | addSInt (DIEValueList &Die, dwarf::Attribute Attribute, std::optional< dwarf::Form > Form, int64_t Integer) |
Add an signed integer attribute data and value. | |
void | addSInt (DIELoc &Die, std::optional< dwarf::Form > Form, int64_t Integer) |
void | addString (DIE &Die, dwarf::Attribute Attribute, StringRef Str) |
Add a string attribute data and value. | |
void | addLabel (DIEValueList &Die, dwarf::Attribute Attribute, dwarf::Form Form, const MCSymbol *Label) |
Add a Dwarf label attribute data and value. | |
void | addLabel (DIELoc &Die, dwarf::Form Form, const MCSymbol *Label) |
void | addSectionOffset (DIE &Die, dwarf::Attribute Attribute, uint64_t Integer) |
Add an offset into a section attribute data and value. | |
void | addOpAddress (DIELoc &Die, const MCSymbol *Sym) |
Add a dwarf op address data and value using the form given and an op of either DW_FORM_addr or DW_FORM_GNU_addr_index. | |
void | addPoolOpAddress (DIEValueList &Die, const MCSymbol *Label) |
void | addLabelDelta (DIEValueList &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, const MCSymbol *Lo) |
Add a label delta attribute data and value. | |
void | addDIEEntry (DIE &Die, dwarf::Attribute Attribute, DIE &Entry) |
Add a DIE attribute data and value. | |
void | addDIEEntry (DIE &Die, dwarf::Attribute Attribute, DIEEntry Entry) |
Add a DIE attribute data and value. | |
void | addDIETypeSignature (DIE &Die, uint64_t Signature) |
Add a type's DW_AT_signature and set the declaration flag. | |
void | addBlock (DIE &Die, dwarf::Attribute Attribute, DIELoc *Loc) |
Add block data. | |
void | addBlock (DIE &Die, dwarf::Attribute Attribute, DIEBlock *Block) |
Add block data. | |
void | addBlock (DIE &Die, dwarf::Attribute Attribute, dwarf::Form Form, DIEBlock *Block) |
void | addSourceLine (DIE &Die, unsigned Line, const DIFile *File) |
Add location information to specified debug information entry. | |
void | addSourceLine (DIE &Die, const DILocalVariable *V) |
void | addSourceLine (DIE &Die, const DIGlobalVariable *G) |
void | addSourceLine (DIE &Die, const DISubprogram *SP) |
void | addSourceLine (DIE &Die, const DILabel *L) |
void | addSourceLine (DIE &Die, const DIType *Ty) |
void | addSourceLine (DIE &Die, const DIObjCProperty *Ty) |
void | addConstantValue (DIE &Die, const ConstantInt *CI, const DIType *Ty) |
Add constant value entry in variable DIE. | |
void | addConstantValue (DIE &Die, const APInt &Val, const DIType *Ty) |
void | addConstantValue (DIE &Die, const APInt &Val, bool Unsigned) |
void | addConstantValue (DIE &Die, uint64_t Val, const DIType *Ty) |
void | addConstantValue (DIE &Die, bool Unsigned, uint64_t Val) |
void | addConstantFPValue (DIE &Die, const ConstantFP *CFP) |
Add constant value entry in variable DIE. | |
void | addLinkageName (DIE &Die, StringRef LinkageName) |
Add a linkage name, if it isn't empty. | |
void | addTemplateParams (DIE &Buffer, DINodeArray TParams) |
Add template parameters in buffer. | |
void | addThrownTypes (DIE &Die, DINodeArray ThrownTypes) |
Add thrown types. | |
void | addAccess (DIE &Die, DINode::DIFlags Flags) |
Add the accessibility attribute. | |
void | addType (DIE &Entity, const DIType *Ty, dwarf::Attribute Attribute=dwarf::DW_AT_type) |
Add a new type attribute to the specified entity. | |
DIE * | getOrCreateNameSpace (const DINamespace *NS) |
DIE * | getOrCreateModule (const DIModule *M) |
DIE * | getOrCreateSubprogramDIE (const DISubprogram *SP, bool Minimal=false) |
void | applySubprogramAttributes (const DISubprogram *SP, DIE &SPDie, bool SkipSPAttributes=false) |
DIE * | createTypeDIE (const DIScope *Context, DIE &ContextDIE, const DIType *Ty) |
Creates type DIE with specific context. | |
virtual DIE * | getOrCreateTypeDIE (const MDNode *TyNode) |
Find existing DIE or create new DIE for the given type. | |
virtual DIE * | getOrCreateContextDIE (const DIScope *Context) |
Get context owner's DIE. | |
void | constructContainingTypeDIEs () |
Construct DIEs for types that contain vtables. | |
void | constructSubprogramArguments (DIE &Buffer, DITypeRefArray Args) |
Construct function argument DIEs. | |
DIE & | createAndAddDIE (dwarf::Tag Tag, DIE &Parent, const DINode *N=nullptr) |
Create a DIE with the given Tag, add the DIE to its parent, and call insertDIE if MD is not null. | |
bool | useSegmentedStringOffsetsTable () const |
virtual unsigned | getHeaderSize () const |
Compute the size of a header for this unit, not including the initial length field. | |
virtual void | emitHeader (bool UseOffsets)=0 |
Emit the header for this unit, not including the initial length field. | |
void | addStringOffsetsStart () |
Add the DW_AT_str_offsets_base attribute to the unit DIE. | |
void | addRnglistsBase () |
Add the DW_AT_rnglists_base attribute to the unit DIE. | |
virtual DwarfCompileUnit & | getCU ()=0 |
void | constructTypeDIE (DIE &Buffer, const DICompositeType *CTy) |
void | addSectionDelta (DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, const MCSymbol *Lo) |
addSectionDelta - Add a label delta attribute data and value. | |
void | addSectionLabel (DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Label, const MCSymbol *Sec) |
Add a Dwarf section label attribute data and value. | |
void | addAnnotation (DIE &Buffer, DINodeArray Annotations) |
Add DW_TAG_LLVM_annotation. | |
DIE * | createTypeDIE (const DICompositeType *Ty) |
Get context owner's DIE. | |
Public Member Functions inherited from llvm::DIEUnit | |
DIEUnit (dwarf::Tag UnitTag) | |
DIEUnit (const DIEUnit &RHS)=delete | |
DIEUnit (DIEUnit &&RHS)=delete | |
void | operator= (const DIEUnit &RHS)=delete |
void | operator= (const DIEUnit &&RHS)=delete |
void | setSection (MCSection *Section) |
Set the section that this DIEUnit will be emitted into. | |
virtual const MCSymbol * | getCrossSectionRelativeBaseAddress () const |
MCSection * | getSection () const |
Return the section that this DIEUnit will be emitted into. | |
void | setDebugSectionOffset (uint64_t O) |
uint64_t | getDebugSectionOffset () const |
DIE & | getUnitDie () |
const DIE & | getUnitDie () const |
Protected Member Functions | |
DwarfUnit (dwarf::Tag, const DICompileUnit *Node, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU, unsigned UniqueID=0) | |
bool | applySubprogramDefinitionAttributes (const DISubprogram *SP, DIE &SPDie, bool Minimal) |
bool | isShareableAcrossCUs (const DINode *D) const |
Check whether the DIE for this MDNode can be shared across CUs. | |
template<typename T > | |
void | addAttribute (DIEValueList &Die, dwarf::Attribute Attribute, dwarf::Form Form, T &&Value) |
~DwarfUnit () | |
DIE * | getOrCreateStaticMemberDIE (const DIDerivedType *DT) |
Create new static data member DIE. | |
virtual unsigned | getOrCreateSourceID (const DIFile *File)=0 |
Look up the source ID for the given file. | |
void | emitCommonHeader (bool UseOffsets, dwarf::UnitType UT) |
Emit the common part of the header for this unit. | |
Protected Member Functions inherited from llvm::DIEUnit | |
virtual | ~DIEUnit ()=default |
.debug_info or .debug_types absolute section offset. | |
Protected Attributes | |
unsigned | UniqueID |
A numeric ID unique among all CUs in the module. | |
const DICompileUnit * | CUNode |
MDNode for the compile unit. | |
BumpPtrAllocator | DIEValueAllocator |
AsmPrinter * | Asm |
Target of Dwarf emission. | |
MCSymbol * | LabelBegin = nullptr |
The start of the unit within its section. | |
MCSymbol * | EndLabel = nullptr |
Emitted at the end of the CU and used to compute the CU Length field. | |
DwarfDebug * | DD |
DwarfFile * | DU |
DIE * | IndexTyDie = nullptr |
An anonymous type for index type. Owned by DIEUnit. | |
DenseMap< const MDNode *, DIE * > | MDNodeToDieMap |
Tracks the mapping of unit level debug information variables to debug information entries. | |
std::vector< DIEBlock * > | DIEBlocks |
A list of all the DIEBlocks in use. | |
std::vector< DIELoc * > | DIELocs |
A list of all the DIELocs in use. | |
DenseMap< DIE *, const DINode * > | ContainingTypeMap |
This map is used to keep track of subprogram DIEs that need DW_AT_containing_type attribute. | |
This dwarf writer support class manages information associated with a source file.
Definition at line 35 of file DwarfUnit.h.
|
protected |
Definition at line 83 of file DwarfUnit.cpp.
|
protected |
Definition at line 95 of file DwarfUnit.cpp.
void DwarfUnit::addAccess | ( | DIE & | Die, |
DINode::DIFlags | Flags | ||
) |
Add the accessibility attribute.
Definition at line 534 of file DwarfUnit.cpp.
References addUInt(), llvm::dwarf::DW_ACCESS_private, llvm::dwarf::DW_ACCESS_protected, llvm::dwarf::DW_ACCESS_public, and llvm::DINode::FlagAccessibility.
Referenced by applySubprogramAttributes(), constructTypeDIE(), and getOrCreateStaticMemberDIE().
void DwarfUnit::addAnnotation | ( | DIE & | Buffer, |
DINodeArray | Annotations | ||
) |
Add DW_TAG_LLVM_annotation.
Definition at line 897 of file DwarfUnit.cpp.
References addConstantValue(), addString(), assert(), createAndAddDIE(), llvm::Data, llvm::MDNode::getOperand(), and Name.
Referenced by llvm::DwarfCompileUnit::applyCommonDbgVariableAttributes(), applySubprogramAttributes(), constructTypeDIE(), and llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE().
|
inlineprotected |
Definition at line 84 of file DwarfUnit.h.
References llvm::DIEValueList::addValue(), Asm, llvm::dwarf::AttributeVersion(), DD, llvm::TargetOptions::DebugStrictDwarf, DIEValueAllocator, llvm::DwarfDebug::getDwarfVersion(), llvm::TargetMachine::Options, and llvm::AsmPrinter::TM.
Referenced by llvm::DwarfCompileUnit::addBaseTypeRef(), addBlock(), addDIEEntry(), addDIETypeSignature(), llvm::DwarfCompileUnit::addExpr(), addFlag(), addLabel(), llvm::DwarfCompileUnit::addLabelAddress(), addLabelDelta(), llvm::DwarfCompileUnit::addLocalLabelAddress(), llvm::DwarfCompileUnit::addLocationList(), addSectionDelta(), addSInt(), addString(), and addUInt().
void DwarfUnit::addBlock | ( | DIE & | Die, |
dwarf::Attribute | Attribute, | ||
DIEBlock * | Block | ||
) |
Add block data.
Definition at line 404 of file DwarfUnit.cpp.
References addBlock(), and llvm::Block.
void DwarfUnit::addBlock | ( | DIE & | Die, |
dwarf::Attribute | Attribute, | ||
DIELoc * | Loc | ||
) |
Add block data.
Definition at line 391 of file DwarfUnit.cpp.
References addAttribute(), Asm, llvm::DIELoc::BestForm(), llvm::DIELoc::computeSize(), DD, DIELocs, llvm::AsmPrinter::getDwarfFormParams(), and llvm::DwarfDebug::getDwarfVersion().
Referenced by llvm::DwarfCompileUnit::addAddress(), addBlock(), llvm::DwarfCompileUnit::addComplexAddress(), addConstantValue(), llvm::DwarfCompileUnit::addLabelAddress(), llvm::DwarfCompileUnit::addLocationAttribute(), applySubprogramAttributes(), llvm::DwarfCompileUnit::constructCallSiteParmEntryDIEs(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
void DwarfUnit::addBlock | ( | DIE & | Die, |
dwarf::Attribute | Attribute, | ||
dwarf::Form | Form, | ||
DIEBlock * | Block | ||
) |
Definition at line 397 of file DwarfUnit.cpp.
References addAttribute(), Asm, llvm::Block, DIEBlocks, and llvm::AsmPrinter::getDwarfFormParams().
void DwarfUnit::addConstantFPValue | ( | DIE & | Die, |
const ConstantFP * | CFP | ||
) |
Add constant value entry in variable DIE.
Definition at line 454 of file DwarfUnit.cpp.
References addConstantValue(), llvm::APFloat::bitcastToAPInt(), and llvm::ConstantFP::getValueAPF().
Referenced by getOrCreateStaticMemberDIE().
Definition at line 468 of file DwarfUnit.cpp.
Definition at line 479 of file DwarfUnit.cpp.
References addBlock(), addConstantValue(), addUInt(), Asm, llvm::Block, DIEValueAllocator, llvm::APInt::getBitWidth(), llvm::AsmPrinter::getDataLayout(), llvm::APInt::getRawData(), llvm::APInt::getSExtValue(), llvm::APInt::getZExtValue(), llvm::DataLayout::isLittleEndian(), and Unsigned.
Definition at line 475 of file DwarfUnit.cpp.
References addConstantValue(), DD, and llvm::DebugHandlerBase::isUnsignedDIType().
void DwarfUnit::addConstantValue | ( | DIE & | Die, |
const ConstantInt * | CI, | ||
const DIType * | Ty | ||
) |
Add constant value entry in variable DIE.
Definition at line 459 of file DwarfUnit.cpp.
References addConstantValue(), and llvm::ConstantInt::getValue().
Referenced by addAnnotation(), addConstantFPValue(), addConstantValue(), llvm::DwarfCompileUnit::addLocationAttribute(), and getOrCreateStaticMemberDIE().
Definition at line 464 of file DwarfUnit.cpp.
References addConstantValue(), DD, and llvm::DebugHandlerBase::isUnsignedDIType().
void DwarfUnit::addDIEEntry | ( | DIE & | Die, |
dwarf::Attribute | Attribute, | ||
DIE & | Entry | ||
) |
Add a DIE attribute data and value.
Definition at line 353 of file DwarfUnit.cpp.
References addDIEEntry().
Referenced by addDIEEntry(), addType(), applySubprogramDefinitionAttributes(), llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE(), llvm::DwarfCompileUnit::constructCallSiteEntryDIE(), constructContainingTypeDIEs(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), llvm::DwarfCompileUnit::constructInlinedScopeDIE(), llvm::DwarfCompileUnit::constructSubprogramScopeDIE(), constructTypeDIE(), llvm::DwarfCompileUnit::finishEntityDefinition(), llvm::DwarfCompileUnit::finishSubprogramDefinition(), and llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE().
void DwarfUnit::addDIEEntry | ( | DIE & | Die, |
dwarf::Attribute | Attribute, | ||
DIEEntry | Entry | ||
) |
Add a DIE attribute data and value.
Definition at line 368 of file DwarfUnit.cpp.
References addAttribute(), assert(), DD, llvm::DIE::getUnit(), llvm::DIEUnit::getUnitDie(), llvm::DwarfDebug::shareAcrossDWOCUs(), and llvm::DwarfDebug::useSplitDwarf().
Add a type's DW_AT_signature and set the declaration flag.
Definition at line 357 of file DwarfUnit.cpp.
References addAttribute(), and addFlag().
void DwarfUnit::addFlag | ( | DIE & | Die, |
dwarf::Attribute | Attribute | ||
) |
Add a flag that is true to the DIE.
Definition at line 214 of file DwarfUnit.cpp.
References addAttribute(), DD, and llvm::DwarfDebug::getDwarfVersion().
Referenced by addDIETypeSignature(), llvm::DwarfCompileUnit::applyCommonDbgVariableAttributes(), applySubprogramAttributes(), llvm::DwarfCompileUnit::constructCallSiteEntryDIE(), constructSubprogramArguments(), constructTypeDIE(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), getOrCreateModule(), getOrCreateNameSpace(), getOrCreateStaticMemberDIE(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
|
pure virtual |
Add a new global name to the compile unit.
Implemented in llvm::DwarfCompileUnit, and llvm::DwarfTypeUnit.
Referenced by getOrCreateModule(), and getOrCreateNameSpace().
Definition at line 668 of file DwarfUnit.cpp.
References addGlobalTypeImpl().
Referenced by createTypeDIE().
|
pure virtual |
Add a new global type to the compile unit.
Implemented in llvm::DwarfCompileUnit, and llvm::DwarfTypeUnit.
Referenced by addGlobalType().
void DwarfUnit::addLabel | ( | DIELoc & | Die, |
dwarf::Form | Form, | ||
const MCSymbol * | Label | ||
) |
Definition at line 285 of file DwarfUnit.cpp.
References addLabel().
void DwarfUnit::addLabel | ( | DIEValueList & | Die, |
dwarf::Attribute | Attribute, | ||
dwarf::Form | Form, | ||
const MCSymbol * | Label | ||
) |
Add a Dwarf label attribute data and value.
Definition at line 280 of file DwarfUnit.cpp.
References addAttribute().
Referenced by addLabel(), addOpAddress(), and addSectionLabel().
void DwarfUnit::addLabelDelta | ( | DIEValueList & | Die, |
dwarf::Attribute | Attribute, | ||
const MCSymbol * | Hi, | ||
const MCSymbol * | Lo | ||
) |
Add a label delta attribute data and value.
Definition at line 347 of file DwarfUnit.cpp.
References addAttribute(), DIEValueAllocator, llvm::Hi, and llvm::Lo.
Referenced by addPoolOpAddress(), and llvm::DwarfCompileUnit::attachLowHighPC().
Add a linkage name, if it isn't empty.
Definition at line 508 of file DwarfUnit.cpp.
References addString(), DD, llvm::GlobalValue::dropLLVMManglingEscape(), llvm::DwarfDebug::getDwarfVersion(), and llvm::LinkageName.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), applySubprogramDefinitionAttributes(), and llvm::DwarfCompileUnit::constructCallSiteEntryDIE().
Add a dwarf op address data and value using the form given and an op of either DW_FORM_addr or DW_FORM_GNU_addr_index.
Definition at line 332 of file DwarfUnit.cpp.
References addLabel(), addPoolOpAddress(), addUInt(), DD, llvm::DwarfDebug::getDwarfVersion(), Sym, and llvm::DwarfDebug::useSplitDwarf().
Referenced by llvm::DwarfCompileUnit::addLocationAttribute().
void DwarfUnit::addPoolOpAddress | ( | DIEValueList & | Die, |
const MCSymbol * | Label | ||
) |
Definition at line 307 of file DwarfUnit.cpp.
References addLabelDelta(), addUInt(), llvm::sampleprof::Base, DD, llvm::DwarfDebug::getAddressPool(), llvm::DwarfDebug::getDwarfVersion(), llvm::AddressPool::getIndex(), llvm::DwarfDebug::getSectionLabel(), llvm::DwarfDebug::useAddrOffsetExpressions(), and llvm::DwarfDebug::useAddrOffsetForm().
Referenced by llvm::DwarfCompileUnit::addLabelAddress(), and addOpAddress().
void DwarfUnit::addRnglistsBase | ( | ) |
Add the DW_AT_rnglists_base attribute to the unit DIE.
Definition at line 1910 of file DwarfUnit.cpp.
References addSectionLabel(), Asm, assert(), DD, DU, llvm::MCSection::getBeginSymbol(), llvm::MCObjectFileInfo::getDwarfRnglistsSection(), llvm::DwarfDebug::getDwarfVersion(), llvm::AsmPrinter::getObjFileLowering(), llvm::DwarfFile::getRnglistsTableBaseSym(), and llvm::DIEUnit::getUnitDie().
void DwarfUnit::addSectionDelta | ( | DIE & | Die, |
dwarf::Attribute | Attribute, | ||
const MCSymbol * | Hi, | ||
const MCSymbol * | Lo | ||
) |
addSectionDelta - Add a label delta attribute data and value.
Definition at line 1865 of file DwarfUnit.cpp.
References addAttribute(), DD, DIEValueAllocator, llvm::DwarfDebug::getDwarfSectionOffsetForm(), llvm::Hi, and llvm::Lo.
Referenced by llvm::DwarfCompileUnit::addScopeRangeList(), and addSectionLabel().
void DwarfUnit::addSectionLabel | ( | DIE & | Die, |
dwarf::Attribute | Attribute, | ||
const MCSymbol * | Label, | ||
const MCSymbol * | Sec | ||
) |
Add a Dwarf section label attribute data and value.
Definition at line 1871 of file DwarfUnit.cpp.
References addLabel(), addSectionDelta(), Asm, DD, llvm::AsmPrinter::doesDwarfUseRelocationsAcrossSections(), and llvm::DwarfDebug::getDwarfSectionOffsetForm().
Referenced by llvm::DwarfCompileUnit::addAddrTableBase(), addRnglistsBase(), llvm::DwarfCompileUnit::addScopeRangeList(), addStringOffsetsStart(), llvm::DwarfCompileUnit::applyStmtList(), llvm::DwarfCompileUnit::initStmtList(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
void DwarfUnit::addSectionOffset | ( | DIE & | Die, |
dwarf::Attribute | Attribute, | ||
uint64_t | Integer | ||
) |
Add an offset into a section attribute data and value.
Definition at line 289 of file DwarfUnit.cpp.
References addUInt(), DD, llvm::DwarfDebug::getDwarfSectionOffsetForm(), and llvm::Integer.
void DwarfUnit::addSInt | ( | DIELoc & | Die, |
std::optional< dwarf::Form > | Form, | ||
int64_t | Integer | ||
) |
Definition at line 242 of file DwarfUnit.cpp.
References addSInt(), and llvm::Integer.
void DwarfUnit::addSInt | ( | DIEValueList & | Die, |
dwarf::Attribute | Attribute, | ||
std::optional< dwarf::Form > | Form, | ||
int64_t | Integer | ||
) |
Add an signed integer attribute data and value.
Definition at line 235 of file DwarfUnit.cpp.
References addAttribute(), llvm::DIEInteger::BestForm(), and llvm::Integer.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), addSInt(), llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE(), constructTypeDIE(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
void DwarfUnit::addSourceLine | ( | DIE & | Die, |
const DIGlobalVariable * | G | ||
) |
Definition at line 424 of file DwarfUnit.cpp.
References addSourceLine(), assert(), and G.
Definition at line 436 of file DwarfUnit.cpp.
References addSourceLine(), and assert().
void DwarfUnit::addSourceLine | ( | DIE & | Die, |
const DILocalVariable * | V | ||
) |
Definition at line 418 of file DwarfUnit.cpp.
References addSourceLine(), and assert().
void DwarfUnit::addSourceLine | ( | DIE & | Die, |
const DIObjCProperty * | Ty | ||
) |
Definition at line 448 of file DwarfUnit.cpp.
References addSourceLine(), assert(), llvm::DIObjCProperty::getFile(), and llvm::DIObjCProperty::getLine().
void DwarfUnit::addSourceLine | ( | DIE & | Die, |
const DISubprogram * | SP | ||
) |
Definition at line 430 of file DwarfUnit.cpp.
References addSourceLine(), assert(), and llvm::DIScope::getFile().
Definition at line 442 of file DwarfUnit.cpp.
References addSourceLine(), assert(), llvm::DIScope::getFile(), and llvm::DIType::getLine().
Add location information to specified debug information entry.
Definition at line 409 of file DwarfUnit.cpp.
References addUInt(), and getOrCreateSourceID().
Referenced by addSourceLine(), llvm::DwarfCompileUnit::applyCommonDbgVariableAttributes(), llvm::DwarfCompileUnit::applyLabelAttributes(), applySubprogramAttributes(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), constructTypeDIE(), llvm::DwarfCompileUnit::getOrCreateCommonBlock(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), and getOrCreateStaticMemberDIE().
void DwarfUnit::addString | ( | DIE & | Die, |
dwarf::Attribute | Attribute, | ||
StringRef | Str | ||
) |
Add a string attribute data and value.
We always emit a reference to the string pool instead of immediate strings so that DIEs have more predictable sizes. In the case of split dwarf we emit an index into another table which gets us the static offset into the string table.
Definition at line 247 of file DwarfUnit.cpp.
References addAttribute(), Asm, CUNode, DD, DIEValueAllocator, DU, llvm::DwarfStringPool::getEntry(), llvm::DwarfStringPool::getIndexedEntry(), llvm::DwarfFile::getStringPool(), llvm::DICompileUnit::isDebugDirectivesOnly(), llvm::String, llvm::DwarfDebug::useInlineStrings(), and useSegmentedStringOffsetsTable().
Referenced by addAnnotation(), llvm::DwarfDebug::addDwarfTypeUnitType(), addLinkageName(), llvm::DwarfCompileUnit::applyCommonDbgVariableAttributes(), llvm::DwarfCompileUnit::applyLabelAttributes(), applySubprogramAttributes(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), constructTypeDIE(), llvm::DwarfCompileUnit::createBaseTypeDIEs(), llvm::DwarfCompileUnit::getOrCreateCommonBlock(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), getOrCreateModule(), getOrCreateNameSpace(), and getOrCreateStaticMemberDIE().
void DwarfUnit::addStringOffsetsStart | ( | ) |
Add the DW_AT_str_offsets_base attribute to the unit DIE.
Definition at line 1903 of file DwarfUnit.cpp.
References addSectionLabel(), Asm, DU, llvm::MCSection::getBeginSymbol(), llvm::MCObjectFileInfo::getDwarfStrOffSection(), llvm::AsmPrinter::getObjFileLowering(), llvm::DwarfFile::getStringOffsetsStartSym(), and llvm::DIEUnit::getUnitDie().
Referenced by llvm::DwarfDebug::addDwarfTypeUnitType().
void DwarfUnit::addTemplateParams | ( | DIE & | Buffer, |
DINodeArray | TParams | ||
) |
Add template parameters in buffer.
Definition at line 516 of file DwarfUnit.cpp.
Referenced by applySubprogramDefinitionAttributes(), constructTypeDIE(), and llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE().
void DwarfUnit::addThrownTypes | ( | DIE & | Die, |
DINodeArray | ThrownTypes | ||
) |
Add thrown types.
Definition at line 527 of file DwarfUnit.cpp.
References addType(), and createAndAddDIE().
Referenced by applySubprogramAttributes().
void DwarfUnit::addType | ( | DIE & | Entity, |
const DIType * | Ty, | ||
dwarf::Attribute | Attribute = dwarf::DW_AT_type |
||
) |
Add a new type attribute to the specified entity.
This takes and attribute parameter because DW_AT_friend attributes are also type references.
Definition at line 675 of file DwarfUnit.cpp.
References addDIEEntry(), assert(), and getOrCreateTypeDIE().
Referenced by addThrownTypes(), llvm::DwarfCompileUnit::applyCommonDbgVariableAttributes(), applySubprogramAttributes(), applySubprogramDefinitionAttributes(), constructSubprogramArguments(), constructTypeDIE(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), and getOrCreateStaticMemberDIE().
void DwarfUnit::addUInt | ( | DIEValueList & | Block, |
dwarf::Form | Form, | ||
uint64_t | Integer | ||
) |
Definition at line 230 of file DwarfUnit.cpp.
References addUInt(), llvm::Block, and llvm::Integer.
void DwarfUnit::addUInt | ( | DIEValueList & | Die, |
dwarf::Attribute | Attribute, | ||
std::optional< dwarf::Form > | Form, | ||
uint64_t | Integer | ||
) |
Add an unsigned integer attribute data and value.
Definition at line 221 of file DwarfUnit.cpp.
References addAttribute(), assert(), llvm::DIEInteger::BestForm(), and llvm::Integer.
Referenced by addAccess(), llvm::DwarfCompileUnit::addAddress(), llvm::DwarfCompileUnit::addComplexAddress(), addConstantValue(), llvm::DwarfDebug::addDwarfTypeUnitType(), llvm::DwarfCompileUnit::addLocationAttribute(), addOpAddress(), addPoolOpAddress(), llvm::DwarfCompileUnit::addScopeRangeList(), addSectionOffset(), addSourceLine(), addUInt(), llvm::DwarfCompileUnit::applyCommonDbgVariableAttributes(), applySubprogramAttributes(), applySubprogramDefinitionAttributes(), llvm::DwarfCompileUnit::constructInlinedScopeDIE(), constructTypeDIE(), llvm::DwarfCompileUnit::createBaseTypeDIEs(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), getOrCreateModule(), getOrCreateStaticMemberDIE(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
void DwarfUnit::applySubprogramAttributes | ( | const DISubprogram * | SP, |
DIE & | SPDie, | ||
bool | SkipSPAttributes = false |
||
) |
Definition at line 1296 of file DwarfUnit.cpp.
References addAccess(), addAnnotation(), addBlock(), addFlag(), addSourceLine(), addString(), addThrownTypes(), addType(), addUInt(), applySubprogramDefinitionAttributes(), Asm, llvm::Block, CC, constructSubprogramArguments(), ContainingTypeMap, CUNode, DD, llvm::StringRef::empty(), llvm::DICompileUnit::getDebugInfoForProfiling(), getDIELoc(), llvm::DwarfDebug::getDwarfVersion(), llvm::AsmPrinter::getISAEncoding(), getLanguage(), llvm::DIScope::getName(), llvm::isa(), llvm::dwarf::isC(), and llvm::DwarfDebug::useAppleExtensionAttributes().
Referenced by llvm::DwarfCompileUnit::applySubprogramAttributesToDefinition(), and getOrCreateSubprogramDIE().
|
protected |
Definition at line 1243 of file DwarfUnit.cpp.
References addDIEEntry(), addLinkageName(), addTemplateParams(), addType(), addUInt(), assert(), DD, DU, llvm::StringRef::empty(), llvm::DwarfFile::getAbstractScopeDIEs(), getDIE(), llvm::DIScope::getFile(), getOrCreateSourceID(), llvm::LinkageName, llvm::DITypeRefArray::size(), and llvm::DwarfDebug::useAllLinkageNames().
Referenced by applySubprogramAttributes().
void DwarfUnit::constructContainingTypeDIEs | ( | ) |
Construct DIEs for types that contain vtables.
Definition at line 1637 of file DwarfUnit.cpp.
References addDIEEntry(), ContainingTypeMap, D, getDIE(), and P.
void DwarfUnit::constructSubprogramArguments | ( | DIE & | Buffer, |
DITypeRefArray | Args | ||
) |
Construct function argument DIEs.
Definition at line 852 of file DwarfUnit.cpp.
References addFlag(), addType(), assert(), createAndAddDIE(), llvm::DIType::isArtificial(), and N.
Referenced by applySubprogramAttributes().
void DwarfUnit::constructTypeDIE | ( | DIE & | Buffer, |
const DICompositeType * | CTy | ||
) |
Definition at line 918 of file DwarfUnit.cpp.
References addAccess(), addAnnotation(), addDIEEntry(), addFlag(), addSInt(), addSourceLine(), addString(), addTemplateParams(), addType(), addUInt(), Asm, CC, constructTypeDIE(), createAndAddDIE(), DD, llvm::TargetOptions::DebugStrictDwarf, llvm::StringRef::empty(), llvm::DIType::getAlignInBytes(), llvm::DICompositeType::getAnnotations(), getDIE(), llvm::DICompositeType::getDiscriminator(), llvm::DwarfDebug::getDwarfVersion(), llvm::DICompositeType::getElements(), llvm::DIType::getExportSymbols(), llvm::DIType::getFlags(), llvm::DICompositeType::getIdentifier(), llvm::DIType::getName(), llvm::DIType::getNumExtraInhabitants(), getOrCreateContextDIE(), getOrCreateStaticMemberDIE(), getOrCreateSubprogramDIE(), getOrCreateTypeDIE(), llvm::DICompositeType::getRawIdentifier(), llvm::DICompositeType::getRuntimeLang(), llvm::DIType::getSizeInBits(), llvm::DICompositeType::getSpecification(), llvm::DIE::getTag(), llvm::DICompositeType::getTemplateParams(), llvm::DICompositeType::getVTableHolder(), llvm::DIType::isAppleBlockExtension(), llvm::DIType::isForwardDecl(), llvm::DIType::isObjcClassComplete(), llvm::DIType::isTypePassByReference(), llvm::DIType::isTypePassByValue(), llvm::DebugHandlerBase::isUnsignedDIType(), Name, llvm::TargetMachine::Options, Size, llvm::Tag, and llvm::AsmPrinter::TM.
Referenced by constructTypeDIE(), and createTypeDIE().
DIE & DwarfUnit::createAndAddDIE | ( | dwarf::Tag | Tag, |
DIE & | Parent, | ||
const DINode * | N = nullptr |
||
) |
Create a DIE with the given Tag, add the DIE to its parent, and call insertDIE if MD is not null.
Definition at line 384 of file DwarfUnit.cpp.
References llvm::DIE::addChild(), DIEValueAllocator, llvm::DIE::get(), insertDIE(), N, and llvm::Tag.
Referenced by addAnnotation(), addThrownTypes(), llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE(), llvm::DwarfCompileUnit::constructCallSiteEntryDIE(), constructSubprogramArguments(), constructTypeDIE(), createTypeDIE(), llvm::DwarfCompileUnit::getOrCreateCommonBlock(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), getOrCreateModule(), getOrCreateNameSpace(), getOrCreateStaticMemberDIE(), and getOrCreateSubprogramDIE().
DIE * DwarfUnit::createTypeDIE | ( | const DICompositeType * | Ty | ) |
Get context owner's DIE.
Definition at line 560 of file DwarfUnit.cpp.
References constructTypeDIE(), createAndAddDIE(), getDIE(), getOrCreateContextDIE(), llvm::DIType::getScope(), and llvm::DINode::getTag().
Creates type DIE with specific context.
Definition at line 576 of file DwarfUnit.cpp.
References llvm::DwarfDebug::addDwarfTypeUnitType(), addGlobalType(), constructTypeDIE(), createAndAddDIE(), DD, llvm::DwarfDebug::generateTypeUnits(), getCU(), llvm::DIType::getRawName(), llvm::DINode::getTag(), and llvm::DIType::isForwardDecl().
Referenced by llvm::DwarfDebug::addDwarfTypeUnitType(), and getOrCreateTypeDIE().
|
protected |
Emit the common part of the header for this unit.
Definition at line 1812 of file DwarfUnit.cpp.
References Asm, DD, llvm::AsmPrinter::emitDwarfLengthOrOffset(), llvm::AsmPrinter::emitDwarfSymbolReference(), llvm::AsmPrinter::emitDwarfUnitLength(), llvm::AsmPrinter::emitInt16(), llvm::AsmPrinter::emitInt8(), EndLabel, llvm::MCSection::getBeginSymbol(), llvm::MCAsmInfo::getCodePointerSize(), llvm::MCObjectFileInfo::getDwarfAbbrevSection(), llvm::DwarfDebug::getDwarfVersion(), getHeaderSize(), llvm::AsmPrinter::getObjFileLowering(), getSize(), llvm::DIEUnit::getUnitDie(), llvm::AsmPrinter::MAI, llvm::AsmPrinter::OutStreamer, llvm::DwarfDebug::useSectionsAsReferences(), and llvm::Version.
Referenced by llvm::DwarfCompileUnit::emitHeader(), and llvm::DwarfTypeUnit::emitHeader().
|
pure virtual |
Emit the header for this unit, not including the initial length field.
Implemented in llvm::DwarfCompileUnit, and llvm::DwarfTypeUnit.
Referenced by llvm::DwarfFile::emitUnit().
|
inline |
Definition at line 103 of file DwarfUnit.h.
References Asm.
|
pure virtual |
Implemented in llvm::DwarfCompileUnit, and llvm::DwarfTypeUnit.
Referenced by createTypeDIE().
|
inline |
Definition at line 111 of file DwarfUnit.h.
References CUNode.
Referenced by llvm::DwarfFile::emitUnit(), llvm::DwarfDebug::endFunctionImpl(), and llvm::DwarfCompileUnit::includeMinimalInlineScopes().
Returns the DIE map slot for the specified debug variable.
We delegate the request to DwarfDebug when the MDNode can be part of the type system, since DIEs for the type system can be shared across CUs and the mappings are kept in DwarfDebug.
Definition at line 196 of file DwarfUnit.cpp.
References D, DU, llvm::DwarfFile::getDIE(), isShareableAcrossCUs(), and MDNodeToDieMap.
Referenced by applySubprogramDefinitionAttributes(), constructContainingTypeDIEs(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), constructTypeDIE(), createTypeDIE(), llvm::DwarfCompileUnit::finishSubprogramDefinition(), llvm::DwarfCompileUnit::getOrCreateCommonBlock(), getOrCreateContextDIE(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), llvm::DwarfCompileUnit::getOrCreateImportedEntityDIE(), getOrCreateModule(), getOrCreateNameSpace(), getOrCreateStaticMemberDIE(), getOrCreateSubprogramDIE(), and getOrCreateTypeDIE().
|
inline |
Returns a fresh newly allocated DIELoc.
Definition at line 144 of file DwarfUnit.h.
References DIEValueAllocator.
Referenced by applySubprogramAttributes().
|
inline |
Definition at line 112 of file DwarfUnit.h.
References DD.
Referenced by llvm::DwarfCompileUnit::finishEntityDefinition().
|
inline |
Definition at line 109 of file DwarfUnit.h.
References EndLabel.
Referenced by llvm::DwarfFile::emitUnit().
|
inlinevirtual |
Compute the size of a header for this unit, not including the initial length field.
Reimplemented in llvm::DwarfCompileUnit, and llvm::DwarfTypeUnit.
Definition at line 283 of file DwarfUnit.h.
References Asm, DD, llvm::AsmPrinter::getDwarfOffsetByteSize(), and llvm::DwarfDebug::getDwarfVersion().
Referenced by llvm::DwarfFile::computeSizeAndOffsetsForUnit(), emitCommonHeader(), llvm::DwarfCompileUnit::getHeaderSize(), and llvm::DwarfTypeUnit::getHeaderSize().
|
inline |
Get the the symbol for start of the section for this unit.
Definition at line 105 of file DwarfUnit.h.
References assert(), and LabelBegin.
Referenced by llvm::emitDWARF5AccelTable().
|
inline |
Definition at line 110 of file DwarfUnit.h.
References CUNode, and llvm::DICompileUnit::getSourceLanguage().
Referenced by applySubprogramAttributes(), and getParentContextString().
Get context owner's DIE.
Reimplemented in llvm::DwarfCompileUnit.
Definition at line 546 of file DwarfUnit.cpp.
References getDIE(), getOrCreateModule(), getOrCreateNameSpace(), getOrCreateSubprogramDIE(), getOrCreateTypeDIE(), and llvm::DIEUnit::getUnitDie().
Referenced by constructTypeDIE(), createTypeDIE(), llvm::DwarfCompileUnit::getOrCreateContextDIE(), getOrCreateModule(), getOrCreateNameSpace(), getOrCreateStaticMemberDIE(), getOrCreateSubprogramDIE(), and getOrCreateTypeDIE().
Definition at line 1180 of file DwarfUnit.cpp.
References addFlag(), addGlobalName(), addString(), addUInt(), createAndAddDIE(), getDIE(), getOrCreateContextDIE(), and getOrCreateSourceID().
Referenced by llvm::DwarfCompileUnit::constructImportedEntityDIE(), and getOrCreateContextDIE().
DIE * DwarfUnit::getOrCreateNameSpace | ( | const DINamespace * | NS | ) |
Definition at line 1159 of file DwarfUnit.cpp.
References llvm::DwarfDebug::addAccelNamespace(), addFlag(), addGlobalName(), addString(), createAndAddDIE(), CUNode, DD, getDIE(), llvm::DINamespace::getExportSymbols(), llvm::DINamespace::getName(), llvm::DICompileUnit::getNameTableKind(), getOrCreateContextDIE(), llvm::DINamespace::getScope(), and Name.
Referenced by llvm::DwarfCompileUnit::constructImportedEntityDIE(), and getOrCreateContextDIE().
Look up the source ID for the given file.
If none currently exists, create a new ID and insert it in the line table.
Implemented in llvm::DwarfCompileUnit.
Referenced by addSourceLine(), applySubprogramDefinitionAttributes(), and getOrCreateModule().
|
protected |
Create new static data member DIE.
Definition at line 1769 of file DwarfUnit.cpp.
References addAccess(), addConstantFPValue(), addConstantValue(), addFlag(), addSourceLine(), addString(), addType(), addUInt(), assert(), createAndAddDIE(), getDIE(), getOrCreateContextDIE(), llvm::DIE::getTag(), and llvm::dwarf::isType().
Referenced by constructTypeDIE(), and llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE().
DIE * DwarfUnit::getOrCreateSubprogramDIE | ( | const DISubprogram * | SP, |
bool | Minimal = false |
||
) |
Definition at line 1211 of file DwarfUnit.cpp.
References applySubprogramAttributes(), createAndAddDIE(), getDIE(), getOrCreateContextDIE(), getOrCreateSubprogramDIE(), llvm::DIScope::getScope(), llvm::DIE::getUnit(), and llvm::DIEUnit::getUnitDie().
Referenced by llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE(), llvm::DwarfCompileUnit::constructCallSiteEntryDIE(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), constructTypeDIE(), getOrCreateContextDIE(), getOrCreateSubprogramDIE(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
Find existing DIE or create new DIE for the given type.
Definition at line 612 of file DwarfUnit.cpp.
References assert(), createTypeDIE(), DD, getBaseType(), getDIE(), llvm::DwarfDebug::getDwarfVersion(), getOrCreateContextDIE(), getOrCreateTypeDIE(), and llvm::DIE::getUnit().
Referenced by addType(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), constructTypeDIE(), getOrCreateContextDIE(), and getOrCreateTypeDIE().
Get string containing language specific context for a global name.
Walks the metadata parent chain in a language specific manner (using the compile unit language) and returns it as a string. This is done at the metadata level because DIEs may not currently have been added to the parent context and walking the DIEs looking for names is more expensive than walking the metadata.
Definition at line 681 of file DwarfUnit.cpp.
References getLanguage(), llvm::DIScope::getScope(), llvm::dwarf::isCPlusPlus(), Name, and llvm::reverse().
Referenced by llvm::DwarfCompileUnit::addGlobalName(), llvm::DwarfCompileUnit::addGlobalNameForTypeUnit(), llvm::DwarfCompileUnit::addGlobalTypeImpl(), and llvm::DwarfCompileUnit::addGlobalTypeUnitType().
|
inline |
Gets Unique ID for this unit.
Definition at line 101 of file DwarfUnit.h.
References UniqueID.
Referenced by llvm::DwarfCompileUnit::getOrCreateSourceID(), and llvm::DwarfCompileUnit::initStmtList().
|
inline |
Return true if this compile unit has something to write out.
Definition at line 115 of file DwarfUnit.h.
References llvm::DIEUnit::getUnitDie(), and llvm::DIE::hasChildren().
Insert DIE into the map.
We delegate the request to DwarfDebug when the MDNode can be part of the type system, since DIEs for the type system can be shared across CUs and the mappings are kept in DwarfDebug.
Definition at line 202 of file DwarfUnit.cpp.
References D, DU, llvm::DwarfFile::insertDIE(), isShareableAcrossCUs(), and MDNodeToDieMap.
Referenced by llvm::DwarfCompileUnit::constructCallSiteParmEntryDIEs(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), llvm::DwarfCompileUnit::constructLabelDIE(), llvm::DwarfCompileUnit::constructVariableDIE(), createAndAddDIE(), and llvm::DwarfCompileUnit::DwarfCompileUnit().
void DwarfUnit::insertDIE | ( | DIE * | D | ) |
Definition at line 210 of file DwarfUnit.cpp.
References D, and MDNodeToDieMap.
Check whether the DIE for this MDNode can be shared across CUs.
Definition at line 181 of file DwarfUnit.cpp.
References D, DD, llvm::DwarfDebug::generateTypeUnits(), and llvm::DwarfDebug::shareAcrossDWOCUs().
Referenced by getDIE(), and insertDIE().
|
inline |
Definition at line 277 of file DwarfUnit.h.
References DD, and llvm::DwarfDebug::useSegmentedStringOffsetsTable().
Referenced by addString().
|
protected |
Target of Dwarf emission.
Definition at line 46 of file DwarfUnit.h.
Referenced by llvm::DwarfCompileUnit::addAddress(), llvm::DwarfCompileUnit::addAddrTableBase(), addAttribute(), addBlock(), llvm::DwarfCompileUnit::addComplexAddress(), addConstantValue(), llvm::DwarfCompileUnit::addLocationAttribute(), addRnglistsBase(), llvm::DwarfCompileUnit::addScopeRangeList(), addSectionLabel(), addString(), addStringOffsetsStart(), llvm::DwarfCompileUnit::applyStmtList(), applySubprogramAttributes(), llvm::DwarfCompileUnit::attachRangesOrLowHighPC(), llvm::DwarfCompileUnit::constructCallSiteParmEntryDIEs(), constructTypeDIE(), llvm::DwarfCompileUnit::DwarfCompileUnit(), emitCommonHeader(), llvm::DwarfCompileUnit::emitHeader(), llvm::DwarfTypeUnit::emitHeader(), getAsmPrinter(), getHeaderSize(), llvm::DwarfTypeUnit::getHeaderSize(), llvm::DwarfCompileUnit::getLength(), llvm::DwarfCompileUnit::getOrCreateSourceID(), llvm::DwarfCompileUnit::initStmtList(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
This map is used to keep track of subprogram DIEs that need DW_AT_containing_type attribute.
This attribute points to a DIE that corresponds to the MDNode mapped with the subprogram DIE.
Definition at line 74 of file DwarfUnit.h.
Referenced by applySubprogramAttributes(), and constructContainingTypeDIEs().
|
protected |
MDNode for the compile unit.
Definition at line 40 of file DwarfUnit.h.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), addString(), applySubprogramAttributes(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), llvm::DwarfCompileUnit::constructInlinedScopeDIE(), llvm::DwarfCompileUnit::finishEntityDefinition(), getCUNode(), getLanguage(), getOrCreateNameSpace(), llvm::DwarfCompileUnit::hasDwarfPubSections(), llvm::DwarfCompileUnit::initStmtList(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
|
protected |
Definition at line 55 of file DwarfUnit.h.
Referenced by llvm::DwarfCompileUnit::addAddrTableBase(), addAttribute(), addBlock(), addConstantValue(), addDIEEntry(), addFlag(), llvm::DwarfCompileUnit::addLabelAddress(), addLinkageName(), llvm::DwarfCompileUnit::addLocationAttribute(), llvm::DwarfCompileUnit::addLocationList(), addOpAddress(), addPoolOpAddress(), llvm::DwarfCompileUnit::addRange(), addRnglistsBase(), llvm::DwarfCompileUnit::addScopeRangeList(), addSectionDelta(), addSectionLabel(), addSectionOffset(), addString(), applySubprogramAttributes(), applySubprogramDefinitionAttributes(), llvm::DwarfCompileUnit::attachLowHighPC(), llvm::DwarfCompileUnit::attachRangesOrLowHighPC(), llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE(), llvm::DwarfCompileUnit::constructCallSiteEntryDIE(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), llvm::DwarfCompileUnit::constructInlinedScopeDIE(), llvm::DwarfCompileUnit::constructLexicalScopeDIE(), llvm::DwarfCompileUnit::constructScopeDIE(), constructTypeDIE(), llvm::DwarfCompileUnit::createAndAddScopeChildren(), createTypeDIE(), emitCommonHeader(), llvm::DwarfCompileUnit::emitHeader(), llvm::DwarfTypeUnit::emitHeader(), getDwarfDebug(), getHeaderSize(), llvm::DwarfCompileUnit::getHeaderSize(), getOrCreateNameSpace(), llvm::DwarfCompileUnit::getOrCreateSourceID(), getOrCreateTypeDIE(), llvm::DwarfCompileUnit::hasDwarfPubSections(), llvm::DwarfCompileUnit::includeMinimalInlineScopes(), llvm::DwarfCompileUnit::initStmtList(), isShareableAcrossCUs(), llvm::DwarfCompileUnit::updateSubprogramScopeDIE(), llvm::DwarfCompileUnit::useGNUAnalogForDwarf5Feature(), and useSegmentedStringOffsetsTable().
|
protected |
A list of all the DIEBlocks in use.
Definition at line 66 of file DwarfUnit.h.
Referenced by addBlock(), and ~DwarfUnit().
|
protected |
A list of all the DIELocs in use.
Definition at line 69 of file DwarfUnit.h.
Referenced by addBlock(), and ~DwarfUnit().
|
protected |
Definition at line 43 of file DwarfUnit.h.
Referenced by llvm::DwarfCompileUnit::addAddress(), addAttribute(), llvm::DwarfCompileUnit::addBaseTypeRef(), llvm::DwarfCompileUnit::addComplexAddress(), addConstantValue(), llvm::DwarfCompileUnit::addLabelAddress(), addLabelDelta(), llvm::DwarfCompileUnit::addLocationAttribute(), addSectionDelta(), addString(), llvm::DwarfCompileUnit::constructCallSiteParmEntryDIEs(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), llvm::DwarfCompileUnit::constructInlinedScopeDIE(), llvm::DwarfCompileUnit::constructLabelDIE(), llvm::DwarfCompileUnit::constructLexicalScopeDIE(), llvm::DwarfCompileUnit::constructSubprogramScopeDIE(), llvm::DwarfCompileUnit::constructVariableDIE(), createAndAddDIE(), llvm::DwarfCompileUnit::createBaseTypeDIEs(), getDIELoc(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
|
protected |
Definition at line 56 of file DwarfUnit.h.
Referenced by addRnglistsBase(), llvm::DwarfCompileUnit::addScopeRangeList(), addString(), addStringOffsetsStart(), applySubprogramDefinitionAttributes(), llvm::DwarfCompileUnit::createAbstractEntity(), llvm::DwarfCompileUnit::createAndAddScopeChildren(), getDIE(), and insertDIE().
|
protected |
Emitted at the end of the CU and used to compute the CU Length field.
Definition at line 52 of file DwarfUnit.h.
Referenced by llvm::DwarfCompileUnit::attachRangesOrLowHighPC(), emitCommonHeader(), and getEndLabel().
|
protected |
An anonymous type for index type. Owned by DIEUnit.
Definition at line 59 of file DwarfUnit.h.
|
protected |
The start of the unit within its section.
Definition at line 49 of file DwarfUnit.h.
Referenced by llvm::DwarfCompileUnit::emitHeader(), llvm::DwarfTypeUnit::emitHeader(), and getLabelBegin().
Tracks the mapping of unit level debug information variables to debug information entries.
Definition at line 63 of file DwarfUnit.h.
Referenced by getDIE(), and insertDIE().
|
protected |
A numeric ID unique among all CUs in the module.
Definition at line 38 of file DwarfUnit.h.
Referenced by getUniqueID().