LLVM  6.0.0svn
Classes | Public Types | Public Member Functions | List of all members
llvm::DwarfCompileUnit Class Referencefinal

#include "CodeGen/AsmPrinter/DwarfCompileUnit.h"

Inheritance diagram for llvm::DwarfCompileUnit:
Inheritance graph
[legend]
Collaboration diagram for llvm::DwarfCompileUnit:
Collaboration graph
[legend]

Classes

struct  GlobalExpr
 A pair of GlobalVariable and DIExpression. More...
 

Public Types

using InlinedVariable = DbgValueHistoryMap::InlinedVariable
 Find abstract variable associated with Var. More...
 

Public Member Functions

 DwarfCompileUnit (unsigned UID, const DICompileUnit *Node, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU)
 
unsigned getUniqueID () const
 
DwarfCompileUnitgetSkeleton () 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...
 
DIEgetOrCreateGlobalVariableDIE (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...
 
DwarfCompileUnitgetCU () override
 
unsigned getOrCreateSourceID (StringRef FileName, StringRef DirName) override
 Look up the source ID with the given directory and source file names. 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)
 
DIEupdateSubprogramScopeDIE (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)
 
DIEconstructInlinedScopeDIE (LexicalScope *Scope)
 This scope represents inlined body of a function. More...
 
DIEconstructLexicalScopeDIE (LexicalScope *Scope)
 Construct new DW_TAG_lexical_block for this scope and attach DW_AT_low_pc/DW_AT_high_pc labels. More...
 
DIEconstructVariableDIE (DbgVariable &DV, bool Abstract=false)
 constructVariableDIE - Construct a DIE for the given DbgVariable. More...
 
DIEconstructVariableDIE (DbgVariable &DV, const LexicalScope &Scope, DIE *&ObjectPointer)
 
DIEcreateScopeChildrenDIE (LexicalScope *Scope, SmallVectorImpl< DIE *> &Children, bool *HasNonScopeChildren=nullptr)
 A helper function to create children of a Scope DIE. More...
 
void constructSubprogramScopeDIE (const DISubprogram *Sub, LexicalScope *Scope)
 Construct a DIE for this subprogram scope. More...
 
DIEcreateAndAddScopeChildren (LexicalScope *Scope, DIE &ScopeDIE)
 
void constructAbstractSubprogramScopeDIE (LexicalScope *Scope)
 
DIEconstructImportedEntityDIE (const DIImportedEntity *Module)
 Construct import_module DIE. More...
 
void finishSubprogramDefinition (const DISubprogram *SP)
 
void finishVariableDefinition (const DbgVariable &Var)
 
DbgVariablegetExistingAbstractVariable (InlinedVariable IV, const DILocalVariable *&Cleansed)
 
DbgVariablegetExistingAbstractVariable (InlinedVariable IV)
 
void createAbstractVariable (const DILocalVariable *DV, LexicalScope *Scope)
 
void setSkeleton (DwarfCompileUnit &Skel)
 Set the skeleton unit associated with this unit. More...
 
unsigned getLength ()
 
void emitHeader (bool UseOffsets) override
 Emit the header for this unit, not including the initial length field. More...
 
MCSymbolgetLabelBegin () const
 
MCSymbolgetMacroLabelBegin () 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 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 MCSymbolgetBaseAddress () const
 
bool hasDwarfPubSections () const
 
- Public Member Functions inherited from llvm::DwarfUnit
AsmPrintergetAsmPrinter () const
 
uint16_t getLanguage () const
 
const DICompileUnitgetCUNode () 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...
 
DIEgetDIE (const DINode *D) const
 Returns the DIE map slot for the specified debug variable. More...
 
DIELocgetDIELoc ()
 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 *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, uint64_t Signature)
 Add a type's DW_AT_signature and set the declaration flag. More...
 
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 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...
 
DIEgetOrCreateNameSpace (const DINamespace *NS)
 
DIEgetOrCreateModule (const DIModule *M)
 
DIEgetOrCreateSubprogramDIE (const DISubprogram *SP, bool Minimal=false)
 
void applySubprogramAttributes (const DISubprogram *SP, DIE &SPDie, bool SkipSPAttributes=false)
 
DIEgetOrCreateTypeDIE (const MDNode *N)
 Find existing DIE or create new DIE for the given type. More...
 
DIEgetOrCreateContextDIE (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...
 
DIEcreateAndAddDIE (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)
 
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...
 
- 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...
 
MCSectiongetSection () 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
 
DIEgetUnitDie ()
 
const DIEgetUnitDie () const
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::DwarfUnit
 DwarfUnit (dwarf::Tag, const DICompileUnit *CU, 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 ()
 
DIEgetOrCreateStaticMemberDIE (const DIDerivedType *DT)
 Create new static data member DIE. More...
 
template<typename T >
Tresolve (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 DICompileUnitCUNode
 MDNode for the compile unit. More...
 
BumpPtrAllocator DIEValueAllocator
 
AsmPrinterAsm
 Target of Dwarf emission. More...
 
DwarfDebugDD
 
DwarfFileDU
 
DIEIndexTyDie
 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...
 

Detailed Description

Definition at line 44 of file DwarfCompileUnit.h.

Member Typedef Documentation

◆ InlinedVariable

Find abstract variable associated with Var.

Definition at line 213 of file DwarfCompileUnit.h.

Constructor & Destructor Documentation

◆ DwarfCompileUnit()

DwarfCompileUnit::DwarfCompileUnit ( unsigned  UID,
const DICompileUnit Node,
AsmPrinter A,
DwarfDebug DW,
DwarfFile DWU 
)

Member Function Documentation

◆ addAddress()

void DwarfCompileUnit::addAddress ( DIE Die,
dwarf::Attribute  Attribute,
const MachineLocation Location 
)

◆ addComplexAddress()

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 855 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, and llvm::DwarfExpression::setMemoryLocationKind().

Referenced by addVariableAddress(), and getGlobalTypes().

◆ addExpr()

void DwarfCompileUnit::addExpr ( DIELoc Die,
dwarf::Form  Form,
const MCExpr Expr 
)

Add a Dwarf expression attribute data and value.

Definition at line 901 of file DwarfCompileUnit.cpp.

References llvm::DIEValueList::addValue(), and llvm::DwarfUnit::DIEValueAllocator.

Referenced by getGlobalTypes(), and getOrCreateGlobalVariableDIE().

◆ addGlobalName()

void DwarfCompileUnit::addGlobalName ( StringRef  Name,
const DIE Die,
const DIScope Context 
)
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 774 of file DwarfCompileUnit.cpp.

References llvm::DwarfUnit::getParentContextString(), hasDwarfPubSections(), and llvm::StringRef::str().

Referenced by applySubprogramAttributesToDefinition(), getMacroLabelBegin(), and getOrCreateGlobalVariableDIE().

◆ addGlobalNameForTypeUnit()

void DwarfCompileUnit::addGlobalNameForTypeUnit ( StringRef  Name,
const DIScope Context 
)

Add a new global name present in a type unit to this compile unit.

Definition at line 782 of file DwarfCompileUnit.cpp.

References llvm::DwarfUnit::getParentContextString(), llvm::DIEUnit::getUnitDie(), hasDwarfPubSections(), and llvm::StringRef::str().

Referenced by llvm::DwarfTypeUnit::addGlobalName(), and getMacroLabelBegin().

◆ addGlobalType()

void DwarfCompileUnit::addGlobalType ( const DIType Ty,
const DIE Die,
const DIScope Context 
)
overridevirtual

Add a new global type to the compile unit.

Add a new global type to the unit.

Implements llvm::DwarfUnit.

Definition at line 795 of file DwarfCompileUnit.cpp.

References llvm::DIType::getName(), llvm::DwarfUnit::getParentContextString(), hasDwarfPubSections(), and llvm::StringRef::str().

Referenced by getMacroLabelBegin().

◆ addGlobalTypeUnitType()

void DwarfCompileUnit::addGlobalTypeUnitType ( const DIType Ty,
const DIScope Context 
)

Add a new global type present in a type unit to this compile unit.

Definition at line 803 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().

◆ addImportedEntity()

void llvm::DwarfCompileUnit::addImportedEntity ( const DIImportedEntity IE)
inline

◆ addLabelAddress()

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::AddressPool::getIndex(), and llvm::DwarfDebug::useSplitDwarf().

Referenced by attachLowHighPC().

◆ addLocalLabelAddress()

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 83 of file DwarfCompileUnit.cpp.

References llvm::DwarfDebug::addArangeLabel(), llvm::DIEValueList::addValue(), llvm::DwarfUnit::DD, and llvm::DwarfUnit::DIEValueAllocator.

Referenced by addLabelAddress().

◆ addLocationList()

void DwarfCompileUnit::addLocationList ( DIE Die,
dwarf::Attribute  Attribute,
unsigned  Index 
)

Add a Dwarf loclistptr attribute data and value.

Definition at line 876 of file DwarfCompileUnit.cpp.

References llvm::DIEValueList::addValue(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, and llvm::DwarfDebug::getDwarfVersion().

Referenced by constructVariableDIE(), and getGlobalTypes().

◆ addRange()

void DwarfCompileUnit::addRange ( RangeSpan  Range)

addRange - Add an address range to the list of ranges for this unit.

Definition at line 251 of file DwarfCompileUnit.cpp.

References llvm::DwarfUnit::DD, llvm::RangeSpan::getEnd(), llvm::DwarfDebug::getPrevCU(), llvm::MCSymbol::getSection(), and llvm::DwarfDebug::setPrevCU().

Referenced by addImportedEntity().

◆ addScopeRangeList()

void DwarfCompileUnit::addScopeRangeList ( DIE ScopeDIE,
SmallVector< RangeSpan, 2 >  Range 
)

◆ addVariableAddress()

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 817 of file DwarfCompileUnit.cpp.

References addAddress(), llvm::DwarfUnit::addBlockByrefAddress(), addComplexAddress(), assert(), llvm::DbgVariable::hasComplexAddress(), and llvm::DbgVariable::isBlockByrefVariable().

Referenced by constructVariableDIE(), and getGlobalTypes().

◆ applyStmtList()

void DwarfCompileUnit::applyStmtList ( DIE D)

Apply the DW_AT_stmt_list from this compile unit to the specified DIE.

Definition at line 284 of file DwarfCompileUnit.cpp.

References llvm::DIEValueList::addValue(), and llvm::DwarfUnit::DIEValueAllocator.

Referenced by getSkeleton().

◆ applySubprogramAttributesToDefinition()

void DwarfCompileUnit::applySubprogramAttributesToDefinition ( const DISubprogram SP,
DIE SPDie 
)

◆ applyVariableAttributes()

void DwarfCompileUnit::applyVariableAttributes ( const DbgVariable Var,
DIE VariableDie 
)

◆ attachLowHighPC()

void DwarfCompileUnit::attachLowHighPC ( DIE D,
const MCSymbol Begin,
const MCSymbol End 
)

◆ attachRangesOrLowHighPC() [1/2]

void DwarfCompileUnit::attachRangesOrLowHighPC ( DIE D,
SmallVector< RangeSpan, 2 >  Ranges 
)

◆ attachRangesOrLowHighPC() [2/2]

void DwarfCompileUnit::attachRangesOrLowHighPC ( DIE D,
const SmallVectorImpl< InsnRange > &  Ranges 
)

◆ constructAbstractSubprogramScopeDIE()

void DwarfCompileUnit::constructAbstractSubprogramScopeDIE ( LexicalScope Scope)

◆ constructImportedEntityDIE()

DIE * DwarfCompileUnit::constructImportedEntityDIE ( const DIImportedEntity Module)

◆ constructInlinedScopeDIE()

DIE * DwarfCompileUnit::constructInlinedScopeDIE ( LexicalScope Scope)

◆ constructLexicalScopeDIE()

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 461 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 addImportedEntity(), and constructScopeDIE().

◆ constructScopeDIE()

void DwarfCompileUnit::constructScopeDIE ( LexicalScope Scope,
SmallVectorImpl< DIE *> &  FinalChildren 
)

◆ constructSubprogramScopeDIE()

void DwarfCompileUnit::constructSubprogramScopeDIE ( const DISubprogram Sub,
LexicalScope Scope 
)

◆ constructVariableDIE() [1/2]

DIE * DwarfCompileUnit::constructVariableDIE ( DbgVariable DV,
bool  Abstract = false 
)

◆ constructVariableDIE() [2/2]

DIE * DwarfCompileUnit::constructVariableDIE ( DbgVariable DV,
const LexicalScope Scope,
DIE *&  ObjectPointer 
)

◆ createAbstractVariable()

void DwarfCompileUnit::createAbstractVariable ( const DILocalVariable DV,
LexicalScope Scope 
)

◆ createAndAddScopeChildren()

DIE * DwarfCompileUnit::createAndAddScopeChildren ( LexicalScope Scope,
DIE ScopeDIE 
)

◆ createScopeChildrenDIE()

DIE * DwarfCompileUnit::createScopeChildrenDIE ( LexicalScope Scope,
SmallVectorImpl< DIE *> &  Children,
bool HasNonScopeChildren = nullptr 
)

◆ emitHeader()

void DwarfCompileUnit::emitHeader ( bool  UseOffsets)
overridevirtual

Emit the header for this unit, not including the initial length field.

Implements llvm::DwarfUnit.

Definition at line 751 of file DwarfCompileUnit.cpp.

References llvm::DwarfUnit::Asm, llvm::AsmPrinter::createTempSymbol(), llvm::DwarfUnit::DD, llvm::DwarfUnit::emitCommonHeader(), llvm::AsmPrinter::OutStreamer, and llvm::DwarfDebug::useSplitDwarf().

Referenced by getLength().

◆ finishSubprogramDefinition()

void DwarfCompileUnit::finishSubprogramDefinition ( const DISubprogram SP)

◆ finishVariableDefinition()

void DwarfCompileUnit::finishVariableDefinition ( const DbgVariable Var)

◆ getBaseAddress()

const MCSymbol* llvm::DwarfCompileUnit::getBaseAddress ( ) const
inline

Definition at line 291 of file DwarfCompileUnit.h.

References hasDwarfPubSections().

Referenced by llvm::DwarfDebug::emitDebugLocEntryLocation().

◆ getCU()

DwarfCompileUnit& llvm::DwarfCompileUnit::getCU ( )
inlineoverridevirtual

Implements llvm::DwarfUnit.

Definition at line 142 of file DwarfCompileUnit.h.

References getOrCreateSourceID().

◆ getExistingAbstractVariable() [1/2]

DbgVariable * DwarfCompileUnit::getExistingAbstractVariable ( InlinedVariable  IV,
const DILocalVariable *&  Cleansed 
)

◆ getExistingAbstractVariable() [2/2]

DbgVariable * DwarfCompileUnit::getExistingAbstractVariable ( InlinedVariable  IV)

Definition at line 726 of file DwarfCompileUnit.cpp.

References getExistingAbstractVariable().

◆ getGlobalNames()

const StringMap<const DIE *>& llvm::DwarfCompileUnit::getGlobalNames ( ) const
inline

Definition at line 252 of file DwarfCompileUnit.h.

Referenced by computeIndexValue().

◆ getGlobalTypes()

const StringMap<const DIE *>& llvm::DwarfCompileUnit::getGlobalTypes ( ) const
inline

◆ getLabelBegin()

MCSymbol* llvm::DwarfCompileUnit::getLabelBegin ( ) const
inline

Definition at line 229 of file DwarfCompileUnit.h.

References assert(), and llvm::DIEUnit::getSection().

Referenced by computeIndexValue().

◆ getLength()

unsigned llvm::DwarfCompileUnit::getLength ( )
inline

◆ getMacroLabelBegin()

MCSymbol* llvm::DwarfCompileUnit::getMacroLabelBegin ( ) const
inline

◆ getOrCreateGlobalVariableDIE()

DIE * DwarfCompileUnit::getOrCreateGlobalVariableDIE ( const DIGlobalVariable GV,
ArrayRef< GlobalExpr GlobalExprs 
)

Get or create global variable DIE.

Definition at line 109 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, assert(), llvm::DwarfUnit::createAndAddDIE(), llvm::DwarfUnit::DD, llvm::DwarfUnit::DIEValueAllocator, llvm::TargetOptions::EmulatedTLS, 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::DIVariable::getType(), llvm::GlobalValue::hasDLLImportStorageClass(), llvm::DIExpression::isConstant(), llvm::DIGlobalVariable::isDefinition(), llvm::DIGlobalVariable::isLocalToUnit(), llvm::GlobalValue::isThreadLocal(), llvm::TargetMachine::Options, llvm::DwarfUnit::resolve(), llvm::DwarfDebug::resolve(), llvm::AsmPrinter::TM, llvm::DwarfDebug::useAllLinkageNames(), llvm::DwarfDebug::useGNUTLSOpcode(), and llvm::DwarfDebug::useSplitDwarf().

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

◆ getOrCreateSourceID()

unsigned DwarfCompileUnit::getOrCreateSourceID ( StringRef  File,
StringRef  Directory 
)
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 97 of file DwarfCompileUnit.cpp.

References llvm::DwarfUnit::Asm, getUniqueID(), and llvm::AsmPrinter::OutStreamer.

Referenced by llvm::DwarfUnit::addSectionOffset(), constructInlinedScopeDIE(), and getCU().

◆ getRangeLists()

const SmallVectorImpl<RangeSpanList>& llvm::DwarfCompileUnit::getRangeLists ( ) const
inline

getRangeLists - Get the vector of range lists.

Definition at line 282 of file DwarfCompileUnit.h.

◆ getRanges()

const SmallVectorImpl<RangeSpan>& llvm::DwarfCompileUnit::getRanges ( ) const
inline

getRanges - Get the list of ranges for this unit.

Definition at line 287 of file DwarfCompileUnit.h.

Referenced by llvm::DwarfDebug::beginModule().

◆ getSkeleton()

DwarfCompileUnit* llvm::DwarfCompileUnit::getSkeleton ( ) const
inline

◆ getUniqueID()

unsigned llvm::DwarfCompileUnit::getUniqueID ( ) const
inline

◆ hasDwarfPubSections()

bool DwarfCompileUnit::hasDwarfPubSections ( ) const

◆ includeMinimalInlineScopes()

bool DwarfCompileUnit::includeMinimalInlineScopes ( ) const

◆ initStmtList()

void DwarfCompileUnit::initStmtList ( )

◆ setBaseAddress()

void llvm::DwarfCompileUnit::setBaseAddress ( const MCSymbol Base)
inline

Definition at line 290 of file DwarfCompileUnit.h.

Referenced by llvm::DwarfDebug::beginModule().

◆ setSkeleton()

void llvm::DwarfCompileUnit::setSkeleton ( DwarfCompileUnit Skel)
inline

Set the skeleton unit associated with this unit.

Definition at line 220 of file DwarfCompileUnit.h.

◆ takeRanges()

SmallVector<RangeSpan, 2> llvm::DwarfCompileUnit::takeRanges ( )
inline

Definition at line 288 of file DwarfCompileUnit.h.

Referenced by llvm::DwarfDebug::beginModule().

◆ updateSubprogramScopeDIE()

DIE & DwarfCompileUnit::updateSubprogramScopeDIE ( const DISubprogram SP)

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