|
LLVM
10.0.0
|
This dwarf writer support class manages information associated with a source file. More...
#include "CodeGen/AsmPrinter/DwarfUnit.h"
Public Member Functions | |
| AsmPrinter * | getAsmPrinter () const |
| MCSymbol * | getEndLabel () const |
| uint16_t | getLanguage () const |
| const DICompileUnit * | getCUNode () const |
| uint16_t | getDwarfVersion () const |
| bool | hasContent () const |
| Return true if this compile unit has something to write out. More... | |
| std::string | getParentContextString (const DIScope *Context) const |
| Get string containing language specific context for a global name. More... | |
| virtual void | addGlobalName (StringRef Name, const DIE &Die, const DIScope *Context)=0 |
| Add a new global name to the compile unit. More... | |
| virtual void | addGlobalType (const DIType *Ty, const DIE &Die, const DIScope *Context)=0 |
| Add a new global type to the compile unit. More... | |
| DIE * | getDIE (const DINode *D) const |
| Returns the DIE map slot for the specified debug variable. More... | |
| DIELoc * | getDIELoc () |
| Returns a fresh newly allocated DIELoc. More... | |
| void | insertDIE (const DINode *Desc, DIE *D) |
| Insert DIE into the map. More... | |
| void | insertDIE (DIE *D) |
| void | addFlag (DIE &Die, dwarf::Attribute Attribute) |
| Add a flag that is true to the DIE. More... | |
| void | addUInt (DIEValueList &Die, dwarf::Attribute Attribute, Optional< dwarf::Form > Form, uint64_t Integer) |
| Add an unsigned integer attribute data and value. More... | |
| void | addUInt (DIEValueList &Block, dwarf::Form Form, uint64_t Integer) |
| void | addSInt (DIEValueList &Die, dwarf::Attribute Attribute, Optional< dwarf::Form > Form, int64_t Integer) |
| Add an signed integer attribute data and value. More... | |
| void | addSInt (DIELoc &Die, Optional< dwarf::Form > Form, int64_t Integer) |
| void | addString (DIE &Die, dwarf::Attribute Attribute, StringRef Str) |
| Add a string attribute data and value. More... | |
| DIEValueList::value_iterator | addLabel (DIEValueList &Die, dwarf::Attribute Attribute, dwarf::Form Form, const MCSymbol *Label) |
| Add a Dwarf label attribute data and value. More... | |
| 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. More... | |
| 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. More... | |
| void | addLabelDelta (DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, const MCSymbol *Lo) |
| Add a label delta attribute data and value. More... | |
| void | addDIEEntry (DIE &Die, dwarf::Attribute Attribute, DIE &Entry) |
| Add a DIE attribute data and value. More... | |
| void | addDIEEntry (DIE &Die, dwarf::Attribute Attribute, DIEEntry Entry) |
| Add a DIE attribute data and value. More... | |
| void | addDIETypeSignature (DIE &Die, uint64_t Signature) |
| Add a type's DW_AT_signature and set the declaration flag. More... | |
| void | addBlock (DIE &Die, dwarf::Attribute Attribute, DIELoc *Loc) |
| Add block data. More... | |
| void | addBlock (DIE &Die, dwarf::Attribute Attribute, DIEBlock *Block) |
| Add block data. More... | |
| void | addSourceLine (DIE &Die, unsigned Line, const DIFile *File) |
| Add location information to specified debug information entry. More... | |
| 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 MachineOperand &MO, const DIType *Ty) |
| Add constant value entry in variable DIE. More... | |
| void | addConstantValue (DIE &Die, const ConstantInt *CI, const DIType *Ty) |
| 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 MachineOperand &MO) |
| Add constant value entry in variable DIE. More... | |
| void | addConstantFPValue (DIE &Die, const ConstantFP *CFP) |
| void | addLinkageName (DIE &Die, StringRef LinkageName) |
| Add a linkage name, if it isn't empty. More... | |
| void | addTemplateParams (DIE &Buffer, DINodeArray TParams) |
| Add template parameters in buffer. More... | |
| void | addThrownTypes (DIE &Die, DINodeArray ThrownTypes) |
| Add thrown types. More... | |
| void | addType (DIE &Entity, const DIType *Ty, dwarf::Attribute Attribute=dwarf::DW_AT_type) |
| Add a new type attribute to the specified entity. More... | |
| 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. More... | |
| DIE * | getOrCreateTypeDIE (const MDNode *TyNode) |
| Find existing DIE or create new DIE for the given type. More... | |
| DIE * | getOrCreateContextDIE (const DIScope *Context) |
| Get context owner's DIE. More... | |
| void | constructContainingTypeDIEs () |
| Construct DIEs for types that contain vtables. More... | |
| void | constructSubprogramArguments (DIE &Buffer, DITypeRefArray Args) |
| Construct function argument DIEs. More... | |
| DIE & | createAndAddDIE (unsigned 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. More... | |
| bool | useSegmentedStringOffsetsTable () const |
| virtual unsigned | getHeaderSize () const |
| Compute the size of a header for this unit, not including the initial length field. More... | |
| virtual void | emitHeader (bool UseOffsets)=0 |
| Emit the header for this unit, not including the initial length field. More... | |
| void | addStringOffsetsStart () |
| Add the DW_AT_str_offsets_base attribute to the unit DIE. More... | |
| void | addRnglistsBase () |
| Add the DW_AT_rnglists_base attribute to the unit DIE. More... | |
| virtual DwarfCompileUnit & | getCU ()=0 |
| void | constructTypeDIE (DIE &Buffer, const DICompositeType *CTy) |
| DIE::value_iterator | addSectionDelta (DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, const MCSymbol *Lo) |
| addSectionDelta - Add a label delta attribute data and value. More... | |
| DIE::value_iterator | addSectionLabel (DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Label, const MCSymbol *Sec) |
| Add a Dwarf section label attribute data and value. More... | |
| Optional< MD5::MD5Result > | getMD5AsBytes (const DIFile *File) const |
If the File has an MD5 checksum, return it as an MD5Result allocated in the MCContext. More... | |
| DIE * | createTypeDIE (const DICompositeType *Ty) |
| Get context owner's DIE. More... | |
Public Member Functions inherited from llvm::DIEUnit | |
| DIEUnit (uint16_t Version, uint8_t AddrSize, 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. More... | |
| MCSection * | getSection () const |
| Return the section that this DIEUnit will be emitted into. More... | |
| void | setDebugSectionOffset (unsigned O) |
| unsigned | getDebugSectionOffset () const |
| void | setLength (uint64_t L) |
| uint64_t | getLength () const |
| uint16_t | getDwarfVersion () const |
| uint16_t | getAddressSize () const |
| DIE & | getUnitDie () |
| const DIE & | getUnitDie () const |
Protected Member Functions | |
| DwarfUnit (dwarf::Tag, const DICompileUnit *Node, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU) | |
| bool | applySubprogramDefinitionAttributes (const DISubprogram *SP, DIE &SPDie) |
| bool | shareAcrossDWOCUs () const |
| bool | isShareableAcrossCUs (const DINode *D) const |
| Check whether the DIE for this MDNode can be shared across CUs. More... | |
| ~DwarfUnit () | |
| DIE * | getOrCreateStaticMemberDIE (const DIDerivedType *DT) |
| Create new static data member DIE. More... | |
| virtual unsigned | getOrCreateSourceID (const DIFile *File)=0 |
| Look up the source ID for the given file. More... | |
| void | emitCommonHeader (bool UseOffsets, dwarf::UnitType UT) |
| Emit the common part of the header for this unit. More... | |
Protected Member Functions inherited from llvm::DIEUnit | |
| virtual | ~DIEUnit ()=default |
| The size in bytes of an address for this unit. More... | |
Protected Attributes | |
| const DICompileUnit * | CUNode |
| MDNode for the compile unit. More... | |
| BumpPtrAllocator | DIEValueAllocator |
| AsmPrinter * | Asm |
| Target of Dwarf emission. More... | |
| MCSymbol * | EndLabel = nullptr |
| Emitted at the end of the CU and used to compute the CU Length field. More... | |
| DwarfDebug * | DD |
| DwarfFile * | DU |
| DIE * | IndexTyDie |
| An anonymous type for index type. Owned by DIEUnit. More... | |
| DenseMap< const MDNode *, DIE * > | MDNodeToDieMap |
| Tracks the mapping of unit level debug information variables to debug information entries. More... | |
| std::vector< DIEBlock * > | DIEBlocks |
| A list of all the DIEBlocks in use. More... | |
| std::vector< DIELoc * > | DIELocs |
| A list of all the DIELocs in use. More... | |
| DenseMap< DIE *, const DINode * > | ContainingTypeMap |
| This map is used to keep track of subprogram DIEs that need DW_AT_containing_type attribute. More... | |
This dwarf writer support class manages information associated with a source file.
Definition at line 40 of file DwarfUnit.h.
|
protected |
Definition at line 91 of file DwarfUnit.cpp.
|
protected |
Definition at line 104 of file DwarfUnit.cpp.
References DD, DIEBlocks, DIELocs, llvm::DwarfDebug::getDwarfVersion(), and getLanguage().
Referenced by getHeaderSize().
| void DwarfUnit::addBlock | ( | DIE & | Die, |
| dwarf::Attribute | Attribute, | ||
| DIELoc * | Loc | ||
| ) |
Add block data.
Definition at line 402 of file DwarfUnit.cpp.
References llvm::DIEValueList::addValue(), Asm, llvm::DIELoc::BestForm(), llvm::DIELoc::ComputeSize(), DD, DIELocs, DIEValueAllocator, and llvm::DwarfDebug::getDwarfVersion().
Referenced by llvm::DwarfCompileUnit::addAddress(), llvm::DwarfCompileUnit::addComplexAddress(), addConstantValue(), llvm::DwarfCompileUnit::addLocationAttribute(), applySubprogramAttributes(), llvm::DwarfCompileUnit::constructCallSiteParmEntryDIEs(), constructContainingTypeDIEs(), llvm::DwarfCompileUnit::constructLabelDIE(), constructTypeDIE(), getDIELoc(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
| void DwarfUnit::addBlock | ( | DIE & | Die, |
| dwarf::Attribute | Attribute, | ||
| DIEBlock * | Block | ||
| ) |
Add block data.
Definition at line 409 of file DwarfUnit.cpp.
References llvm::DIEValueList::addValue(), Asm, llvm::DIEBlock::BestForm(), llvm::DIEBlock::ComputeSize(), DIEBlocks, and DIEValueAllocator.
| void DwarfUnit::addConstantFPValue | ( | DIE & | Die, |
| const MachineOperand & | MO | ||
| ) |
Add constant value entry in variable DIE.
Definition at line 510 of file DwarfUnit.cpp.
References Asm, assert(), llvm::APFloat::bitcastToAPInt(), DIEValueAllocator, llvm::APInt::getBitWidth(), llvm::AsmPrinter::getDataLayout(), llvm::MachineOperand::getFPImm(), llvm::APInt::getRawData(), llvm::ConstantFP::getValueAPF(), llvm::MachineOperand::isFPImm(), and llvm::DataLayout::isLittleEndian().
Referenced by llvm::DwarfCompileUnit::constructLabelDIE(), getDIELoc(), and getOrCreateStaticMemberDIE().
| void DwarfUnit::addConstantFPValue | ( | DIE & | Die, |
| const ConstantFP * | CFP | ||
| ) |
Definition at line 532 of file DwarfUnit.cpp.
References addConstantValue(), llvm::APFloat::bitcastToAPInt(), and llvm::ConstantFP::getValueAPF().
| void DwarfUnit::addConstantValue | ( | DIE & | Die, |
| const MachineOperand & | MO, | ||
| const DIType * | Ty | ||
| ) |
Add constant value entry in variable DIE.
Definition at line 542 of file DwarfUnit.cpp.
References assert(), DD, llvm::MachineOperand::getImm(), llvm::MachineOperand::isImm(), and isUnsignedDIType().
Referenced by addConstantFPValue(), addConstantValue(), llvm::DwarfCompileUnit::addLocationAttribute(), llvm::DwarfCompileUnit::constructLabelDIE(), constructTypeDIE(), getDIELoc(), getOrCreateStaticMemberDIE(), and hasVectorBeenPadded().
| void DwarfUnit::addConstantValue | ( | DIE & | Die, |
| const ConstantInt * | CI, | ||
| const DIType * | Ty | ||
| ) |
Definition at line 537 of file DwarfUnit.cpp.
References addConstantValue(), and llvm::ConstantInt::getValue().
Definition at line 560 of file DwarfUnit.cpp.
References addConstantValue(), DD, and isUnsignedDIType().
Definition at line 564 of file DwarfUnit.cpp.
References addBlock(), addConstantValue(), addUInt(), Asm, DIEValueAllocator, llvm::APInt::getBitWidth(), llvm::AsmPrinter::getDataLayout(), llvm::APInt::getRawData(), llvm::APInt::getSExtValue(), llvm::APInt::getZExtValue(), and llvm::DataLayout::isLittleEndian().
Definition at line 549 of file DwarfUnit.cpp.
References addConstantValue(), DD, and isUnsignedDIType().
Definition at line 553 of file DwarfUnit.cpp.
References addUInt().
| void DwarfUnit::addDIEEntry | ( | DIE & | Die, |
| dwarf::Attribute | Attribute, | ||
| DIE & | Entry | ||
| ) |
Add a DIE attribute data and value.
Definition at line 366 of file DwarfUnit.cpp.
Referenced by addType(), applySubprogramAttributes(), applySubprogramDefinitionAttributes(), llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE(), llvm::DwarfCompileUnit::constructCallSiteEntryDIE(), constructContainingTypeDIEs(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), llvm::DwarfCompileUnit::constructInlinedScopeDIE(), llvm::DwarfCompileUnit::constructSubprogramScopeDIE(), constructTypeDIE(), llvm::DwarfCompileUnit::finishEntityDefinition(), llvm::DwarfCompileUnit::finishSubprogramDefinition(), getDIELoc(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), and getParentContextString().
| void DwarfUnit::addDIEEntry | ( | DIE & | Die, |
| dwarf::Attribute | Attribute, | ||
| DIEEntry | Entry | ||
| ) |
Add a DIE attribute data and value.
Definition at line 381 of file DwarfUnit.cpp.
References llvm::DIEValueList::addValue(), DIEValueAllocator, llvm::DIEEntry::getEntry(), llvm::DIE::getUnit(), and llvm::DIEUnit::getUnitDie().
| void DwarfUnit::addDIETypeSignature | ( | DIE & | Die, |
| uint64_t | Signature | ||
| ) |
Add a type's DW_AT_signature and set the declaration flag.
Definition at line 370 of file DwarfUnit.cpp.
References addFlag(), llvm::DIEValueList::addValue(), and DIEValueAllocator.
Referenced by llvm::DwarfDebug::addDwarfTypeUnitType(), and getDIELoc().
| void DwarfUnit::addFlag | ( | DIE & | Die, |
| dwarf::Attribute | Attribute | ||
| ) |
Add a flag that is true to the DIE.
Definition at line 223 of file DwarfUnit.cpp.
References llvm::DIEValueList::addValue(), DD, DIEValueAllocator, and llvm::DwarfDebug::getDwarfVersion().
Referenced by addDIETypeSignature(), addRnglistsBase(), applySubprogramAttributes(), llvm::DwarfCompileUnit::applyVariableAttributes(), collectCallSiteParameters(), llvm::DwarfCompileUnit::constructCallSiteEntryDIE(), constructContainingTypeDIEs(), constructSubprogramArguments(), constructTypeDIE(), getDIELoc(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), getOrCreateNameSpace(), getOrCreateStaticMemberDIE(), hasVectorBeenPadded(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
|
pure virtual |
Add a new global name to the compile unit.
Implemented in llvm::DwarfTypeUnit, and llvm::DwarfCompileUnit.
Referenced by llvm::DwarfTypeUnit::getHeaderSize(), and hasContent().
|
pure virtual |
Add a new global type to the compile unit.
Implemented in llvm::DwarfTypeUnit, and llvm::DwarfCompileUnit.
Referenced by llvm::DwarfTypeUnit::getHeaderSize(), and hasContent().
| DIEValueList::value_iterator DwarfUnit::addLabel | ( | DIEValueList & | Die, |
| dwarf::Attribute | Attribute, | ||
| dwarf::Form | Form, | ||
| const MCSymbol * | Label | ||
| ) |
Add a Dwarf label attribute data and value.
Definition at line 292 of file DwarfUnit.cpp.
References llvm::DIEValueList::addValue(), and DIEValueAllocator.
Referenced by addLabel(), addOpAddress(), addSectionLabel(), and getDIELoc().
| void DwarfUnit::addLabel | ( | DIELoc & | Die, |
| dwarf::Form | Form, | ||
| const MCSymbol * | Label | ||
| ) |
Definition at line 299 of file DwarfUnit.cpp.
References addLabel().
| void DwarfUnit::addLabelDelta | ( | DIE & | Die, |
| dwarf::Attribute | Attribute, | ||
| const MCSymbol * | Hi, | ||
| const MCSymbol * | Lo | ||
| ) |
Add a label delta attribute data and value.
Definition at line 360 of file DwarfUnit.cpp.
References llvm::DIEValueList::addValue(), and DIEValueAllocator.
Referenced by getDIELoc().
Add a linkage name, if it isn't empty.
Definition at line 593 of file DwarfUnit.cpp.
References addString(), DD, llvm::GlobalValue::dropLLVMManglingEscape(), llvm::StringRef::empty(), and llvm::DwarfDebug::getDwarfVersion().
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), applySubprogramDefinitionAttributes(), and getDIELoc().
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 342 of file DwarfUnit.cpp.
References addLabel(), addUInt(), DD, llvm::DwarfDebug::getAddressPool(), llvm::DwarfDebug::getDwarfVersion(), llvm::AddressPool::getIndex(), and llvm::DwarfDebug::useSplitDwarf().
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), llvm::DwarfCompileUnit::constructLabelDIE(), constructTypeDIE(), and getDIELoc().
| void DwarfUnit::addRnglistsBase | ( | ) |
Add the DW_AT_rnglists_base attribute to the unit DIE.
Definition at line 1723 of file DwarfUnit.cpp.
References addFlag(), addSectionLabel(), addString(), Asm, assert(), createTypeDIE(), D, DD, DU, llvm::StringRef::empty(), llvm::DwarfTypeUnit::getCU(), llvm::DwarfDebug::getDwarfVersion(), llvm::DIType::getName(), llvm::AsmPrinter::getObjFileLowering(), llvm::DwarfFile::getRnglistsTableBaseSym(), llvm::DIEUnit::getUnitDie(), and Name.
Referenced by getHeaderSize().
| DIE::value_iterator 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 1673 of file DwarfUnit.cpp.
References llvm::DIEValueList::addValue(), DD, DIEValueAllocator, and llvm::DwarfDebug::getDwarfVersion().
Referenced by llvm::DwarfCompileUnit::addScopeRangeList(), addSectionLabel(), llvm::DwarfDebug::beginModule(), and getHeaderSize().
| DIE::value_iterator 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 1682 of file DwarfUnit.cpp.
References addLabel(), addSectionDelta(), Asm, DD, llvm::MCAsmInfo::doesDwarfUseRelocationsAcrossSections(), llvm::DwarfDebug::getDwarfVersion(), llvm::AsmPrinter::MAI, and llvm::DwarfDebug::useSplitDwarf().
Referenced by llvm::DwarfCompileUnit::addAddrTableBase(), addRnglistsBase(), llvm::DwarfCompileUnit::addScopeRangeList(), addStringOffsetsStart(), getHeaderSize(), and llvm::DwarfCompileUnit::initStmtList().
| void DwarfUnit::addSectionOffset | ( | DIE & | Die, |
| dwarf::Attribute | Attribute, | ||
| uint64_t | Integer | ||
| ) |
Add an offset into a section attribute data and value.
Definition at line 303 of file DwarfUnit.cpp.
References addUInt(), DD, and llvm::DwarfDebug::getDwarfVersion().
Referenced by getDIELoc(), and getMD5AsBytes().
| void DwarfUnit::addSInt | ( | DIEValueList & | Die, |
| dwarf::Attribute | Attribute, | ||
| Optional< dwarf::Form > | Form, | ||
| int64_t | Integer | ||
| ) |
Add an signed integer attribute data and value.
Definition at line 246 of file DwarfUnit.cpp.
References llvm::DIEValueList::addValue(), llvm::DIEInteger::BestForm(), and DIEValueAllocator.
Referenced by addSInt(), constructTypeDIE(), and getDIELoc().
| void DwarfUnit::addSInt | ( | DIELoc & | Die, |
| Optional< dwarf::Form > | Form, | ||
| int64_t | Integer | ||
| ) |
Definition at line 253 of file DwarfUnit.cpp.
References addSInt().
Add location information to specified debug information entry.
Definition at line 416 of file DwarfUnit.cpp.
References addUInt(), and llvm::None.
Referenced by addSourceLine(), llvm::DwarfCompileUnit::applyLabelAttributes(), applySubprogramAttributes(), llvm::DwarfCompileUnit::applyVariableAttributes(), constructContainingTypeDIEs(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), constructTypeDIE(), getDIELoc(), llvm::DwarfCompileUnit::getOrCreateCommonBlock(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), getOrCreateStaticMemberDIE(), and getParentContextString().
| void DwarfUnit::addSourceLine | ( | DIE & | Die, |
| const DILocalVariable * | V | ||
| ) |
Definition at line 425 of file DwarfUnit.cpp.
References addSourceLine(), assert(), llvm::DIVariable::getFile(), and llvm::DIVariable::getLine().
| void DwarfUnit::addSourceLine | ( | DIE & | Die, |
| const DIGlobalVariable * | G | ||
| ) |
Definition at line 431 of file DwarfUnit.cpp.
References addSourceLine(), assert(), llvm::DIVariable::getFile(), and llvm::DIVariable::getLine().
| void DwarfUnit::addSourceLine | ( | DIE & | Die, |
| const DISubprogram * | SP | ||
| ) |
Definition at line 437 of file DwarfUnit.cpp.
References addSourceLine(), assert(), and llvm::DIScope::getFile().
Definition at line 443 of file DwarfUnit.cpp.
References addSourceLine(), assert(), llvm::DILabel::getFile(), and llvm::DILabel::getLine().
Definition at line 449 of file DwarfUnit.cpp.
References addSourceLine(), assert(), llvm::DIScope::getFile(), and llvm::DIType::getLine().
| void DwarfUnit::addSourceLine | ( | DIE & | Die, |
| const DIObjCProperty * | Ty | ||
| ) |
Definition at line 455 of file DwarfUnit.cpp.
References addSourceLine(), assert(), llvm::DIObjCProperty::getFile(), and llvm::DIObjCProperty::getLine().
| 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 258 of file DwarfUnit.cpp.
References llvm::DIEValueList::addValue(), Asm, CUNode, DD, DIEValueAllocator, DU, llvm::DwarfStringPool::getEntry(), llvm::DwarfStringPool::getIndexedEntry(), llvm::DwarfFile::getStringPool(), llvm::DICompileUnit::isDebugDirectivesOnly(), llvm::DwarfDebug::useInlineStrings(), and useSegmentedStringOffsetsTable().
Referenced by addLinkageName(), addRnglistsBase(), llvm::DwarfCompileUnit::applyLabelAttributes(), applySubprogramAttributes(), llvm::DwarfCompileUnit::applyVariableAttributes(), llvm::DwarfDebug::beginModule(), collectCallSiteParameters(), constructContainingTypeDIEs(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), constructTypeDIE(), llvm::DwarfCompileUnit::createBaseTypeDIEs(), getDIELoc(), llvm::DwarfCompileUnit::getOrCreateCommonBlock(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), getOrCreateModule(), getOrCreateNameSpace(), getOrCreateStaticMemberDIE(), getParentContextString(), and hasVectorBeenPadded().
| void DwarfUnit::addStringOffsetsStart | ( | ) |
Add the DW_AT_str_offsets_base attribute to the unit DIE.
Definition at line 1716 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 collectCallSiteParameters(), and getHeaderSize().
| void DwarfUnit::addTemplateParams | ( | DIE & | Buffer, |
| DINodeArray | TParams | ||
| ) |
Add template parameters in buffer.
Definition at line 601 of file DwarfUnit.cpp.
Referenced by applySubprogramDefinitionAttributes(), constructTypeDIE(), getDIELoc(), and llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE().
| void DwarfUnit::addThrownTypes | ( | DIE & | Die, |
| DINodeArray | ThrownTypes | ||
| ) |
Add thrown types.
Definition at line 612 of file DwarfUnit.cpp.
References addType(), createAndAddDIE(), and llvm::TT.
Referenced by applySubprogramAttributes(), and getDIELoc().
| 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 725 of file DwarfUnit.cpp.
References addDIEEntry(), assert(), and getOrCreateTypeDIE().
Referenced by addThrownTypes(), applySubprogramAttributes(), llvm::DwarfCompileUnit::applyVariableAttributes(), constructContainingTypeDIEs(), constructSubprogramArguments(), constructTypeDIE(), getDIELoc(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), getOrCreateStaticMemberDIE(), getParentContextString(), and hasVectorBeenPadded().
| void DwarfUnit::addUInt | ( | DIEValueList & | Die, |
| dwarf::Attribute | Attribute, | ||
| Optional< dwarf::Form > | Form, | ||
| uint64_t | Integer | ||
| ) |
Add an unsigned integer attribute data and value.
Definition at line 232 of file DwarfUnit.cpp.
References llvm::DIEValueList::addValue(), assert(), llvm::DIEInteger::BestForm(), and DIEValueAllocator.
Referenced by llvm::DwarfCompileUnit::addAddress(), llvm::DwarfCompileUnit::addComplexAddress(), addConstantValue(), llvm::DwarfCompileUnit::addLocationAttribute(), addOpAddress(), llvm::DwarfCompileUnit::addScopeRangeList(), addSectionOffset(), addSourceLine(), addUInt(), applySubprogramAttributes(), applySubprogramDefinitionAttributes(), llvm::DwarfCompileUnit::applyVariableAttributes(), llvm::DwarfDebug::beginModule(), collectCallSiteParameters(), llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE(), constructContainingTypeDIEs(), llvm::DwarfCompileUnit::constructInlinedScopeDIE(), llvm::DwarfCompileUnit::constructLabelDIE(), constructSubprogramArguments(), constructTypeDIE(), llvm::DwarfCompileUnit::createBaseTypeDIEs(), getDIELoc(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), getOrCreateStaticMemberDIE(), getParentContextString(), hasVectorBeenPadded(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
| void DwarfUnit::addUInt | ( | DIEValueList & | Block, |
| dwarf::Form | Form, | ||
| uint64_t | Integer | ||
| ) |
Definition at line 241 of file DwarfUnit.cpp.
References addUInt().
| void DwarfUnit::applySubprogramAttributes | ( | const DISubprogram * | SP, |
| DIE & | SPDie, | ||
| bool | SkipSPAttributes = false |
||
| ) |
Definition at line 1207 of file DwarfUnit.cpp.
References llvm::DwarfDebug::addAccelType(), addBlock(), addDIEEntry(), addFlag(), addSourceLine(), addString(), addThrownTypes(), addType(), addUInt(), applySubprogramDefinitionAttributes(), llvm::AMDGPU::HSAMD::Kernel::Key::Args, Asm, constructSubprogramArguments(), ContainingTypeMap, createAndAddDIE(), CUNode, DD, llvm::dwarf::DW_ACCESS_private, llvm::dwarf::DW_ACCESS_protected, llvm::dwarf::DW_ACCESS_public, llvm::StringRef::empty(), llvm::DISubrange::getCount(), llvm::DICompileUnit::getDebugInfoForProfiling(), getDIE(), getDIELoc(), llvm::DwarfDebug::getDwarfVersion(), llvm::AsmPrinter::getISAEncoding(), getLanguage(), llvm::DIScope::getName(), llvm::DIEUnit::getUnitDie(), IndexTyDie, llvm::isa(), llvm::AMDGPU::HSAMD::Kernel::Key::Language, Name, llvm::None, llvm::DITypeRefArray::size(), and llvm::DwarfDebug::useAppleExtensionAttributes().
Referenced by llvm::DwarfCompileUnit::applySubprogramAttributesToDefinition(), getDIELoc(), and getOrCreateSubprogramDIE().
|
protected |
Definition at line 1164 of file DwarfUnit.cpp.
References addDIEEntry(), addLinkageName(), addTemplateParams(), addUInt(), assert(), DD, DU, llvm::StringRef::empty(), llvm::DwarfFile::getAbstractSPDies(), getDIE(), llvm::DIScope::getFile(), llvm::LinkageName, llvm::None, and llvm::DwarfDebug::useAllLinkageNames().
Referenced by applySubprogramAttributes().
| void DwarfUnit::constructContainingTypeDIEs | ( | ) |
Construct DIEs for types that contain vtables.
Definition at line 1449 of file DwarfUnit.cpp.
References addBlock(), addDIEEntry(), addFlag(), addSourceLine(), addString(), addType(), addUInt(), llvm::DIEValueList::addValue(), Asm, ContainingTypeMap, createAndAddDIE(), D, DD, DIEValueAllocator, llvm::dwarf::DW_ACCESS_private, llvm::dwarf::DW_ACCESS_protected, llvm::dwarf::DW_ACCESS_public, llvm::DIType::getAlignInBytes(), llvm::DebugHandlerBase::getBaseTypeSize(), llvm::AsmPrinter::getDataLayout(), getDIE(), llvm::DwarfDebug::getDwarfVersion(), llvm::DIType::getName(), llvm::DIType::getOffsetInBits(), llvm::DIType::getSizeInBits(), llvm::DINode::getTag(), llvm::DIType::isArtificial(), llvm::DataLayout::isLittleEndian(), llvm::DIType::isPrivate(), llvm::DIType::isProtected(), llvm::DIType::isPublic(), llvm::DIType::isVirtual(), Name, llvm::None, Size, and llvm::DwarfDebug::useDWARF2Bitfields().
Referenced by llvm::DwarfDebug::beginModule(), and getDIELoc().
| void DwarfUnit::constructSubprogramArguments | ( | DIE & | Buffer, |
| DITypeRefArray | Args | ||
| ) |
Construct function argument DIEs.
Definition at line 834 of file DwarfUnit.cpp.
References addFlag(), addType(), addUInt(), Arg, assert(), constructTypeDIE(), createAndAddDIE(), llvm::DISubroutineType::getCC(), getLanguage(), llvm::DIType::isArtificial(), llvm::DIType::isLValueReference(), llvm::DIType::isRValueReference(), llvm::AMDGPU::HSAMD::Kernel::Key::Language, N, and llvm::DITypeRefArray::size().
Referenced by applySubprogramAttributes(), and getDIELoc().
| void DwarfUnit::constructTypeDIE | ( | DIE & | Buffer, |
| const DICompositeType * | CTy | ||
| ) |
Definition at line 882 of file DwarfUnit.cpp.
References addBlock(), addConstantValue(), addDIEEntry(), addFlag(), addOpAddress(), addSInt(), addSourceLine(), addString(), addTemplateParams(), addType(), addUInt(), Asm, assert(), createAndAddDIE(), DD, DIEValueAllocator, llvm::StringRef::empty(), llvm::DIType::getAlignInBytes(), llvm::DICompositeType::getDiscriminator(), llvm::DICompositeType::getElements(), llvm::DIType::getExportSymbols(), llvm::DIType::getName(), llvm::DITemplateParameter::getName(), getOrCreateStaticMemberDIE(), getOrCreateSubprogramDIE(), getOrCreateTypeDIE(), llvm::DICompositeType::getRuntimeLang(), llvm::DIType::getSizeInBits(), llvm::AsmPrinter::getSymbol(), llvm::DINode::getTag(), llvm::DIE::getTag(), llvm::DICompositeType::getTemplateParams(), llvm::DITemplateParameter::getType(), llvm::DITemplateValueParameter::getValue(), llvm::DICompositeType::getVTableHolder(), llvm::DIType::isAppleBlockExtension(), llvm::DIType::isForwardDecl(), llvm::DIType::isObjcClassComplete(), llvm::DIType::isTypePassByReference(), llvm::DIType::isTypePassByValue(), isUnsignedDIType(), Name, llvm::None, Size, and llvm::Tag.
Referenced by llvm::DwarfCompileUnit::applySubprogramAttributesToDefinition(), constructSubprogramArguments(), createTypeDIE(), getHeaderSize(), and getParentContextString().
Create a DIE with the given Tag, add the DIE to its parent, and call insertDIE if MD is not null.
Definition at line 395 of file DwarfUnit.cpp.
References llvm::DIE::addChild(), DIEValueAllocator, llvm::DIE::get(), and insertDIE().
Referenced by addThrownTypes(), applySubprogramAttributes(), llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE(), llvm::DwarfCompileUnit::constructCallSiteEntryDIE(), constructContainingTypeDIEs(), constructSubprogramArguments(), constructTypeDIE(), createTypeDIE(), getDIELoc(), llvm::DwarfCompileUnit::getOrCreateCommonBlock(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), getOrCreateModule(), getOrCreateNameSpace(), getOrCreateStaticMemberDIE(), getOrCreateSubprogramDIE(), and hasVectorBeenPadded().
Creates type DIE with specific context.
Definition at line 649 of file DwarfUnit.cpp.
References llvm::DwarfDebug::addDwarfTypeUnitType(), constructTypeDIE(), createAndAddDIE(), DD, llvm::DwarfDebug::enterNonTypeUnitContext(), llvm::DwarfDebug::generateTypeUnits(), llvm::DwarfTypeUnit::getCU(), llvm::DIType::getRawName(), llvm::DINode::getTag(), llvm::DIType::isForwardDecl(), and X.
Referenced by addRnglistsBase(), getDIELoc(), getHeaderSize(), and getOrCreateTypeDIE().
| DIE * DwarfUnit::createTypeDIE | ( | const DICompositeType * | Ty | ) |
Get context owner's DIE.
Definition at line 633 of file DwarfUnit.cpp.
References constructTypeDIE(), Context, createAndAddDIE(), getDIE(), getOrCreateContextDIE(), llvm::DIType::getScope(), and llvm::DINode::getTag().
|
protected |
Emit the common part of the header for this unit.
Definition at line 1619 of file DwarfUnit.cpp.
References Asm, llvm::AsmPrinter::createTempSymbol(), DD, llvm::AsmPrinter::emitDwarfSymbolReference(), llvm::AsmPrinter::emitInt16(), llvm::AsmPrinter::emitInt32(), llvm::AsmPrinter::emitInt8(), llvm::AsmPrinter::EmitLabelDifference(), EndLabel, llvm::MCSection::getBeginSymbol(), llvm::MCAsmInfo::getCodePointerSize(), llvm::MCObjectFileInfo::getDwarfAbbrevSection(), llvm::DwarfDebug::getDwarfVersion(), llvm::DwarfTypeUnit::getHeaderSize(), llvm::AsmPrinter::getObjFileLowering(), llvm::DIEUnit::getUnitDie(), llvm::AsmPrinter::MAI, llvm::AsmPrinter::OutStreamer, llvm::cl::Prefix, and llvm::DwarfDebug::useSectionsAsReferences().
Referenced by llvm::DwarfCompileUnit::emitHeader(), llvm::DwarfTypeUnit::emitHeader(), and getHeaderSize().
|
pure virtual |
Emit the header for this unit, not including the initial length field.
Implemented in llvm::DwarfTypeUnit, and llvm::DwarfCompileUnit.
Referenced by llvm::DwarfFile::emitUnit(), getHeaderSize(), and llvm::DwarfTypeUnit::setType().
|
inline |
Definition at line 86 of file DwarfUnit.h.
References Asm.
|
pure virtual |
Implemented in llvm::DwarfTypeUnit, and llvm::DwarfCompileUnit.
Referenced by getHeaderSize().
|
inline |
Definition at line 89 of file DwarfUnit.h.
References CUNode.
Referenced by llvm::DwarfDebug::beginModule(), computeIndexValue(), emitRangeList(), llvm::DwarfFile::emitUnit(), forBothCUs(), 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 205 of file DwarfUnit.cpp.
References DU, llvm::DwarfFile::getDIE(), isShareableAcrossCUs(), and MDNodeToDieMap.
Referenced by applySubprogramAttributes(), applySubprogramDefinitionAttributes(), constructContainingTypeDIEs(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), createTypeDIE(), llvm::DwarfCompileUnit::finishSubprogramDefinition(), llvm::DwarfCompileUnit::getOrCreateCommonBlock(), getOrCreateContextDIE(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), getOrCreateModule(), getOrCreateNameSpace(), getOrCreateStaticMemberDIE(), getOrCreateSubprogramDIE(), getOrCreateTypeDIE(), and hasContent().
|
inline |
Returns a fresh newly allocated DIELoc.
Definition at line 121 of file DwarfUnit.h.
References addBlock(), addConstantFPValue(), addConstantValue(), addDIEEntry(), addDIETypeSignature(), addFlag(), addLabel(), addLabelDelta(), addLinkageName(), addOpAddress(), addSectionOffset(), addSInt(), addSourceLine(), addString(), addTemplateParams(), addThrownTypes(), addType(), addUInt(), applySubprogramAttributes(), llvm::AMDGPU::HSAMD::Kernel::Key::Args, constructContainingTypeDIEs(), constructSubprogramArguments(), createAndAddDIE(), createTypeDIE(), DIEValueAllocator, File, G, getOrCreateContextDIE(), getOrCreateModule(), getOrCreateNameSpace(), getOrCreateSubprogramDIE(), getOrCreateTypeDIE(), llvm::MipsISD::Hi, insertDIE(), llvm::Integer, llvm::LinkageName, llvm::MipsISD::Lo, N, llvm::Tag, and Unsigned.
Referenced by applySubprogramAttributes().
|
inline |
Definition at line 91 of file DwarfUnit.h.
References llvm::DwarfDebug::getDwarfVersion().
Referenced by llvm::DwarfCompileUnit::addAddrTableBase().
|
inline |
Definition at line 87 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::DwarfTypeUnit, and llvm::DwarfCompileUnit.
Definition at line 258 of file DwarfUnit.h.
References addRnglistsBase(), addSectionDelta(), addSectionLabel(), addStringOffsetsStart(), constructTypeDIE(), createTypeDIE(), D, emitCommonHeader(), emitHeader(), getCU(), llvm::DwarfDebug::getDwarfVersion(), getMD5AsBytes(), getOrCreateSourceID(), getOrCreateStaticMemberDIE(), and ~DwarfUnit().
Referenced by llvm::DwarfFile::computeSizeAndOffsetsForUnit(), llvm::DwarfCompileUnit::getHeaderSize(), and llvm::DwarfTypeUnit::getHeaderSize().
|
inline |
Definition at line 88 of file DwarfUnit.h.
References llvm::DICompileUnit::getSourceLanguage().
Referenced by applySubprogramAttributes(), computeIndexValue(), constructSubprogramArguments(), getParentContextString(), and ~DwarfUnit().
| Optional< MD5::MD5Result > DwarfUnit::getMD5AsBytes | ( | const DIFile * | File | ) | const |
If the File has an MD5 checksum, return it as an MD5Result allocated in the MCContext.
Definition at line 311 of file DwarfUnit.cpp.
References addSectionOffset(), Asm, assert(), llvm::MD5::MD5Result::Bytes, llvm::copy(), llvm::DIFile::CSK_MD5, DD, File, llvm::fromHex(), llvm::DwarfTypeUnit::getCU(), llvm::DIScope::getDirectory(), llvm::MCContext::getDwarfVersion(), llvm::DwarfDebug::getDwarfVersion(), llvm::MCDwarfDwoLineTable::getFile(), llvm::DIScope::getFilename(), llvm::DwarfCompileUnit::getOrCreateSourceID(), llvm::DIScope::getSource(), llvm::DIEUnit::getUnitDie(), llvm::None, and llvm::AsmPrinter::OutContext.
Referenced by emitRangeList(), getHeaderSize(), and llvm::DwarfCompileUnit::getOrCreateSourceID().
Get context owner's DIE.
Definition at line 619 of file DwarfUnit.cpp.
References getDIE(), getOrCreateModule(), getOrCreateNameSpace(), getOrCreateSubprogramDIE(), getOrCreateTypeDIE(), and llvm::DIEUnit::getUnitDie().
Referenced by collectCallSiteParameters(), llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE(), createTypeDIE(), getDIELoc(), llvm::DwarfCompileUnit::getOrCreateCommonBlock(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), getOrCreateModule(), getOrCreateNameSpace(), getOrCreateStaticMemberDIE(), getOrCreateSubprogramDIE(), and getOrCreateTypeDIE().
Definition at line 1108 of file DwarfUnit.cpp.
References llvm::DwarfTypeUnit::addGlobalName(), addString(), createAndAddDIE(), llvm::StringRef::empty(), llvm::DIModule::getConfigurationMacros(), getDIE(), llvm::DIModule::getIncludePath(), llvm::DIModule::getName(), getOrCreateContextDIE(), llvm::DIModule::getScope(), and llvm::DIModule::getSysRoot().
Referenced by llvm::DwarfCompileUnit::constructImportedEntityDIE(), getDIELoc(), and getOrCreateContextDIE().
| DIE * DwarfUnit::getOrCreateNameSpace | ( | const DINamespace * | NS | ) |
Definition at line 1087 of file DwarfUnit.cpp.
References llvm::DwarfDebug::addAccelNamespace(), addFlag(), llvm::DwarfTypeUnit::addGlobalName(), addString(), createAndAddDIE(), CUNode, DD, llvm::StringRef::empty(), getDIE(), llvm::DINamespace::getExportSymbols(), llvm::DINamespace::getName(), getOrCreateContextDIE(), llvm::DINamespace::getScope(), and Name.
Referenced by llvm::DwarfCompileUnit::constructImportedEntityDIE(), getDIELoc(), 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 getHeaderSize().
|
protected |
Create new static data member DIE.
Definition at line 1572 of file DwarfUnit.cpp.
References addConstantFPValue(), addConstantValue(), addFlag(), addSourceLine(), addString(), addType(), addUInt(), assert(), createAndAddDIE(), llvm::dwarf::DW_ACCESS_private, llvm::dwarf::DW_ACCESS_protected, llvm::dwarf::DW_ACCESS_public, llvm::DIType::getAlignInBytes(), getDIE(), llvm::DIType::getName(), getOrCreateContextDIE(), llvm::DIType::getScope(), llvm::DINode::getTag(), llvm::DIE::getTag(), llvm::DIType::isPrivate(), llvm::DIType::isProtected(), llvm::DIType::isPublic(), and llvm::dwarf::isType().
Referenced by constructTypeDIE(), getHeaderSize(), and llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE().
| DIE * DwarfUnit::getOrCreateSubprogramDIE | ( | const DISubprogram * | SP, |
| bool | Minimal = false |
||
| ) |
Definition at line 1132 of file DwarfUnit.cpp.
References applySubprogramAttributes(), createAndAddDIE(), getDIE(), getOrCreateContextDIE(), llvm::DIScope::getScope(), llvm::DIE::getUnit(), and llvm::DIEUnit::getUnitDie().
Referenced by llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE(), llvm::DwarfCompileUnit::constructCallSiteEntryDIE(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), constructTypeDIE(), getDIELoc(), getOrCreateContextDIE(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
Find existing DIE or create new DIE for the given type.
Definition at line 680 of file DwarfUnit.cpp.
References llvm::DwarfDebug::addAccelType(), llvm::DwarfTypeUnit::addGlobalType(), assert(), Context, createTypeDIE(), CUNode, DD, llvm::dwarf::DW_FLAG_type_implementation, llvm::StringRef::empty(), getDIE(), llvm::DwarfDebug::getDwarfVersion(), llvm::DIType::getName(), getOrCreateContextDIE(), llvm::DIE::getTag(), llvm::DIE::getUnit(), and llvm::DIType::isForwardDecl().
Referenced by addType(), llvm::DwarfDebug::beginModule(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), constructTypeDIE(), getDIELoc(), getOrCreateContextDIE(), and getParentContextString().
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 731 of file DwarfUnit.cpp.
References addDIEEntry(), addSourceLine(), addString(), addType(), addUInt(), constructTypeDIE(), DD, llvm::StringRef::empty(), llvm::DIType::getAlignInBytes(), llvm::DwarfDebug::getDwarfVersion(), llvm::DIBasicType::getEncoding(), getLanguage(), llvm::DIType::getName(), getOrCreateTypeDIE(), llvm::DIScope::getScope(), llvm::DIType::getSizeInBits(), llvm::DINode::getTag(), llvm::DIE::getTag(), llvm::DIType::isBigEndian(), llvm::dwarf::isCPlusPlus(), llvm::DIType::isForwardDecl(), llvm::DIType::isLittleEndian(), llvm::make_range(), Name, llvm::None, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorTemplateCommon< T >::rbegin(), llvm::SmallVectorTemplateCommon< T >::rend(), Size, and llvm::Tag.
Referenced by llvm::DwarfCompileUnit::addGlobalName(), llvm::DwarfCompileUnit::addGlobalNameForTypeUnit(), llvm::DwarfCompileUnit::addGlobalType(), llvm::DwarfCompileUnit::addGlobalTypeUnitType(), and hasContent().
|
inline |
Return true if this compile unit has something to write out.
Definition at line 94 of file DwarfUnit.h.
References addGlobalName(), addGlobalType(), Context, D, getDIE(), getParentContextString(), llvm::DIEUnit::getUnitDie(), llvm::DIE::hasChildren(), and Name.
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 211 of file DwarfUnit.cpp.
References DU, llvm::DwarfFile::insertDIE(), isShareableAcrossCUs(), and MDNodeToDieMap.
Referenced by llvm::DwarfCompileUnit::constructCallSiteParmEntryDIEs(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), llvm::DwarfCompileUnit::constructLabelDIE(), createAndAddDIE(), and getDIELoc().
| void DwarfUnit::insertDIE | ( | DIE * | D | ) |
Definition at line 219 of file DwarfUnit.cpp.
References MDNodeToDieMap.
Check whether the DIE for this MDNode can be shared across CUs.
Definition at line 190 of file DwarfUnit.cpp.
References D, DD, llvm::DwarfDebug::generateTypeUnits(), and llvm::DwarfDebug::shareAcrossDWOCUs().
Referenced by getDIE(), and insertDIE().
|
protected |
|
inline |
Definition at line 252 of file DwarfUnit.h.
References llvm::DwarfDebug::useSegmentedStringOffsetsTable().
Referenced by addString().
|
protected |
Target of Dwarf emission.
Definition at line 49 of file DwarfUnit.h.
Referenced by llvm::DwarfCompileUnit::addAddress(), llvm::DwarfCompileUnit::addAddrTableBase(), addBlock(), llvm::DwarfCompileUnit::addComplexAddress(), addConstantFPValue(), addConstantValue(), llvm::DwarfTypeUnit::addGlobalType(), llvm::DwarfCompileUnit::addLocationAttribute(), addRnglistsBase(), llvm::DwarfCompileUnit::addScopeRangeList(), addSectionLabel(), addString(), addStringOffsetsStart(), applySubprogramAttributes(), llvm::DwarfCompileUnit::constructCallSiteParmEntryDIEs(), constructContainingTypeDIEs(), llvm::DwarfCompileUnit::constructLabelDIE(), constructTypeDIE(), emitCommonHeader(), llvm::DwarfCompileUnit::emitHeader(), llvm::DwarfTypeUnit::emitHeader(), getAsmPrinter(), getMD5AsBytes(), 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 43 of file DwarfUnit.h.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), addString(), applySubprogramAttributes(), llvm::DwarfCompileUnit::constructInlinedScopeDIE(), getCUNode(), getOrCreateNameSpace(), getOrCreateTypeDIE(), llvm::DwarfCompileUnit::hasDwarfPubSections(), llvm::DwarfCompileUnit::initStmtList(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
|
protected |
Definition at line 55 of file DwarfUnit.h.
Referenced by llvm::DwarfCompileUnit::addAddrTableBase(), addBlock(), addConstantValue(), addFlag(), llvm::DwarfCompileUnit::addLabelAddress(), addLinkageName(), llvm::DwarfCompileUnit::addLocalLabelAddress(), llvm::DwarfCompileUnit::addLocationAttribute(), llvm::DwarfCompileUnit::addLocationList(), addOpAddress(), llvm::DwarfCompileUnit::addRange(), addRnglistsBase(), llvm::DwarfCompileUnit::addScopeRangeList(), addSectionDelta(), addSectionLabel(), addSectionOffset(), addString(), applySubprogramAttributes(), llvm::DwarfCompileUnit::applySubprogramAttributesToDefinition(), applySubprogramDefinitionAttributes(), llvm::DwarfCompileUnit::attachRangesOrLowHighPC(), llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE(), llvm::DwarfCompileUnit::constructCallSiteEntryDIE(), constructContainingTypeDIEs(), llvm::DwarfCompileUnit::constructInlinedScopeDIE(), llvm::DwarfCompileUnit::constructLabelDIE(), llvm::DwarfCompileUnit::constructLexicalScopeDIE(), llvm::DwarfCompileUnit::constructScopeDIE(), constructTypeDIE(), createTypeDIE(), emitCommonHeader(), llvm::DwarfCompileUnit::emitHeader(), llvm::DwarfTypeUnit::emitHeader(), llvm::DwarfCompileUnit::getDwarf5OrGNUAttr(), llvm::DwarfCompileUnit::getDwarf5OrGNULocationAtom(), llvm::DwarfCompileUnit::getDwarf5OrGNUTag(), getMD5AsBytes(), getOrCreateNameSpace(), getOrCreateTypeDIE(), getParentContextString(), llvm::DwarfCompileUnit::hasDwarfPubSections(), hasVectorBeenPadded(), llvm::DwarfCompileUnit::includeMinimalInlineScopes(), llvm::DwarfCompileUnit::initStmtList(), isShareableAcrossCUs(), llvm::DwarfCompileUnit::updateSubprogramScopeDIE(), and ~DwarfUnit().
|
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 46 of file DwarfUnit.h.
Referenced by llvm::DwarfCompileUnit::addAddress(), llvm::DwarfCompileUnit::addAddressExpr(), llvm::DwarfCompileUnit::addBaseTypeRef(), addBlock(), llvm::DwarfCompileUnit::addComplexAddress(), addConstantFPValue(), addConstantValue(), addDIEEntry(), addDIETypeSignature(), llvm::DwarfCompileUnit::addExpr(), addFlag(), addLabel(), llvm::DwarfCompileUnit::addLabelAddress(), addLabelDelta(), llvm::DwarfCompileUnit::addLocalLabelAddress(), llvm::DwarfCompileUnit::addLocationAttribute(), llvm::DwarfCompileUnit::addLocationList(), addSectionDelta(), addSInt(), addString(), addUInt(), llvm::DwarfCompileUnit::applyStmtList(), llvm::DwarfCompileUnit::constructCallSiteParmEntryDIEs(), constructContainingTypeDIEs(), llvm::DwarfCompileUnit::constructImportedEntityDIE(), llvm::DwarfCompileUnit::constructInlinedScopeDIE(), llvm::DwarfCompileUnit::constructLabelDIE(), llvm::DwarfCompileUnit::constructLexicalScopeDIE(), llvm::DwarfCompileUnit::constructSubprogramScopeDIE(), constructTypeDIE(), 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::createScopeChildrenDIE(), 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 emitCommonHeader(), and getEndLabel().
|
protected |
An anonymous type for index type. Owned by DIEUnit.
Definition at line 59 of file DwarfUnit.h.
Referenced by applySubprogramAttributes().
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().
1.8.13