|
LLVM
3.7.0
|
#include <DwarfCompileUnit.h>
Public Member Functions | |
| DwarfCompileUnit (unsigned UID, const DICompileUnit *Node, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU) | |
| DwarfCompileUnit * | getSkeleton () const |
| void | initStmtList () |
| void | applyStmtList (DIE &D) |
| Apply the DW_AT_stmt_list from this compile unit to the specified DIE. More... | |
| DIE * | getOrCreateGlobalVariableDIE (const DIGlobalVariable *GV) |
| getOrCreateGlobalVariableDIE - get or create global variable DIE. More... | |
| void | addLabelAddress (DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Label) |
| addLabelAddress - Add a dwarf label attribute data and value using either DW_FORM_addr or DW_FORM_GNU_addr_index. More... | |
| void | addLocalLabelAddress (DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Label) |
| addLocalLabelAddress - Add a dwarf label attribute data and value using DW_FORM_addr only. More... | |
| 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... | |
| DwarfCompileUnit & | getCU () override |
| unsigned | getOrCreateSourceID (StringRef FileName, StringRef DirName) override |
| Look up the source ID with the given directory and source file names. More... | |
| void | addRange (RangeSpan Range) |
| addRange - Add an address range to the list of ranges for this unit. More... | |
| void | attachLowHighPC (DIE &D, const MCSymbol *Begin, const MCSymbol *End) |
| DIE::value_iterator | addSectionLabel (DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Label, const MCSymbol *Sec) |
| addSectionLabel - Add a Dwarf section label attribute data and value. More... | |
| DIE & | updateSubprogramScopeDIE (const DISubprogram *SP) |
| Find DIE for the given subprogram and attach appropriate DW_AT_low_pc and DW_AT_high_pc attributes. More... | |
| void | constructScopeDIE (LexicalScope *Scope, SmallVectorImpl< DIE * > &FinalChildren) |
| void | addScopeRangeList (DIE &ScopeDIE, SmallVector< RangeSpan, 2 > Range) |
| A helper function to construct a RangeSpanList for a given lexical scope. More... | |
| void | attachRangesOrLowHighPC (DIE &D, SmallVector< RangeSpan, 2 > Ranges) |
| void | attachRangesOrLowHighPC (DIE &D, const SmallVectorImpl< InsnRange > &Ranges) |
| DIE * | constructInlinedScopeDIE (LexicalScope *Scope) |
| This scope represents inlined body of a function. More... | |
| DIE * | constructLexicalScopeDIE (LexicalScope *Scope) |
| Construct new DW_TAG_lexical_block for this scope and attach DW_AT_low_pc/DW_AT_high_pc labels. More... | |
| DIE * | constructVariableDIE (DbgVariable &DV, bool Abstract=false) |
| constructVariableDIE - Construct a DIE for the given DbgVariable. More... | |
| DIE * | constructVariableDIE (DbgVariable &DV, const LexicalScope &Scope, DIE *&ObjectPointer) |
| DIE * | createScopeChildrenDIE (LexicalScope *Scope, SmallVectorImpl< DIE * > &Children, unsigned *ChildScopeCount=nullptr) |
| A helper function to create children of a Scope DIE. More... | |
| void | constructSubprogramScopeDIE (LexicalScope *Scope) |
| Construct a DIE for this subprogram scope. More... | |
| DIE * | createAndAddScopeChildren (LexicalScope *Scope, DIE &ScopeDIE) |
| void | constructAbstractSubprogramScopeDIE (LexicalScope *Scope) |
| DIE * | constructImportedEntityDIE (const DIImportedEntity *Module) |
| Construct import_module DIE. More... | |
| void | finishSubprogramDefinition (const DISubprogram *SP) |
| void | collectDeadVariables (const DISubprogram *SP) |
| void | setSkeleton (DwarfCompileUnit &Skel) |
| Set the skeleton unit associated with this unit. More... | |
| const MCSymbol * | getSectionSym () const |
| unsigned | getLength () |
| void | emitHeader (bool UseOffsets) override |
| Emit the header for this unit, not including the initial length field. More... | |
| MCSymbol * | getLabelBegin () const |
| void | addGlobalName (StringRef Name, DIE &Die, const DIScope *Context) override |
| Add a new global name to the compile unit. More... | |
| void | addGlobalType (const DIType *Ty, const DIE &Die, const DIScope *Context) override |
| Add a new global type to the compile unit. More... | |
| const StringMap< const DIE * > & | getGlobalNames () const |
| const StringMap< const DIE * > & | getGlobalTypes () const |
| void | addVariableAddress (const DbgVariable &DV, DIE &Die, MachineLocation Location) |
| Add DW_AT_location attribute for a DbgVariable based on provided MachineLocation. More... | |
| void | addAddress (DIE &Die, dwarf::Attribute Attribute, const MachineLocation &Location) |
| Add an address attribute to a die based on the location provided. More... | |
| void | addComplexAddress (const DbgVariable &DV, DIE &Die, dwarf::Attribute Attribute, const MachineLocation &Location) |
| Start with the address based on the location provided, and generate the DWARF information necessary to find the actual variable (navigating the extra location information encoded in the type) based on the starting location. More... | |
| void | addLocationList (DIE &Die, dwarf::Attribute Attribute, unsigned Index) |
| Add a Dwarf loclistptr attribute data and value. More... | |
| void | applyVariableAttributes (const DbgVariable &Var, DIE &VariableDie) |
| void | addExpr (DIELoc &Die, dwarf::Form Form, const MCExpr *Expr) |
| Add a Dwarf expression attribute data and value. More... | |
| void | applySubprogramAttributesToDefinition (const DISubprogram *SP, DIE &SPDie) |
| const SmallVectorImpl < RangeSpanList > & | getRangeLists () const |
| getRangeLists - Get the vector of range lists. More... | |
| const SmallVectorImpl < RangeSpan > & | getRanges () const |
| getRanges - Get the list of ranges for this unit. More... | |
| SmallVector< RangeSpan, 2 > | takeRanges () |
| void | setBaseAddress (const MCSymbol *Base) |
| const MCSymbol * | getBaseAddress () const |
Public Member Functions inherited from llvm::DwarfUnit | |
| virtual | ~DwarfUnit () |
| void | initSection (MCSection *Section) |
| MCSection * | getSection () const |
| AsmPrinter * | getAsmPrinter () const |
| unsigned | getUniqueID () const |
| uint16_t | getLanguage () const |
| const DICompileUnit * | getCUNode () const |
| DIE & | getUnitDie () |
| unsigned | getDebugInfoOffset () const |
| void | setDebugInfoOffset (unsigned DbgInfoOff) |
| 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... | |
| void | addAccelNamespace (StringRef Name, const DIE &Die) |
| Add a new name to the namespace accelerator table. 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 | addFlag (DIE &Die, dwarf::Attribute Attribute) |
| Add a flag that is true to the DIE. More... | |
| void | addUInt (DIE &Die, dwarf::Attribute Attribute, Optional< dwarf::Form > Form, uint64_t Integer) |
| Add an unsigned integer attribute data and value. More... | |
| void | addUInt (DIE &Block, dwarf::Form Form, uint64_t Integer) |
| void | addSInt (DIE &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... | |
| DIE::value_iterator | addLabel (DIE &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 *Label) |
| 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, const DwarfTypeUnit &Type) |
| void | addBlock (DIE &Die, dwarf::Attribute Attribute, DIELoc *Block) |
| Add block data. More... | |
| void | addBlock (DIE &Die, dwarf::Attribute Attribute, DIEBlock *Block) |
| Add block data. More... | |
| void | addSourceLine (DIE &Die, unsigned Line, StringRef File, StringRef Directory) |
| 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 DIType *Ty) |
| void | addSourceLine (DIE &Die, const DINamespace *NS) |
| 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, 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... | |
| bool | addRegisterOpPiece (DIELoc &TheDie, unsigned Reg, unsigned SizeInBits=0, unsigned OffsetInBits=0) |
| Add register operand. More... | |
| bool | addRegisterOffset (DIELoc &TheDie, unsigned Reg, int64_t Offset) |
| Add register offset. More... | |
| void | addBlockByrefAddress (const DbgVariable &DV, DIE &Die, dwarf::Attribute Attribute, const MachineLocation &Location) |
| Start with the address based on the location provided, and generate the DWARF information necessary to find the actual Block variable (navigating the Block struct) based on the starting location. 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 Minimal=false) |
| DIE * | getOrCreateTypeDIE (const MDNode *N) |
| Find existing DIE or create new DIE for the given type. More... | |
| DIE * | createTypeDIE (const DICompositeType *Ty) |
| Get context owner's DIE. 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... | |
| virtual unsigned | getHeaderSize () const |
| Compute the size of a header for this unit, not including the initial length field. More... | |
| void | constructTypeDIE (DIE &Buffer, const DICompositeType *CTy) |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::DwarfUnit | |
| DwarfUnit (unsigned UID, dwarf::Tag, const DICompileUnit *CU, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU) | |
| void | addLocalString (DIE &Die, dwarf::Attribute Attribute, StringRef Str) |
| Add a string attribute data and value. More... | |
| void | addIndexedString (DIE &Die, dwarf::Attribute Attribute, StringRef Str) |
| bool | applySubprogramDefinitionAttributes (const DISubprogram *SP, DIE &SPDie) |
| DIE * | getOrCreateStaticMemberDIE (const DIDerivedType *DT) |
| Create new static data member DIE. More... | |
| template<typename T > | |
| T * | resolve (TypedDINodeRef< T > Ref) const |
| Look in the DwarfDebug map for the MDNode that corresponds to the reference. More... | |
Protected Attributes inherited from llvm::DwarfUnit | |
| unsigned | UniqueID |
| A numeric ID unique among all CUs in the module. More... | |
| const DICompileUnit * | CUNode |
| MDNode for the compile unit. More... | |
| BumpPtrAllocator | DIEValueAllocator |
| DIE & | UnitDie |
| Unit debug information entry. More... | |
| unsigned | DebugInfoOffset |
| Offset of the UnitDie from beginning of debug info section. More... | |
| AsmPrinter * | Asm |
| Target of Dwarf emission. More... | |
| DwarfDebug * | DD |
| DwarfFile * | DU |
| DIE * | IndexTyDie |
| An anonymous type for index type. Owned by UnitDie. 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... | |
| MCSection * | Section |
| The section this unit will be emitted in. More... | |
Definition at line 31 of file DwarfCompileUnit.h.
| llvm::DwarfCompileUnit::DwarfCompileUnit | ( | unsigned | UID, |
| const DICompileUnit * | Node, | ||
| AsmPrinter * | A, | ||
| DwarfDebug * | DW, | ||
| DwarfFile * | DWU | ||
| ) |
Definition at line 19 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::getUnitDie(), and llvm::DwarfUnit::insertDIE().
| void llvm::DwarfCompileUnit::addAddress | ( | DIE & | Die, |
| dwarf::Attribute | Attribute, | ||
| const MachineLocation & | Location | ||
| ) |
Add an address attribute to a die based on the location provided.
Definition at line 740 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addBlock(), llvm::DwarfUnit::addRegisterOffset(), llvm::DwarfUnit::addRegisterOpPiece(), llvm::DwarfUnit::DIEValueAllocator, llvm::MachineLocation::getOffset(), llvm::MachineLocation::getReg(), and llvm::MachineLocation::isReg().
Referenced by addVariableAddress(), and updateSubprogramScopeDIE().
| void llvm::DwarfCompileUnit::addComplexAddress | ( | const DbgVariable & | DV, |
| DIE & | Die, | ||
| dwarf::Attribute | Attribute, | ||
| const MachineLocation & | Location | ||
| ) |
Start with the address based on the location provided, and generate the DWARF information necessary to find the actual variable (navigating the extra location information encoded in the type) based on the starting location.
Start with the address based on the location provided, and generate the DWARF information necessary to find the actual variable given the extra address information encoded in the DbgVariable, starting from the starting location.
Add the DWARF information to the die.
Definition at line 761 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addBlock(), llvm::DwarfExpression::AddExpression(), llvm::DwarfExpression::AddMachineRegExpression(), llvm::DwarfExpression::AddMachineRegIndirect(), llvm::DwarfUnit::Asm, llvm::DwarfUnit::DIEValueAllocator, llvm::DbgVariable::getExpression(), llvm::MachineLocation::getOffset(), and llvm::MachineLocation::getReg().
Referenced by addVariableAddress().
| void llvm::DwarfCompileUnit::addExpr | ( | DIELoc & | Die, |
| dwarf::Form | Form, | ||
| const MCExpr * | Expr | ||
| ) |
Add a Dwarf expression attribute data and value.
Definition at line 802 of file DwarfCompileUnit.cpp.
References llvm::DIE::addValue(), and llvm::DwarfUnit::DIEValueAllocator.
Referenced by getOrCreateGlobalVariableDIE().
|
overridevirtual |
Add a new global name to the compile unit.
addGlobalName - Add a new global name to the compile unit.
Reimplemented from llvm::DwarfUnit.
Definition at line 710 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::getParentContextString(), and llvm::StringRef::str().
Referenced by applySubprogramAttributesToDefinition(), and getOrCreateGlobalVariableDIE().
|
overridevirtual |
Add a new global type to the compile unit.
Add a new global type to the unit.
Reimplemented from llvm::DwarfUnit.
Definition at line 719 of file DwarfCompileUnit.cpp.
References llvm::DIType::getName(), llvm::DwarfUnit::getParentContextString(), and llvm::StringRef::str().
| void llvm::DwarfCompileUnit::addLabelAddress | ( | DIE & | Die, |
| dwarf::Attribute | Attribute, | ||
| const MCSymbol * | Label | ||
| ) |
addLabelAddress - Add a dwarf label attribute data and value using either DW_FORM_addr or DW_FORM_GNU_addr_index.
addLabelAddress - Add a dwarf label attribute data and value using DW_FORM_addr or DW_FORM_GNU_addr_index.
Definition at line 30 of file DwarfCompileUnit.cpp.
References llvm::DwarfDebug::addArangeLabel(), addLocalLabelAddress(), llvm::DIE::addValue(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, llvm::dwarf::DW_FORM_GNU_addr_index, llvm::DwarfDebug::getAddressPool(), llvm::AddressPool::getIndex(), and llvm::DwarfDebug::useSplitDwarf().
Referenced by attachLowHighPC().
| void llvm::DwarfCompileUnit::addLocalLabelAddress | ( | DIE & | Die, |
| dwarf::Attribute | Attribute, | ||
| const MCSymbol * | Label | ||
| ) |
addLocalLabelAddress - Add a dwarf label attribute data and value using DW_FORM_addr only.
Definition at line 49 of file DwarfCompileUnit.cpp.
References llvm::DwarfDebug::addArangeLabel(), llvm::DIE::addValue(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, and llvm::dwarf::DW_FORM_addr.
Referenced by addLabelAddress().
| void llvm::DwarfCompileUnit::addLocationList | ( | DIE & | Die, |
| dwarf::Attribute | Attribute, | ||
| unsigned | Index | ||
| ) |
Add a Dwarf loclistptr attribute data and value.
Definition at line 783 of file DwarfCompileUnit.cpp.
References llvm::DIE::addValue(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, llvm::dwarf::DW_FORM_data4, llvm::dwarf::DW_FORM_sec_offset, and llvm::DwarfDebug::getDwarfVersion().
| void llvm::DwarfCompileUnit::addRange | ( | RangeSpan | Range | ) |
addRange - Add an address range to the list of ranges for this unit.
Definition at line 214 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::DD, llvm::RangeSpan::getEnd(), llvm::DwarfDebug::getPrevCU(), llvm::MCSymbol::getSection(), and llvm::DwarfDebug::setPrevCU().
| void llvm::DwarfCompileUnit::addScopeRangeList | ( | DIE & | ScopeDIE, |
| SmallVector< RangeSpan, 2 > | Range | ||
| ) |
A helper function to construct a RangeSpanList for a given lexical scope.
Definition at line 374 of file DwarfCompileUnit.cpp.
References addSectionDelta(), addSectionLabel(), llvm::DwarfUnit::Asm, llvm::AsmPrinter::createTempSymbol(), llvm::dwarf::DW_AT_ranges, llvm::MCSection::getBeginSymbol(), llvm::MCObjectFileInfo::getDwarfRangesSection(), llvm::AsmPrinter::getObjFileLowering(), and llvm::tgtok::List.
Referenced by attachRangesOrLowHighPC().
| DIE::value_iterator llvm::DwarfCompileUnit::addSectionDelta | ( | DIE & | Die, |
| dwarf::Attribute | Attribute, | ||
| const MCSymbol * | Hi, | ||
| const MCSymbol * | Lo | ||
| ) |
addSectionDelta - Add a label delta attribute data and value.
Definition at line 366 of file DwarfCompileUnit.cpp.
References llvm::DIE::addValue(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, llvm::dwarf::DW_FORM_data4, llvm::dwarf::DW_FORM_sec_offset, and llvm::DwarfDebug::getDwarfVersion().
Referenced by addScopeRangeList(), and addSectionLabel().
| DIE::value_iterator llvm::DwarfCompileUnit::addSectionLabel | ( | DIE & | Die, |
| dwarf::Attribute | Attribute, | ||
| const MCSymbol * | Label, | ||
| const MCSymbol * | Sec | ||
| ) |
addSectionLabel - Add a Dwarf section label attribute data and value.
Definition at line 232 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addLabel(), addSectionDelta(), llvm::DwarfUnit::Asm, llvm::DwarfUnit::DD, llvm::MCAsmInfo::doesDwarfUseRelocationsAcrossSections(), llvm::dwarf::DW_FORM_data4, llvm::dwarf::DW_FORM_sec_offset, llvm::DwarfDebug::getDwarfVersion(), llvm::Label, and llvm::AsmPrinter::MAI.
Referenced by addScopeRangeList(), and initStmtList().
| void llvm::DwarfCompileUnit::addVariableAddress | ( | const DbgVariable & | DV, |
| DIE & | Die, | ||
| MachineLocation | Location | ||
| ) |
Add DW_AT_location attribute for a DbgVariable based on provided MachineLocation.
addVariableAddress - Add DW_AT_location attribute for a DbgVariable based on provided MachineLocation.
Definition at line 729 of file DwarfCompileUnit.cpp.
References addAddress(), llvm::DwarfUnit::addBlockByrefAddress(), addComplexAddress(), llvm::dwarf::DW_AT_location, llvm::DbgVariable::hasComplexAddress(), and llvm::DbgVariable::isBlockByrefVariable().
| void llvm::DwarfCompileUnit::applyStmtList | ( | DIE & | D | ) |
Apply the DW_AT_stmt_list from this compile unit to the specified DIE.
Definition at line 258 of file DwarfCompileUnit.cpp.
References llvm::DIE::addValue(), and llvm::DwarfUnit::DIEValueAllocator.
Referenced by llvm::DwarfDebug::addDwarfTypeUnitType().
| void llvm::DwarfCompileUnit::applySubprogramAttributesToDefinition | ( | const DISubprogram * | SP, |
| DIE & | SPDie | ||
| ) |
Definition at line 807 of file DwarfCompileUnit.cpp.
References addGlobalName(), llvm::DwarfUnit::applySubprogramAttributes(), llvm::DIScope::getName(), llvm::DIScope::getScope(), and llvm::DwarfUnit::resolve().
Referenced by constructAbstractSubprogramScopeDIE(), and finishSubprogramDefinition().
| void llvm::DwarfCompileUnit::applyVariableAttributes | ( | const DbgVariable & | Var, |
| DIE & | VariableDie | ||
| ) |
Definition at line 790 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addFlag(), llvm::DwarfUnit::addSourceLine(), llvm::DwarfUnit::addString(), llvm::DwarfUnit::addType(), llvm::dwarf::DW_AT_artificial, llvm::dwarf::DW_AT_name, llvm::StringRef::empty(), llvm::DbgVariable::getName(), llvm::DbgVariable::getType(), llvm::DbgVariable::getVariable(), and llvm::DbgVariable::isArtificial().
Referenced by collectDeadVariables().
| void llvm::DwarfCompileUnit::attachLowHighPC | ( | DIE & | D, |
| const MCSymbol * | Begin, | ||
| const MCSymbol * | End | ||
| ) |
Definition at line 262 of file DwarfCompileUnit.cpp.
References addLabelAddress(), llvm::DwarfUnit::addLabelDelta(), llvm::DwarfUnit::DD, llvm::dwarf::DW_AT_high_pc, llvm::dwarf::DW_AT_low_pc, llvm::DwarfDebug::getDwarfVersion(), and llvm::MCSymbol::isDefined().
Referenced by attachRangesOrLowHighPC(), and updateSubprogramScopeDIE().
| void llvm::DwarfCompileUnit::attachRangesOrLowHighPC | ( | DIE & | D, |
| SmallVector< RangeSpan, 2 > | Ranges | ||
| ) |
Definition at line 398 of file DwarfCompileUnit.cpp.
References addScopeRangeList(), attachLowHighPC(), llvm::SmallVectorTemplateCommon< T >::front(), and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by attachRangesOrLowHighPC(), constructInlinedScopeDIE(), and constructLexicalScopeDIE().
| void llvm::DwarfCompileUnit::attachRangesOrLowHighPC | ( | DIE & | D, |
| const SmallVectorImpl< InsnRange > & | Ranges | ||
| ) |
Definition at line 407 of file DwarfCompileUnit.cpp.
References attachRangesOrLowHighPC(), llvm::DwarfUnit::DD, llvm::DwarfDebug::getLabelAfterInsn(), llvm::DwarfDebug::getLabelBeforeInsn(), llvm::tgtok::List, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorImpl< T >::reserve(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
| void llvm::DwarfCompileUnit::collectDeadVariables | ( | const DISubprogram * | SP | ) |
Definition at line 679 of file DwarfCompileUnit.cpp.
References llvm::DIE::addChild(), applyVariableAttributes(), constructVariableDIE(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DU, llvm::DwarfFile::getAbstractSPDies(), and llvm::DwarfUnit::getDIE().
| void llvm::DwarfCompileUnit::constructAbstractSubprogramScopeDIE | ( | LexicalScope * | Scope | ) |
Definition at line 601 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addDIEEntry(), llvm::DwarfUnit::addUInt(), applySubprogramAttributesToDefinition(), llvm::DwarfUnit::createAndAddDIE(), createAndAddScopeChildren(), llvm::DwarfUnit::DU, llvm::dwarf::DW_AT_inline, llvm::dwarf::DW_AT_object_pointer, llvm::dwarf::DW_INL_inlined, llvm::DwarfFile::getAbstractSPDies(), llvm::DwarfUnit::getOrCreateContextDIE(), llvm::DwarfUnit::getOrCreateSubprogramDIE(), llvm::LexicalScope::getScopeNode(), llvm::DwarfUnit::getUnitDie(), llvm::None, llvm::DwarfUnit::resolve(), and llvm::SP.
| DIE * llvm::DwarfCompileUnit::constructImportedEntityDIE | ( | const DIImportedEntity * | Module | ) |
Construct import_module DIE.
Definition at line 633 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addDIEEntry(), llvm::DwarfUnit::addSourceLine(), llvm::DwarfUnit::addString(), llvm::DwarfUnit::DIEValueAllocator, llvm::dwarf::DW_AT_import, llvm::dwarf::DW_AT_name, llvm::StringRef::empty(), llvm::DIE::get(), llvm::DwarfUnit::getDIE(), llvm::DIScope::getDirectory(), llvm::DIImportedEntity::getEntity(), llvm::DIScope::getFilename(), llvm::DIImportedEntity::getLine(), llvm::DIImportedEntity::getName(), getOrCreateGlobalVariableDIE(), llvm::DwarfUnit::getOrCreateModule(), llvm::DwarfUnit::getOrCreateNameSpace(), llvm::DwarfUnit::getOrCreateSubprogramDIE(), llvm::DwarfUnit::getOrCreateTypeDIE(), llvm::DIImportedEntity::getScope(), llvm::DINode::getTag(), llvm::DwarfUnit::insertDIE(), llvm::DwarfUnit::resolve(), and llvm::SP.
Referenced by constructScopeDIE().
| DIE * llvm::DwarfCompileUnit::constructInlinedScopeDIE | ( | LexicalScope * | Scope | ) |
This scope represents inlined body of a function.
Construct DIE to represent this concrete inlined copy of the function.
Definition at line 419 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addDIEEntry(), llvm::DwarfDebug::addSubprogramNames(), llvm::DwarfUnit::addUInt(), attachRangesOrLowHighPC(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, llvm::DS, llvm::DwarfUnit::DU, llvm::dwarf::DW_AT_abstract_origin, llvm::dwarf::DW_AT_call_file, llvm::dwarf::DW_AT_call_line, llvm::DIE::get(), llvm::DwarfFile::getAbstractSPDies(), llvm::getDISubprogram(), llvm::LexicalScope::getInlinedAt(), getOrCreateSourceID(), llvm::LexicalScope::getRanges(), llvm::LexicalScope::getScopeNode(), and llvm::None.
Referenced by constructScopeDIE().
| DIE * llvm::DwarfCompileUnit::constructLexicalScopeDIE | ( | LexicalScope * | Scope | ) |
Construct new DW_TAG_lexical_block for this scope and attach DW_AT_low_pc/DW_AT_high_pc labels.
Definition at line 448 of file DwarfCompileUnit.cpp.
References attachRangesOrLowHighPC(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, llvm::DIE::get(), llvm::LexicalScope::getRanges(), llvm::LexicalScope::isAbstractScope(), and llvm::DwarfDebug::isLexicalScopeDIENull().
Referenced by constructScopeDIE().
| void llvm::DwarfCompileUnit::constructScopeDIE | ( | LexicalScope * | Scope, |
| SmallVectorImpl< DIE * > & | FinalChildren | ||
| ) |
Definition at line 303 of file DwarfCompileUnit.cpp.
References llvm::DIE::addChild(), constructImportedEntityDIE(), constructInlinedScopeDIE(), constructLexicalScopeDIE(), createScopeChildrenDIE(), llvm::DwarfUnit::DD, llvm::DS, llvm::SmallVectorTemplateCommon< T >::end(), llvm::DwarfDebug::findImportedEntitiesForScope(), llvm::LexicalScope::getInlinedAt(), llvm::LexicalScope::getParent(), llvm::LexicalScope::getScopeNode(), I, llvm::SmallVectorImpl< T >::insert(), llvm::DwarfDebug::isLexicalScopeDIENull(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
Referenced by createScopeChildrenDIE().
| void llvm::DwarfCompileUnit::constructSubprogramScopeDIE | ( | LexicalScope * | Scope | ) |
Construct a DIE for this subprogram scope.
Definition at line 559 of file DwarfCompileUnit.cpp.
References llvm::DIE::addChild(), llvm::DwarfUnit::addDIEEntry(), createAndAddScopeChildren(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, llvm::dwarf::DW_AT_object_pointer, llvm::DIE::get(), llvm::LexicalScope::getInlinedAt(), llvm::DwarfDebug::getProcessedSPNodes(), llvm::LexicalScope::getScopeNode(), llvm::LexicalScope::isAbstractScope(), llvm::DITypeRefArray::size(), and updateSubprogramScopeDIE().
| DIE * llvm::DwarfCompileUnit::constructVariableDIE | ( | DbgVariable & | DV, |
| bool | Abstract = false |
||
| ) |
constructVariableDIE - Construct a DIE for the given DbgVariable.
Definition at line 462 of file DwarfCompileUnit.cpp.
References llvm::DbgVariable::setDIE().
Referenced by collectDeadVariables(), constructVariableDIE(), and createScopeChildrenDIE().
| DIE * llvm::DwarfCompileUnit::constructVariableDIE | ( | DbgVariable & | DV, |
| const LexicalScope & | Scope, | ||
| DIE *& | ObjectPointer | ||
| ) |
Definition at line 531 of file DwarfCompileUnit.cpp.
References constructVariableDIE(), llvm::LexicalScope::isAbstractScope(), and llvm::DbgVariable::isObjectPointer().
| DIE * llvm::DwarfCompileUnit::createAndAddScopeChildren | ( | LexicalScope * | Scope, |
| DIE & | ScopeDIE | ||
| ) |
Definition at line 587 of file DwarfCompileUnit.cpp.
References llvm::DIE::addChild(), createScopeChildrenDIE(), and I.
Referenced by constructAbstractSubprogramScopeDIE(), and constructSubprogramScopeDIE().
| DIE * llvm::DwarfCompileUnit::createScopeChildrenDIE | ( | LexicalScope * | Scope, |
| SmallVectorImpl< DIE * > & | Children, | ||
| unsigned * | ChildScopeCount = nullptr |
||
| ) |
A helper function to create children of a Scope DIE.
Definition at line 540 of file DwarfCompileUnit.cpp.
References constructScopeDIE(), constructVariableDIE(), llvm::DwarfUnit::DU, llvm::LexicalScope::getChildren(), llvm::DwarfFile::getScopeVariables(), llvm::AArch64CC::LS, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by constructScopeDIE(), and createAndAddScopeChildren().
|
overridevirtual |
Emit the header for this unit, not including the initial length field.
Reimplemented from llvm::DwarfUnit.
Definition at line 699 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::Asm, llvm::AsmPrinter::createTempSymbol(), llvm::DwarfUnit::emitHeader(), and llvm::AsmPrinter::OutStreamer.
| void llvm::DwarfCompileUnit::finishSubprogramDefinition | ( | const DISubprogram * | SP | ) |
Definition at line 662 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addDIEEntry(), applySubprogramAttributesToDefinition(), llvm::DwarfUnit::DU, llvm::dwarf::DW_AT_abstract_origin, llvm::DwarfFile::getAbstractSPDies(), llvm::DwarfUnit::getDIE(), and llvm::DwarfUnit::getOrCreateSubprogramDIE().
Definition at line 228 of file DwarfCompileUnit.h.
|
inlineoverridevirtual |
Implements llvm::DwarfUnit.
Definition at line 97 of file DwarfCompileUnit.h.
Definition at line 189 of file DwarfCompileUnit.h.
Definition at line 190 of file DwarfCompileUnit.h.
|
inline |
Definition at line 177 of file DwarfCompileUnit.h.
References llvm::DwarfUnit::Section.
|
inline |
Definition at line 170 of file DwarfCompileUnit.h.
References llvm::DwarfUnit::getHeaderSize(), llvm::DIE::getSize(), and llvm::DwarfUnit::UnitDie.
| DIE * llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE | ( | const DIGlobalVariable * | GV | ) |
getOrCreateGlobalVariableDIE - get or create global variable DIE.
Definition at line 103 of file DwarfCompileUnit.cpp.
References llvm::DwarfDebug::addAccelName(), llvm::DwarfDebug::addArangeLabel(), llvm::DwarfUnit::addBlock(), llvm::DwarfUnit::addConstantValue(), llvm::DwarfUnit::addDIEEntry(), addExpr(), llvm::DwarfUnit::addFlag(), addGlobalName(), llvm::DwarfUnit::addLinkageName(), llvm::DwarfUnit::addOpAddress(), llvm::DwarfUnit::addSourceLine(), llvm::DwarfUnit::addString(), llvm::DwarfUnit::addType(), llvm::DwarfUnit::addUInt(), llvm::DwarfUnit::Asm, llvm::DwarfUnit::createAndAddDIE(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, llvm::dwarf::DW_AT_declaration, llvm::dwarf::DW_AT_external, llvm::dwarf::DW_AT_location, llvm::dwarf::DW_AT_name, llvm::dwarf::DW_AT_specification, llvm::dwarf::DW_FORM_data1, llvm::dwarf::DW_FORM_udata, llvm::DwarfDebug::getAddressPool(), llvm::AsmPrinter::getDataLayout(), llvm::TargetLoweringObjectFile::getDebugThreadLocalSymbol(), llvm::DwarfUnit::getDIE(), llvm::DIGlobalVariable::getDisplayName(), llvm::AddressPool::getIndex(), llvm::DataLayout::getIndexedOffset(), llvm::DIGlobalVariable::getLinkageName(), llvm::getMergedGlobalExpr(), llvm::DIVariable::getName(), llvm::AsmPrinter::getObjFileLowering(), llvm::DwarfUnit::getOrCreateContextDIE(), llvm::DwarfUnit::getOrCreateStaticMemberDIE(), llvm::DataLayout::getPointerSize(), llvm::DIVariable::getScope(), llvm::DIGlobalVariable::getStaticDataMemberDeclaration(), llvm::AsmPrinter::getSymbol(), llvm::DINode::getTag(), llvm::Value::getType(), llvm::DIVariable::getType(), llvm::DIGlobalVariable::getVariable(), llvm::Global, llvm::DIGlobalVariable::isDefinition(), llvm::DIGlobalVariable::isLocalToUnit(), llvm::DwarfUnit::resolve(), llvm::DwarfDebug::resolve(), llvm::DwarfDebug::useGNUTLSOpcode(), and llvm::DwarfDebug::useSplitDwarf().
Referenced by constructImportedEntityDIE().
|
overridevirtual |
Look up the source ID with the given directory and source file names.
If none currently exists, create a new ID and insert it in the line table.
Implements llvm::DwarfUnit.
Definition at line 63 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::Asm, llvm::DwarfUnit::getUniqueID(), and llvm::AsmPrinter::OutStreamer.
Referenced by constructInlinedScopeDIE().
|
inline |
getRangeLists - Get the vector of range lists.
Definition at line 219 of file DwarfCompileUnit.h.
|
inline |
getRanges - Get the list of ranges for this unit.
Definition at line 224 of file DwarfCompileUnit.h.
Definition at line 165 of file DwarfCompileUnit.h.
References llvm::MCSection::getBeginSymbol(), and llvm::DwarfUnit::Section.
|
inline |
Definition at line 71 of file DwarfCompileUnit.h.
Referenced by forBothCUs().
| void llvm::DwarfCompileUnit::initStmtList | ( | ) |
Definition at line 242 of file DwarfCompileUnit.cpp.
References addSectionLabel(), llvm::DwarfUnit::Asm, llvm::dwarf::DW_AT_stmt_list, llvm::MCSection::getBeginSymbol(), llvm::MCObjectFileInfo::getDwarfLineSection(), llvm::AsmPrinter::getObjFileLowering(), llvm::DwarfUnit::getUniqueID(), llvm::AsmPrinter::OutStreamer, and llvm::DwarfUnit::UnitDie.
Definition at line 227 of file DwarfCompileUnit.h.
|
inline |
Set the skeleton unit associated with this unit.
Definition at line 163 of file DwarfCompileUnit.h.
|
inline |
Definition at line 225 of file DwarfCompileUnit.h.
| DIE & llvm::DwarfCompileUnit::updateSubprogramScopeDIE | ( | const DISubprogram * | SP | ) |
Find DIE for the given subprogram and attach appropriate DW_AT_low_pc and DW_AT_high_pc attributes.
If there are global variables in this scope then create and insert DIEs for these variables.
Definition at line 279 of file DwarfCompileUnit.cpp.
References addAddress(), llvm::DwarfUnit::addFlag(), llvm::DwarfDebug::addSubprogramNames(), llvm::DwarfUnit::Asm, attachLowHighPC(), llvm::DwarfUnit::DD, llvm::TargetOptions::DisableFramePointerElim(), llvm::dwarf::DW_AT_APPLE_omit_frame_ptr, llvm::dwarf::DW_AT_frame_base, llvm::DwarfDebug::getCurrentFunction(), llvm::TargetRegisterInfo::getFrameRegister(), llvm::AsmPrinter::getFunctionBegin(), llvm::AsmPrinter::getFunctionEnd(), llvm::DwarfUnit::getOrCreateSubprogramDIE(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunction::getTarget(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::AsmPrinter::MF, and llvm::TargetMachine::Options.
Referenced by constructSubprogramScopeDIE().
1.8.6