LLVM
8.0.1
|
#include "CodeGen/AsmPrinter/DwarfCompileUnit.h"
Classes | |
struct | GlobalExpr |
A pair of GlobalVariable and DIExpression. More... | |
Public Types | |
using | InlinedEntity = DbgValueHistoryMap::InlinedEntity |
Find abstract variable associated with Var. More... | |
Public Member Functions | |
DwarfCompileUnit (unsigned UID, const DICompileUnit *Node, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU) | |
bool | hasRangeLists () const |
unsigned | getUniqueID () const |
DwarfCompileUnit * | getSkeleton () const |
bool | includeMinimalInlineScopes () 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, ArrayRef< GlobalExpr > GlobalExprs) |
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... | |
DwarfCompileUnit & | getCU () override |
unsigned | getOrCreateSourceID (const DIFile *File) override |
Look up the source ID for the given file. More... | |
void | addImportedEntity (const DIImportedEntity *IE) |
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 & | 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 * | constructLabelDIE (DbgLabel &DL, const LexicalScope &Scope) |
Construct a DIE for the given DbgLabel. More... | |
DIE * | createScopeChildrenDIE (LexicalScope *Scope, SmallVectorImpl< DIE *> &Children, bool *HasNonScopeChildren=nullptr) |
A helper function to create children of a Scope DIE. More... | |
DIE & | constructSubprogramScopeDIE (const DISubprogram *Sub, LexicalScope *Scope) |
Construct a DIE for this subprogram scope. More... | |
DIE * | createAndAddScopeChildren (LexicalScope *Scope, DIE &ScopeDIE) |
void | constructAbstractSubprogramScopeDIE (LexicalScope *Scope) |
DIE & | constructCallSiteEntryDIE (DIE &ScopeDIE, const DISubprogram &CalleeSP, bool IsTail, const MCExpr *PCOffset) |
Construct a call site entry DIE describing a call within Scope to a callee described by CalleeSP . More... | |
DIE * | constructImportedEntityDIE (const DIImportedEntity *Module) |
Construct import_module DIE. More... | |
void | finishSubprogramDefinition (const DISubprogram *SP) |
void | finishEntityDefinition (const DbgEntity *Entity) |
DbgEntity * | getExistingAbstractEntity (const DINode *Node) |
void | createAbstractEntity (const DINode *Node, LexicalScope *Scope) |
void | setSkeleton (DwarfCompileUnit &Skel) |
Set the skeleton unit associated with this unit. More... | |
unsigned | getHeaderSize () const override |
Compute the size of a header for this unit, not including the initial length field. More... | |
unsigned | getLength () |
void | emitHeader (bool UseOffsets) override |
Emit the header for this unit, not including the initial length field. More... | |
void | addAddrTableBase () |
Add the DW_AT_addr_base attribute to the unit DIE. More... | |
MCSymbol * | getLabelBegin () const |
MCSymbol * | getMacroLabelBegin () const |
void | addGlobalName (StringRef Name, const DIE &Die, const DIScope *Context) override |
Add a new global name to the compile unit. More... | |
void | addGlobalNameForTypeUnit (StringRef Name, const DIScope *Context) |
Add a new global name present in a type unit to this 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... | |
void | addGlobalTypeUnitType (const DIType *Ty, const DIScope *Context) |
Add a new global type present in a type unit to this 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 | addAddressExpr (DIE &Die, dwarf::Attribute Attribute, const MCExpr *Expr) |
Add an attribute containing an address expression to Die . More... | |
void | applySubprogramAttributesToDefinition (const DISubprogram *SP, DIE &SPDie) |
void | applyLabelAttributes (const DbgLabel &Label, DIE &LabelDie) |
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 |
uint64_t | getDWOId () const |
void | setDWOId (uint64_t DwoId) |
bool | hasDwarfPubSections () const |
Public Member Functions inherited from llvm::DwarfUnit | |
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... | |
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 (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, 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 | 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 SkipSPAttributes=false) |
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 |
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... | |
void | addLoclistsBase () |
Add the DW_AT_loclists_base attribute to the unit DIE. More... | |
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... | |
MD5::MD5Result * | getMD5AsBytes (const DIFile *File) const |
If the File has an MD5 checksum, return it as an MD5Result allocated in the MCContext. 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 |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::DwarfUnit | |
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... | |
template<typename T > | |
T * | resolve (TypedDINodeRef< T > Ref) const |
Look in the DwarfDebug map for the MDNode that corresponds to the reference. More... | |
void | updateAcceleratorTables (const DIScope *Context, const DIType *Ty, const DIE &TyDIE) |
If this is a named finished type then include it in the list of types for the accelerator tables. 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 | |
~DIEUnit ()=default | |
The size in bytes of an address for this unit. More... | |
Protected Attributes inherited from llvm::DwarfUnit | |
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... | |
Definition at line 44 of file DwarfCompileUnit.h.
Find abstract variable associated with Var.
Definition at line 225 of file DwarfCompileUnit.h.
DwarfCompileUnit::DwarfCompileUnit | ( | unsigned | UID, |
const DICompileUnit * | Node, | ||
AsmPrinter * | A, | ||
DwarfDebug * | DW, | ||
DwarfFile * | DWU | ||
) |
Definition at line 55 of file DwarfCompileUnit.cpp.
void 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 1025 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addBlock(), llvm::DwarfExpression::addExpression(), llvm::DwarfExpression::addMachineRegExpression(), llvm::DwarfUnit::Asm, llvm::DwarfUnit::DIEValueAllocator, llvm::DIEDwarfExpression::finalize(), llvm::MachineLocation::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::MachineLocation::isIndirect(), llvm::AsmPrinter::MF, llvm::DwarfExpression::setMemoryLocationKind(), and TRI.
Referenced by addVariableAddress(), getGlobalTypes(), and updateSubprogramScopeDIE().
void DwarfCompileUnit::addAddressExpr | ( | DIE & | Die, |
dwarf::Attribute | Attribute, | ||
const MCExpr * | Expr | ||
) |
Add an attribute containing an address expression to Die
.
Definition at line 1106 of file DwarfCompileUnit.cpp.
References llvm::DIEValueList::addValue(), and llvm::DwarfUnit::DIEValueAllocator.
Referenced by constructCallSiteEntryDIE(), and getGlobalTypes().
void DwarfCompileUnit::addAddrTableBase | ( | ) |
Add the DW_AT_addr_base attribute to the unit DIE.
Definition at line 1129 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addSectionLabel(), llvm::DwarfUnit::Asm, llvm::DwarfUnit::DD, llvm::DwarfDebug::getAddressPool(), llvm::MCSection::getBeginSymbol(), llvm::MCObjectFileInfo::getDwarfAddrSection(), llvm::DwarfUnit::getDwarfVersion(), llvm::AddressPool::getLabel(), llvm::AsmPrinter::getObjFileLowering(), and llvm::DIEUnit::getUnitDie().
Referenced by llvm::DwarfDebug::beginModule(), and getLength().
void 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 1046 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addBlock(), llvm::DwarfExpression::addExpression(), llvm::DwarfExpression::addFragmentOffset(), llvm::DwarfExpression::addMachineRegExpression(), llvm::DwarfUnit::Asm, llvm::DwarfUnit::DIEValueAllocator, llvm::DIEDwarfExpression::finalize(), llvm::MachineLocation::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::DbgVariable::getSingleExpression(), llvm::MachineFunction::getSubtarget(), llvm::MachineLocation::isIndirect(), llvm::AsmPrinter::MF, llvm::DwarfExpression::setMemoryLocationKind(), and TRI.
Referenced by addVariableAddress(), and getGlobalTypes().
void DwarfCompileUnit::addExpr | ( | DIELoc & | Die, |
dwarf::Form | Form, | ||
const MCExpr * | Expr | ||
) |
Add a Dwarf expression attribute data and value.
Definition at line 1101 of file DwarfCompileUnit.cpp.
References llvm::DIEValueList::addValue(), and llvm::DwarfUnit::DIEValueAllocator.
Referenced by getGlobalTypes(), and getOrCreateGlobalVariableDIE().
|
overridevirtual |
Add a new global name to the compile unit.
addGlobalName - Add a new global name to the compile unit.
Implements llvm::DwarfUnit.
Definition at line 967 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::getParentContextString(), hasDwarfPubSections(), and llvm::StringRef::str().
Referenced by applySubprogramAttributesToDefinition(), getMacroLabelBegin(), and getOrCreateGlobalVariableDIE().
Add a new global name present in a type unit to this compile unit.
Definition at line 975 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::getParentContextString(), llvm::DIEUnit::getUnitDie(), hasDwarfPubSections(), and llvm::StringRef::str().
Referenced by llvm::DwarfTypeUnit::addGlobalName(), and getMacroLabelBegin().
|
overridevirtual |
Add a new global type to the compile unit.
Add a new global type to the unit.
Implements llvm::DwarfUnit.
Definition at line 988 of file DwarfCompileUnit.cpp.
References llvm::DIType::getName(), llvm::DwarfUnit::getParentContextString(), hasDwarfPubSections(), and llvm::StringRef::str().
Referenced by getMacroLabelBegin().
Add a new global type present in a type unit to this compile unit.
Definition at line 996 of file DwarfCompileUnit.cpp.
References llvm::DIType::getName(), llvm::DwarfUnit::getParentContextString(), llvm::DIEUnit::getUnitDie(), hasDwarfPubSections(), and llvm::StringRef::str().
Referenced by llvm::DwarfTypeUnit::addGlobalType(), and getMacroLabelBegin().
|
inline |
Definition at line 147 of file DwarfCompileUnit.h.
References addRange(), assert(), attachLowHighPC(), and llvm::DIImportedEntity::getScope().
void 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 65 of file DwarfCompileUnit.cpp.
References llvm::DwarfDebug::addArangeLabel(), addLocalLabelAddress(), llvm::DIEValueList::addValue(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, llvm::DwarfDebug::getAddressPool(), llvm::DwarfDebug::getDwarfVersion(), llvm::AddressPool::getIndex(), and llvm::DwarfDebug::useSplitDwarf().
Referenced by finishEntityDefinition().
void 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 85 of file DwarfCompileUnit.cpp.
References llvm::DwarfDebug::addArangeLabel(), llvm::DIEValueList::addValue(), llvm::DwarfUnit::DD, and llvm::DwarfUnit::DIEValueAllocator.
Referenced by addLabelAddress().
void DwarfCompileUnit::addLocationList | ( | DIE & | Die, |
dwarf::Attribute | Attribute, | ||
unsigned | Index | ||
) |
Add a Dwarf loclistptr attribute data and value.
Definition at line 1067 of file DwarfCompileUnit.cpp.
References llvm::DIEValueList::addValue(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, and llvm::DwarfDebug::getDwarfVersion().
Referenced by constructLabelDIE(), and getGlobalTypes().
void DwarfCompileUnit::addRange | ( | RangeSpan | Range | ) |
addRange - Add an address range to the list of ranges for this unit.
Definition at line 269 of file DwarfCompileUnit.cpp.
References llvm::DwarfDebug::addSectionLabel(), llvm::DwarfUnit::DD, llvm::RangeSpan::getEnd(), llvm::DwarfDebug::getPrevCU(), llvm::MCSymbol::getSection(), llvm::RangeSpan::getStart(), and llvm::DwarfDebug::setPrevCU().
Referenced by addImportedEntity(), and addScopeRangeList().
void DwarfCompileUnit::addScopeRangeList | ( | DIE & | ScopeDIE, |
SmallVector< RangeSpan, 2 > | Range | ||
) |
A helper function to construct a RangeSpanList for a given lexical scope.
Definition at line 417 of file DwarfCompileUnit.cpp.
References addRange(), llvm::DwarfUnit::addSectionDelta(), llvm::DwarfUnit::addSectionLabel(), llvm::DwarfUnit::addUInt(), llvm::DwarfUnit::Asm, llvm::DwarfUnit::DD, llvm::DwarfUnit::DU, llvm::MCSection::getBeginSymbol(), llvm::MCObjectFileInfo::getDwarfRangesSection(), llvm::MCObjectFileInfo::getDwarfRnglistsSection(), llvm::DwarfDebug::getDwarfVersion(), llvm::AsmPrinter::getObjFileLowering(), and List.
Referenced by attachRangesOrLowHighPC().
void 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 1010 of file DwarfCompileUnit.cpp.
References addAddress(), addComplexAddress(), assert(), llvm::DbgVariable::hasComplexAddress(), and llvm::DbgVariable::isBlockByrefVariable().
Referenced by constructLabelDIE(), and getGlobalTypes().
Definition at line 1091 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addSourceLine(), llvm::DwarfUnit::addString(), llvm::StringRef::empty(), llvm::DbgLabel::getLabel(), llvm::DbgLabel::getName(), and Name.
Referenced by constructLabelDIE(), finishEntityDefinition(), and getGlobalTypes().
void DwarfCompileUnit::applyStmtList | ( | DIE & | D | ) |
Apply the DW_AT_stmt_list from this compile unit to the specified DIE.
Definition at line 311 of file DwarfCompileUnit.cpp.
References llvm::DIEValueList::addValue(), and llvm::DwarfUnit::DIEValueAllocator.
Referenced by getSkeleton().
void DwarfCompileUnit::applySubprogramAttributesToDefinition | ( | const DISubprogram * | SP, |
DIE & | SPDie | ||
) |
Definition at line 1112 of file DwarfCompileUnit.cpp.
References addGlobalName(), llvm::DwarfUnit::applySubprogramAttributes(), Context, llvm::DwarfUnit::DD, llvm::DIScope::getName(), llvm::DIScope::getScope(), includeMinimalInlineScopes(), llvm::DwarfUnit::resolve(), and llvm::DwarfDebug::useSplitDwarf().
Referenced by constructAbstractSubprogramScopeDIE(), finishSubprogramDefinition(), and getGlobalTypes().
void DwarfCompileUnit::applyVariableAttributes | ( | const DbgVariable & | Var, |
DIE & | VariableDie | ||
) |
Definition at line 1074 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addFlag(), llvm::DwarfUnit::addSourceLine(), llvm::DwarfUnit::addString(), llvm::DwarfUnit::addType(), llvm::DwarfUnit::addUInt(), llvm::StringRef::empty(), llvm::DbgVariable::getName(), llvm::DbgVariable::getType(), llvm::DbgVariable::getVariable(), llvm::DbgVariable::isArtificial(), and Name.
Referenced by constructLabelDIE(), finishEntityDefinition(), and getGlobalTypes().
Definition at line 315 of file DwarfCompileUnit.cpp.
Referenced by addImportedEntity(), attachRangesOrLowHighPC(), and updateSubprogramScopeDIE().
void DwarfCompileUnit::attachRangesOrLowHighPC | ( | DIE & | D, |
SmallVector< RangeSpan, 2 > | Ranges | ||
) |
Definition at line 453 of file DwarfCompileUnit.cpp.
References addScopeRangeList(), attachLowHighPC(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::DwarfUnit::DD, llvm::SmallVectorTemplateCommon< T >::front(), llvm::RangeSpan::getEnd(), llvm::RangeSpan::getStart(), llvm::SmallVectorBase::size(), and llvm::DwarfDebug::useRangesSection().
Referenced by attachRangesOrLowHighPC(), constructInlinedScopeDIE(), and constructLexicalScopeDIE().
void DwarfCompileUnit::attachRangesOrLowHighPC | ( | DIE & | D, |
const SmallVectorImpl< InsnRange > & | Ranges | ||
) |
Definition at line 463 of file DwarfCompileUnit.cpp.
References attachRangesOrLowHighPC(), llvm::DwarfUnit::DD, llvm::DebugHandlerBase::getLabelAfterInsn(), llvm::DebugHandlerBase::getLabelBeforeInsn(), List, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorImpl< T >::reserve(), and llvm::SmallVectorBase::size().
void DwarfCompileUnit::constructAbstractSubprogramScopeDIE | ( | LexicalScope * | Scope | ) |
Definition at line 782 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addDIEEntry(), llvm::DwarfUnit::addUInt(), applySubprogramAttributesToDefinition(), llvm::DwarfUnit::createAndAddDIE(), createAndAddScopeChildren(), llvm::DwarfUnit::DD, llvm::dwarf::DW_INL_inlined, llvm::DwarfUnit::getOrCreateContextDIE(), llvm::DwarfUnit::getOrCreateSubprogramDIE(), llvm::LexicalScope::getScopeNode(), llvm::DIEUnit::getUnitDie(), includeMinimalInlineScopes(), llvm::DwarfDebug::lookupCU(), llvm::None, and llvm::DwarfUnit::resolve().
Referenced by llvm::DwarfDebug::shareAcrossDWOCUs().
DIE & DwarfCompileUnit::constructCallSiteEntryDIE | ( | DIE & | ScopeDIE, |
const DISubprogram & | CalleeSP, | ||
bool | IsTail, | ||
const MCExpr * | PCOffset | ||
) |
Construct a call site entry DIE describing a call within Scope
to a callee described by CalleeSP
.
IsTail
specifies whether the call is a tail call. PCOffset
must be non-zero for non-tail calls or be the function-local offset to PC value after the call instruction.
Definition at line 821 of file DwarfCompileUnit.cpp.
References addAddressExpr(), llvm::DwarfUnit::addDIEEntry(), llvm::DwarfUnit::addFlag(), assert(), llvm::DwarfUnit::createAndAddDIE(), and llvm::DwarfUnit::getOrCreateSubprogramDIE().
Referenced by llvm::DwarfDebug::shareAcrossDWOCUs().
DIE * DwarfCompileUnit::constructImportedEntityDIE | ( | const DIImportedEntity * | Module | ) |
Construct import_module DIE.
Definition at line 847 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addDIEEntry(), llvm::DwarfUnit::addSourceLine(), llvm::DwarfUnit::addString(), assert(), llvm::DwarfUnit::DIEValueAllocator, llvm::StringRef::empty(), llvm::DIE::get(), llvm::DwarfUnit::getDIE(), llvm::DIImportedEntity::getEntity(), llvm::DIImportedEntity::getFile(), llvm::DIImportedEntity::getLine(), llvm::DIImportedEntity::getName(), getOrCreateGlobalVariableDIE(), llvm::DwarfUnit::getOrCreateModule(), llvm::DwarfUnit::getOrCreateNameSpace(), llvm::DwarfUnit::getOrCreateSubprogramDIE(), llvm::DwarfUnit::getOrCreateTypeDIE(), llvm::DINode::getTag(), llvm::DwarfUnit::insertDIE(), Name, and llvm::DwarfUnit::resolve().
Referenced by createScopeChildrenDIE(), and llvm::DwarfDebug::shareAcrossDWOCUs().
DIE * 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 475 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addDIEEntry(), llvm::DwarfDebug::addSubprogramNames(), llvm::DwarfUnit::addUInt(), assert(), attachRangesOrLowHighPC(), llvm::DwarfUnit::CUNode, llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, llvm::SIInstrFlags::DS, llvm::DIE::get(), llvm::getDISubprogram(), llvm::DwarfDebug::getDwarfVersion(), llvm::LexicalScope::getInlinedAt(), getOrCreateSourceID(), llvm::LexicalScope::getRanges(), llvm::LexicalScope::getScopeNode(), and llvm::None.
Referenced by constructScopeDIE().
DIE * DwarfCompileUnit::constructLabelDIE | ( | DbgLabel & | DL, |
const LexicalScope & | Scope | ||
) |
Construct a DIE for the given DbgLabel.
Definition at line 527 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addBlock(), llvm::DwarfUnit::addConstantFPValue(), llvm::DwarfUnit::addConstantValue(), llvm::DwarfExpression::addExpression(), llvm::DwarfExpression::addFragmentOffset(), addLocationList(), llvm::DwarfExpression::addMachineRegExpression(), llvm::DwarfUnit::addOpAddress(), llvm::DwarfExpression::addUnsignedConstant(), addVariableAddress(), llvm::SmallVectorImpl< T >::append(), applyLabelAttributes(), applyVariableAttributes(), llvm::DwarfUnit::Asm, assert(), llvm::DwarfUnit::DIEValueAllocator, llvm::DIExpression::elements_begin(), llvm::DIExpression::elements_end(), llvm::DIEDwarfExpression::finalize(), llvm::DIE::get(), llvm::DbgVariable::getDebugLocListIndex(), llvm::DbgVariable::getFrameIndexExprs(), llvm::TargetFrameLowering::getFrameIndexReference(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::AsmPrinter::getFunctionFrameSymbol(), llvm::DbgLabel::getLabel(), llvm::DbgVariable::getMInsn(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::DbgVariable::getSingleExpression(), llvm::MachineFunction::getSubtarget(), llvm::DbgVariable::getTag(), llvm::DbgLabel::getTag(), llvm::DbgVariable::getType(), llvm::DbgVariable::getVariable(), llvm::DbgVariable::hasFrameIndexExprs(), llvm::DwarfUnit::insertDIE(), llvm::LexicalScope::isAbstractScope(), llvm::AsmPrinter::MF, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::DbgEntity::setDIE(), and llvm::DwarfExpression::setMemoryLocationKind().
Referenced by createScopeChildrenDIE().
DIE * 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 507 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 DwarfCompileUnit::constructScopeDIE | ( | LexicalScope * | Scope, |
SmallVectorImpl< DIE *> & | FinalChildren | ||
) |
Definition at line 363 of file DwarfCompileUnit.cpp.
References llvm::DIE::addChild(), assert(), constructInlinedScopeDIE(), constructLexicalScopeDIE(), createScopeChildrenDIE(), llvm::DwarfUnit::DD, llvm::SIInstrFlags::DS, llvm::SmallVectorTemplateCommon< T >::end(), llvm::LexicalScope::getInlinedAt(), llvm::LexicalScope::getParent(), llvm::LexicalScope::getScopeNode(), I, llvm::SmallVectorImpl< T >::insert(), llvm::DwarfDebug::isLexicalScopeDIENull(), and llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by createScopeChildrenDIE().
DIE & DwarfCompileUnit::constructSubprogramScopeDIE | ( | const DISubprogram * | Sub, |
LexicalScope * | Scope | ||
) |
Construct a DIE for this subprogram scope.
Definition at line 741 of file DwarfCompileUnit.cpp.
References llvm::DIE::addChild(), llvm::DwarfUnit::addDIEEntry(), assert(), createAndAddScopeChildren(), llvm::DwarfUnit::DIEValueAllocator, llvm::DIE::get(), llvm::LexicalScope::getInlinedAt(), includeMinimalInlineScopes(), llvm::LexicalScope::isAbstractScope(), llvm::DITypeRefArray::size(), and updateSubprogramScopeDIE().
DIE * DwarfCompileUnit::constructVariableDIE | ( | DbgVariable & | DV, |
bool | Abstract = false |
||
) |
constructVariableDIE - Construct a DIE for the given DbgVariable.
Definition at line 521 of file DwarfCompileUnit.cpp.
References D, and llvm::DbgEntity::setDIE().
Referenced by constructVariableDIE(), and createScopeChildrenDIE().
DIE * DwarfCompileUnit::constructVariableDIE | ( | DbgVariable & | DV, |
const LexicalScope & | Scope, | ||
DIE *& | ObjectPointer | ||
) |
Definition at line 621 of file DwarfCompileUnit.cpp.
References constructVariableDIE(), llvm::LexicalScope::isAbstractScope(), and llvm::DbgVariable::isObjectPointer().
void DwarfCompileUnit::createAbstractEntity | ( | const DINode * | Node, |
LexicalScope * | Scope | ||
) |
Definition at line 921 of file DwarfCompileUnit.cpp.
DIE * DwarfCompileUnit::createAndAddScopeChildren | ( | LexicalScope * | Scope, |
DIE & | ScopeDIE | ||
) |
Definition at line 769 of file DwarfCompileUnit.cpp.
References llvm::DIE::addChild(), createScopeChildrenDIE(), and I.
Referenced by constructAbstractSubprogramScopeDIE(), and constructSubprogramScopeDIE().
DIE * DwarfCompileUnit::createScopeChildrenDIE | ( | LexicalScope * | Scope, |
SmallVectorImpl< DIE *> & | Children, | ||
bool * | HasNonScopeChildren = nullptr |
||
) |
A helper function to create children of a Scope DIE.
Definition at line 705 of file DwarfCompileUnit.cpp.
References assert(), constructImportedEntityDIE(), constructLabelDIE(), constructScopeDIE(), constructVariableDIE(), llvm::DwarfUnit::DU, llvm::SmallVectorBase::empty(), llvm::LexicalScope::getChildren(), llvm::DwarfFile::getScopeLabels(), llvm::LexicalScope::getScopeNode(), llvm::DwarfFile::getScopeVariables(), llvm::ARM_PROC::IE, includeMinimalInlineScopes(), llvm::AArch64CC::LS, llvm::SmallVectorTemplateBase< T >::push_back(), and sortLocalVars().
Referenced by constructScopeDIE(), and createAndAddScopeChildren().
|
overridevirtual |
Emit the header for this unit, not including the initial length field.
Implements llvm::DwarfUnit.
Definition at line 936 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::Asm, llvm::AsmPrinter::createTempSymbol(), llvm::DwarfUnit::DD, llvm::DwarfUnit::emitCommonHeader(), llvm::AsmPrinter::emitInt64(), llvm::DwarfDebug::getDwarfVersion(), getDWOId(), llvm::AsmPrinter::OutStreamer, llvm::DwarfDebug::useSectionsAsReferences(), and llvm::DwarfDebug::useSplitDwarf().
Referenced by getLength().
Label may be used to generate DW_AT_low_pc, so put it outside if/else block.
Definition at line 889 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addDIEEntry(), addLabelAddress(), applyLabelAttributes(), applyVariableAttributes(), llvm::dyn_cast(), llvm::DbgEntity::getDIE(), llvm::DbgEntity::getEntity(), getExistingAbstractEntity(), llvm::DbgLabel::getSymbol(), and llvm_unreachable.
Referenced by llvm::DwarfDebug::beginModule().
void DwarfCompileUnit::finishSubprogramDefinition | ( | const DISubprogram * | SP | ) |
Definition at line 875 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addDIEEntry(), applySubprogramAttributesToDefinition(), assert(), D, llvm::DwarfUnit::getDIE(), includeMinimalInlineScopes(), and lookup().
Referenced by llvm::DwarfDebug::beginModule().
Definition at line 311 of file DwarfCompileUnit.h.
Referenced by emitLoclistsTableHeader(), and emitRangeList().
|
inlineoverridevirtual |
Implements llvm::DwarfUnit.
Definition at line 143 of file DwarfCompileUnit.h.
References llvm::ARMBuildAttrs::File, and getOrCreateSourceID().
|
inline |
Definition at line 313 of file DwarfCompileUnit.h.
Referenced by emitHeader().
Definition at line 913 of file DwarfCompileUnit.cpp.
Referenced by finishEntityDefinition().
Definition at line 272 of file DwarfCompileUnit.h.
Referenced by computeIndexValue().
Definition at line 273 of file DwarfCompileUnit.h.
References addAddress(), addAddressExpr(), addComplexAddress(), addExpr(), addLocationList(), addVariableAddress(), applyLabelAttributes(), applySubprogramAttributesToDefinition(), applyVariableAttributes(), llvm::DwarfCompileUnit::GlobalExpr::Expr, and llvm::DwarfCompileUnit::GlobalExpr::Var.
Referenced by computeIndexValue().
|
inlineoverridevirtual |
Compute the size of a header for this unit, not including the initial length field.
Reimplemented from llvm::DwarfUnit.
Definition at line 232 of file DwarfCompileUnit.h.
References llvm::DwarfUnit::DD, llvm::DwarfDebug::getDwarfVersion(), llvm::DwarfUnit::getHeaderSize(), and llvm::DwarfDebug::useSplitDwarf().
Referenced by getLength().
|
inline |
Definition at line 249 of file DwarfCompileUnit.h.
References assert(), and llvm::DIEUnit::getSection().
Referenced by computeIndexValue().
|
inline |
Definition at line 239 of file DwarfCompileUnit.h.
References addAddrTableBase(), emitHeader(), getHeaderSize(), llvm::DIE::getSize(), and llvm::DIEUnit::getUnitDie().
Referenced by computeIndexValue().
|
inline |
Definition at line 254 of file DwarfCompileUnit.h.
References addGlobalName(), addGlobalNameForTypeUnit(), addGlobalType(), addGlobalTypeUnitType(), Context, and Name.
Referenced by emitDebugRangesImpl().
DIE * DwarfCompileUnit::getOrCreateGlobalVariableDIE | ( | const DIGlobalVariable * | GV, |
ArrayRef< GlobalExpr > | GlobalExprs | ||
) |
Get or create global variable DIE.
Definition at line 113 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::addTemplateParams(), llvm::DwarfUnit::addType(), llvm::DwarfUnit::addUInt(), llvm::DwarfUnit::Asm, assert(), llvm::DwarfUnit::createAndAddDIE(), llvm::DwarfUnit::CUNode, llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, llvm::AArch64CC::GE, llvm::DwarfDebug::getAddressPool(), llvm::DIVariable::getAlignInBytes(), llvm::AsmPrinter::getDataLayout(), llvm::TargetLoweringObjectFile::getDebugThreadLocalSymbol(), llvm::DwarfUnit::getDIE(), llvm::DIGlobalVariable::getDisplayName(), llvm::DIExpression::getElement(), llvm::AddressPool::getIndex(), llvm::DIGlobalVariable::getLinkageName(), 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::DIGlobalVariable::getTemplateParams(), llvm::DIVariable::getType(), llvm::GlobalValue::hasDLLImportStorageClass(), llvm::DIExpression::isConstant(), llvm::DIGlobalVariable::isDefinition(), llvm::DIGlobalVariable::isLocalToUnit(), llvm::GlobalValue::isThreadLocal(), llvm::DwarfUnit::resolve(), llvm::DwarfDebug::resolve(), llvm::TargetLoweringObjectFile::supportDebugThreadLocalLocation(), llvm::AsmPrinter::TM, llvm::DwarfDebug::useAllLinkageNames(), llvm::TargetMachine::useEmulatedTLS(), llvm::DwarfDebug::useGNUTLSOpcode(), and llvm::DwarfDebug::useSplitDwarf().
Referenced by llvm::DwarfDebug::beginModule(), and constructImportedEntityDIE().
Look up the source ID for the given file.
If none currently exists, create a new ID and insert it in the line table.
Implements llvm::DwarfUnit.
Definition at line 99 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::Asm, llvm::DIScope::getDirectory(), llvm::DIScope::getFilename(), llvm::DwarfUnit::getMD5AsBytes(), llvm::DIScope::getSource(), getUniqueID(), llvm::None, and llvm::AsmPrinter::OutStreamer.
Referenced by constructInlinedScopeDIE(), emitDebugRangesImpl(), getCU(), and llvm::DwarfUnit::getMD5AsBytes().
|
inline |
getRanges - Get the list of ranges for this unit.
Definition at line 307 of file DwarfCompileUnit.h.
Referenced by llvm::DwarfDebug::beginModule().
|
inline |
Definition at line 111 of file DwarfCompileUnit.h.
References applyStmtList(), D, includeMinimalInlineScopes(), and initStmtList().
Referenced by llvm::DwarfDebug::beginModule(), computeIndexValue(), emitDebugRangesImpl(), and forBothCUs().
|
inline |
Definition at line 109 of file DwarfCompileUnit.h.
Referenced by llvm::DwarfDebug::beginFunctionImpl(), emitDebugRangesImpl(), llvm::emitDWARF5AccelTable(), getOrCreateSourceID(), and initStmtList().
bool DwarfCompileUnit::hasDwarfPubSections | ( | ) | const |
Definition at line 951 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::CUNode, llvm::DwarfUnit::DD, llvm::DICompileUnit::Default, llvm::DICompileUnit::getNameTableKind(), llvm::DICompileUnit::GNU, includeMinimalInlineScopes(), llvm::DICompileUnit::isDebugDirectivesOnly(), llvm_unreachable, llvm::DICompileUnit::None, and llvm::DwarfDebug::tuneForGDB().
Referenced by addGlobalName(), addGlobalNameForTypeUnit(), addGlobalType(), addGlobalTypeUnitType(), computeIndexValue(), setDWOId(), and llvm::DwarfDebug::shareAcrossDWOCUs().
|
inline |
Definition at line 108 of file DwarfCompileUnit.h.
bool DwarfCompileUnit::includeMinimalInlineScopes | ( | ) | const |
Definition at line 1124 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::DD, llvm::DwarfUnit::getCUNode(), llvm::DICompileUnit::getEmissionKind(), llvm::DICompileUnit::LineTablesOnly, and llvm::DwarfDebug::useSplitDwarf().
Referenced by applySubprogramAttributesToDefinition(), constructAbstractSubprogramScopeDIE(), constructSubprogramScopeDIE(), createScopeChildrenDIE(), finishSubprogramDefinition(), getSkeleton(), hasDwarfPubSections(), and updateSubprogramScopeDIE().
void DwarfCompileUnit::initStmtList | ( | ) |
Definition at line 287 of file DwarfCompileUnit.cpp.
References llvm::DwarfUnit::addSectionLabel(), llvm::DwarfUnit::Asm, llvm::DwarfUnit::CUNode, llvm::DwarfUnit::DD, llvm::MCSection::getBeginSymbol(), llvm::MCObjectFileInfo::getDwarfLineSection(), llvm::AsmPrinter::getObjFileLowering(), getUniqueID(), llvm::DIEUnit::getUnitDie(), llvm::DICompileUnit::isDebugDirectivesOnly(), llvm::AsmPrinter::OutStreamer, and llvm::DwarfDebug::useSectionsAsReferences().
Referenced by getSkeleton(), and llvm::DwarfDebug::shareAcrossDWOCUs().
Definition at line 310 of file DwarfCompileUnit.h.
|
inline |
Definition at line 314 of file DwarfCompileUnit.h.
References hasDwarfPubSections().
Referenced by llvm::DwarfDebug::beginModule().
|
inline |
Set the skeleton unit associated with this unit.
Definition at line 230 of file DwarfCompileUnit.h.
|
inline |
Definition at line 308 of file DwarfCompileUnit.h.
Referenced by llvm::DwarfDebug::beginModule().
DIE & 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 332 of file DwarfCompileUnit.cpp.
References addAddress(), llvm::DwarfUnit::addBlock(), llvm::DwarfUnit::addFlag(), llvm::DwarfDebug::addSubprogramNames(), llvm::DwarfUnit::addUInt(), llvm::DwarfUnit::Asm, attachLowHighPC(), llvm::DwarfUnit::CUNode, llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, llvm::TargetOptions::DisableFramePointerElim(), 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::TargetMachine::getTargetTriple(), includeMinimalInlineScopes(), llvm::Triple::isNVPTX(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::AsmPrinter::MF, llvm::TargetMachine::Options, and llvm::DwarfDebug::useAppleExtensionAttributes().
Referenced by constructSubprogramScopeDIE().