22 :
DwarfUnit(dwarf::DW_TAG_compile_unit, Node, A, DW, DWU), UniqueID(UID),
23 Skeleton(nullptr), BaseAddress(nullptr) {
95 DeclContext =
resolve(SDMDecl->getScope());
96 assert(SDMDecl->isStaticMember() &&
"Expected static member decl");
100 addDIEEntry(*VariableDIE, dwarf::DW_AT_specification, *VariableSpecDIE);
103 if (GTy !=
DD->
resolve(SDMDecl->getBaseType()))
113 addFlag(*VariableDIE, dwarf::DW_AT_external);
120 addFlag(*VariableDIE, dwarf::DW_AT_declaration);
125 addUInt(*VariableDIE, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata,
129 bool addToAccelTable =
false;
131 std::unique_ptr<DIEDwarfExpression> DwarfExpr;
133 GlobalExprs.
begin(), GlobalExprs.
end(),
135 return GE.Expr &&
GE.Expr->isConstant();
138 for (
const auto &
GE : GlobalExprs) {
144 if (GlobalExprs.size() == 1 && Expr && Expr->
isConstant()) {
151 DwarfExpr = llvm::make_unique<DIEDwarfExpression>(*
Asm, *
this, *Loc);
153 addToAccelTable =
true;
162 assert((PointerSize == 4 || PointerSize == 8) &&
163 "Add support for other sizes if necessary");
167 addUInt(*Loc, dwarf::DW_FORM_data1,
168 PointerSize == 4 ? dwarf::DW_OP_const4u
169 : dwarf::DW_OP_const8u);
172 addExpr(*Loc, dwarf::DW_FORM_udata,
175 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_const_index);
176 addUInt(*Loc, dwarf::DW_FORM_udata,
180 addUInt(*Loc, dwarf::DW_FORM_data1,
182 : dwarf::DW_OP_form_tls_address);
190 DwarfExpr->addFragmentOffset(Expr);
191 DwarfExpr->AddExpression(Expr);
196 addBlock(*VariableDIE, dwarf::DW_AT_location, DwarfExpr->finalize());
201 if (addToAccelTable) {
220 if (CURanges.empty() || !SameAsPrevCU ||
221 (&CURanges.back().getEnd()->getSection() !=
223 CURanges.push_back(Range);
227 CURanges.back().setEnd(Range.
getEnd());
236 : dwarf::DW_FORM_data4,
263 assert(Begin &&
"Begin label should not be null!");
264 assert(End &&
"End label should not be null!");
285 addFlag(*SPDie, dwarf::DW_AT_APPLE_omit_frame_ptr);
288 if (!includeMinimalInlineScopes()) {
292 addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
311 "Only handle inlined subprograms here, use "
312 "constructSubprogramScopeDIE for non-inlined "
321 if (Scope->
getParent() && isa<DISubprogram>(DS)) {
332 unsigned ChildScopeCount;
339 if (!includeMinimalInlineScopes()) {
341 for (
const auto *
IE : ImportedEntities[DS])
348 if (Children.size() == ChildScopeCount) {
349 FinalChildren.
insert(FinalChildren.
end(),
350 std::make_move_iterator(Children.begin()),
351 std::make_move_iterator(Children.end()));
355 assert(ScopeDIE &&
"Scope DIE should not be null.");
359 for (
auto &
I : Children)
362 FinalChildren.
push_back(std::move(ScopeDIE));
370 : dwarf::DW_FORM_data4,
395 (Skeleton ? Skeleton :
this)->CURangeLists.push_back(std::move(
List));
400 if (Ranges.
size() == 1) {
401 const auto &single = Ranges.
front();
426 assert(OriginDIE &&
"Unable to find original DIE for an inlined subprogram.");
429 addDIEEntry(*ScopeDIE, dwarf::DW_AT_abstract_origin, *OriginDIE);
437 addUInt(*ScopeDIE, dwarf::DW_AT_call_line,
None, IA->getLine());
439 addUInt(*ScopeDIE, dwarf::DW_AT_GNU_discriminator,
None,
440 IA->getDiscriminator());
466 auto D = constructVariableDIEImpl(DV, Abstract);
471 DIE *DwarfCompileUnit::constructVariableDIEImpl(
const DbgVariable &DV,
490 if (
const MachineInstr *DVInsn = DV.
getMInsn()) {
491 assert(DVInsn->getNumOperands() == 4);
492 if (DVInsn->getOperand(0).isReg()) {
493 const MachineOperand RegOp = DVInsn->getOperand(0);
495 if (DVInsn->getOperand(1).isImm()) {
496 MachineLocation Location(RegOp.getReg(),
497 DVInsn->getOperand(1).getImm());
499 }
else if (RegOp.getReg())
501 }
else if (DVInsn->getOperand(0).isImm()) {
505 if (Expr && Expr->getNumElements()) {
507 DIEDwarfExpression DwarfExpr(*
Asm, *
this, *Loc);
509 DwarfExpr.addFragmentOffset(Expr);
510 DwarfExpr.AddUnsignedConstant(DVInsn->getOperand(0).getImm());
511 DwarfExpr.AddExpression(Expr);
512 addBlock(*VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize());
515 }
else if (DVInsn->getOperand(0).isFPImm())
517 else if (DVInsn->getOperand(0).isCImm())
529 DIEDwarfExpression DwarfExpr(*
Asm, *
this, *Loc);
531 unsigned FrameReg = 0;
533 int Offset = TFI->getFrameIndexReference(*
Asm->
MF, Fragment.FI, FrameReg);
534 DwarfExpr.addFragmentOffset(Fragment.Expr);
537 DwarfExpr.AddExpression(Fragment.Expr);
539 addBlock(*VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize());
546 DIE *&ObjectPointer) {
555 unsigned *ChildScopeCount) {
556 DIE *ObjectPointer =
nullptr;
561 unsigned ChildCountWithoutScopes = Children.
size();
567 *ChildScopeCount = Children.
size() - ChildCountWithoutScopes;
569 return ObjectPointer;
582 addDIEEntry(ScopeDIE, dwarf::DW_AT_object_pointer, *ObjectPointer);
591 if (FnArgs.
size() > 1 && !FnArgs[FnArgs.
size() - 1] &&
592 !includeMinimalInlineScopes())
604 for (
auto &
I : Children)
607 return ObjectPointer;
620 if (includeMinimalInlineScopes())
626 else if (
auto *SPDecl = SP->getDeclaration()) {
634 AbsDef = &
createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE,
nullptr);
637 if (!includeMinimalInlineScopes())
640 addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
649 if (
auto *NS = dyn_cast<DINamespace>(Entity))
651 else if (
auto *M = dyn_cast<DIModule>(Entity))
653 else if (
auto *SP = dyn_cast<DISubprogram>(Entity))
655 else if (
auto *
T = dyn_cast<DIType>(Entity))
657 else if (
auto *GV = dyn_cast<DIGlobalVariable>(Entity))
660 EntityDie =
getDIE(Entity);
664 addDIEEntry(*IMDie, dwarf::DW_AT_import, *EntityDie);
667 addString(*IMDie, dwarf::DW_AT_name, Name);
677 addDIEEntry(*D, dwarf::DW_AT_abstract_origin, *AbsSPDIE);
679 assert(D || includeMinimalInlineScopes());
699 if (includeMinimalInlineScopes())
702 GlobalNames[FullName] = &Die;
708 if (includeMinimalInlineScopes())
711 GlobalTypes[FullName] = &Die;
723 addAddress(Die, dwarf::DW_AT_location, Location);
733 if (Location.
isReg())
780 : dwarf::DW_FORM_data4;
788 addString(VariableDie, dwarf::DW_AT_name, Name);
791 if (
uint32_t AlignInBytes = DIVar->getAlignInBytes())
792 addUInt(VariableDie, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata,
798 addFlag(VariableDie, dwarf::DW_AT_artificial);
809 auto *SPDecl = SP->getDeclaration();
815 bool DwarfCompileUnit::isDwoUnit()
const {
819 bool DwarfCompileUnit::includeMinimalInlineScopes()
const {
StringRef getName() const
void push_back(const T &Elt)
void addFlag(DIE &Die, dwarf::Attribute Attribute)
Add a flag that is true to the DIE.
const DILocalScope * getScopeNode() const
const MachineInstr * getMInsn() const
DIE * getOrCreateGlobalVariableDIE(const DIGlobalVariable *GV, ArrayRef< GlobalExpr > GlobalExprs)
Get or create global variable DIE.
void addLabelDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, const MCSymbol *Lo)
Add a label delta attribute data and value.
const DICompileUnit * getCUNode() const
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
MCSymbol * getSymbol(const GlobalValue *GV) const
DIELoc - Represents an expression location.
bool useAppleExtensionAttributes() const
unsigned getDebugLocListIndex() const
DIE * getOrCreateStaticMemberDIE(const DIDerivedType *DT)
Create new static data member DIE.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
A Module instance is used to store all the information related to an LLVM module. ...
const DataLayout & getDataLayout() const
Return information about data layout.
const MachineFunction * getCurrentFunction() const
void attachLowHighPC(DIE &D, const MCSymbol *Begin, const MCSymbol *End)
uint64_t getElement(unsigned I) const
const DIExpression * getSingleExpression() const
void insertDIE(const DINode *Desc, DIE *D)
Insert DIE into the map.
Collects and handles dwarf debug information.
void AddExpression(DIExpressionCursor &&Expr, unsigned FragmentOffsetInBits=0)
Emit all remaining operations in the DIExpressionCursor.
const MachineFunction * MF
The current machine function.
bool AddMachineRegIndirect(const TargetRegisterInfo &TRI, unsigned MachineReg, int Offset=0)
Emit an indirect dwarf register operation for the given machine register.
SmallVectorImpl< InsnRange > & getRanges()
DenseMap< LexicalScope *, SmallVector< DbgVariable *, 8 > > & getScopeVariables()
bool all_of(R &&range, UnaryPredicate P)
Provide wrappers to std::all_of which take ranges instead of having to pass begin/end explicitly...
StringRef getName() const
DIScope * getScope() const
bool hasComplexAddress() const
void reserve(size_type N)
Represents a pointer to a location list in the debug_loc section.
LexicalScope - This class is used to track scope information.
void addType(DIE &Entity, const DIType *Ty, dwarf::Attribute Attribute=dwarf::DW_AT_type)
Add a new type attribute to the specified entity.
bool useGNUTLSOpcode() const
Returns whether to use DW_OP_GNU_push_tls_address, instead of the standard DW_OP_form_tls_address opc...
const DILocation * getInlinedAt() const
DIE & updateSubprogramScopeDIE(const DISubprogram *SP)
Find DIE for the given subprogram and attach appropriate DW_AT_low_pc and DW_AT_high_pc attributes...
AsmPrinter * Asm
Target of Dwarf emission.
DIE * constructLexicalScopeDIE(LexicalScope *Scope)
Construct new DW_TAG_lexical_block for this scope and attach DW_AT_low_pc/DW_AT_high_pc labels...
DIE * getOrCreateTypeDIE(const MDNode *N)
Find existing DIE or create new DIE for the given type.
ArrayRef< FrameIndexExpr > getFrameIndexExprs() const
Get the FI entries, sorted by fragment offset.
void addBlock(DIE &Die, dwarf::Attribute Attribute, DIELoc *Block)
Add block data.
virtual void emitHeader(bool UseOffsets)
Emit the header for this unit, not including the initial length field.
void addArangeLabel(SymbolCU SCU)
Add a label so that arange data can be generated for it.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
SmallVectorImpl< LexicalScope * > & getChildren()
void applyVariableAttributes(const DbgVariable &Var, DIE &VariableDie)
DIE * createAndAddScopeChildren(LexicalScope *Scope, DIE &ScopeDIE)
bool isArtificial() const
Return true if DbgVariable is artificial.
bool DisableFramePointerElim(const MachineFunction &MF) const
DisableFramePointerElim - This returns true if frame pointer elimination optimization should be disab...
T * resolve(TypedDINodeRef< T > Ref) const
Look in the DwarfDebug map for the MDNode that corresponds to the reference.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
static GCRegistry::Add< StatepointGC > D("statepoint-example","an example strategy for statepoint")
Base class for the full range of assembler expressions which are needed for parsing.
void addConstantFPValue(DIE &Die, const MachineOperand &MO)
Add constant value entry in variable DIE.
void attachRangesOrLowHighPC(DIE &D, SmallVector< RangeSpan, 2 > Ranges)
Reg
All possible values of the reg field in the ModR/M byte.
bool isLexicalScopeDIENull(LexicalScope *Scope)
A helper function to check whether the DIE for a given Scope is going to be null. ...
StringRef getFilename() const
virtual unsigned getFrameRegister(const MachineFunction &MF) const =0
Debug information queries.
Holds a DIExpression and keeps track of how many operands have been consumed so far.
DISubprogram * getDISubprogram(const MDNode *Scope)
Find subprogram that is enclosing this scope.
StringRef getName() const
void addScopeRangeList(DIE &ScopeDIE, SmallVector< RangeSpan, 2 > Range)
A helper function to construct a RangeSpanList for a given lexical scope.
void addString(DIE &Die, dwarf::Attribute Attribute, StringRef Str)
Add a string attribute data and value.
AddressPool & getAddressPool()
LexicalScope * getParent() const
void constructScopeDIE(LexicalScope *Scope, SmallVectorImpl< DIE * > &FinalChildren)
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 t...
void addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr)
Add a Dwarf expression attribute data and value.
DenseMap< const MDNode *, DIE * > & getAbstractSPDies()
This class is used to track local variable information.
void applySubprogramAttributesToDefinition(const DISubprogram *SP, DIE &SPDie)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
virtual const MCExpr * getDebugThreadLocalSymbol(const MCSymbol *Sym) const
Create a symbol reference to describe the given TLS variable when emitting the address in debug info...
DwarfCompileUnit(unsigned UID, const DICompileUnit *Node, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU)
DIScopeRef getScope() const
void addAddress(DIE &Die, dwarf::Attribute Attribute, const MachineLocation &Location)
Add an address attribute to a die based on the location provided.
DIE * getOrCreateNameSpace(const DINamespace *NS)
DIE & addChild(DIE *Child)
Add a child to the DIE.
DIScope * getScope() const
void addConstantValue(DIE &Die, const MachineOperand &MO, const DIType *Ty)
Add constant value entry in variable DIE.
static DIE * get(BumpPtrAllocator &Alloc, dwarf::Tag Tag)
MCSection * getDwarfLineSection() const
bool useSplitDwarf() const
Returns whether or not to change the current debug info for the split dwarf proposal support...
This dwarf writer support class manages information associated with a source file.
DIEValueList::value_iterator addLabel(DIEValueList &Die, dwarf::Attribute Attribute, dwarf::Form Form, const MCSymbol *Label)
Add a Dwarf label attribute data and value.
const DIType * getType() const
void applyStmtList(DIE &D)
Apply the DW_AT_stmt_list from this compile unit to the specified DIE.
StringRef getName() const
const MCAsmInfo * MAI
Target Asm Printer information.
void addSourceLine(DIE &Die, unsigned Line, StringRef File, StringRef Directory)
Add location information to specified debug information entry.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
bool isLocalToUnit() const
A structured debug information entry.
TargetMachine & TM
Target machine description.
This class is intended to be used as a driving class for all asm writers.
T * resolve(TypedDINodeRef< T > Ref) const
Find the MDNode for the given reference.
static const unsigned End
DIE * getOrCreateSubprogramDIE(const DISubprogram *SP, bool Minimal=false)
void addLocalLabelAddress(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Label)
addLocalLabelAddress - Add a dwarf label attribute data and value using DW_FORM_addr only...
void constructAbstractSubprogramScopeDIE(LexicalScope *Scope)
bool isAbstractScope() const
uint32_t getAlignInBytes() const
bool isThreadLocal() const
If the value is "Thread Local", its value isn't shared by the threads.
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.
A pair of GlobalVariable and DIExpression.
DIE * constructImportedEntityDIE(const DIImportedEntity *Module)
Construct import_module DIE.
DINodeRef getEntity() const
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
Helper used to pair up a symbol and its DWARF compile unit.
MCSymbol * getLabelAfterInsn(const MachineInstr *MI)
Return Label immediately following the instruction.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
DIE * constructVariableDIE(DbgVariable &DV, bool Abstract=false)
constructVariableDIE - Construct a DIE for the given DbgVariable.
DITypeRef getType() const
An imported module (C++ using directive or similar).
DIE * getDIE(const DINode *D) const
Returns the DIE map slot for the specified debug variable.
Base class for scope-like contexts.
A simple label difference DIE.
StringRef getDisplayName() const
StringRef getDirectory() const
virtual const TargetFrameLowering * getFrameLowering() const
unsigned getOrCreateSourceID(StringRef FileName, StringRef DirName) override
Look up the source ID with the given directory and source file names.
bool hasDLLImportStorageClass() const
DIE * constructInlinedScopeDIE(LexicalScope *Scope)
This scope represents inlined body of a function.
void setPrevCU(const DwarfCompileUnit *PrevCU)
static Optional< DebugEmissionKind > getEmissionKind(StringRef Str)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
void addLinkageName(DIE &Die, StringRef LinkageName)
Add a linkage name, if it isn't empty.
MCSymbol * getBeginSymbol()
MCSymbol * createTempSymbol(const Twine &Name) const
bool isDefined(bool SetUsed=true) const
isDefined - Check if this symbol is defined (i.e., it has an address).
void addAccelName(StringRef Name, const DIE &Die)
unsigned EmulatedTLS
EmulatedTLS - This flag enables emulated TLS model, using emutls function in the runtime library...
const DILocalVariable * getVariable() const
std::string getParentContextString(const DIScope *Context) const
Get string containing language specific context for a global name.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
void addDIEEntry(DIE &Die, dwarf::Attribute Attribute, DIE &Entry)
Add a DIE attribute data and value.
iterator insert(iterator I, T &&Elt)
MCSection & getSection(bool SetUsed=true) const
Get the section associated with a defined, non-absolute symbol.
bool useAllLinkageNames() const
Returns whether we should emit all DW_AT_[MIPS_]linkage_name.
void addRange(RangeSpan Range)
addRange - Add an address range to the list of ranges for this unit.
DIE * getOrCreateContextDIE(const DIScope *Context)
Get context owner's DIE.
bool AddMachineReg(const TargetRegisterInfo &TRI, unsigned MachineReg, unsigned MaxSize=~1U)
Emit a partial DWARF register operation.
static bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
void constructSubprogramScopeDIE(const DISubprogram *Sub, LexicalScope *Scope)
Construct a DIE for this subprogram scope.
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...
MCSymbol * getFunctionBegin() const
uint16_t getDwarfVersion() const
Returns the Dwarf Version.
void addVariableAddress(const DbgVariable &DV, DIE &Die, MachineLocation Location)
Add DW_AT_location attribute for a DbgVariable based on provided MachineLocation. ...
LLVM_ATTRIBUTE_ALWAYS_INLINE size_type size() const
MCSymbol * getFunctionEnd() const
const TargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
DIE * getOrCreateModule(const DIModule *M)
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 t...
std::pair< const MachineInstr *, const MachineInstr * > InsnRange
InsnRange - This is used to track range of instructions with identical lexical scope.
DIE::value_iterator addSectionDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, const MCSymbol *Lo)
addSectionDelta - Add a label delta attribute data and value.
dwarf::Tag getTag() const
bool isConstant() const
Determine whether this represents a standalone constant value.
DwarfExpression implementation for singular DW_AT_location.
void addSubprogramNames(const DISubprogram *SP, DIE &Die)
void addFragmentOffset(const DIExpression *Expr)
If applicable, emit an empty DW_OP_piece / DW_OP_bit_piece to advance to the fragment described by Ex...
MCSymbol * getLabelBeforeInsn(const MachineInstr *MI)
Return Label preceding the instruction.
const DwarfCompileUnit * getPrevCU() const
Returns the previous CU that was being updated.
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
BumpPtrAllocator DIEValueAllocator
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isBlockByrefVariable() const
bool isObjectPointer() const
std::string DirName(const std::string &FileName)
bool AddMachineRegExpression(const TargetRegisterInfo &TRI, DIExpressionCursor &Expr, unsigned MachineReg, unsigned FragmentOffsetInBits=0)
Emit a machine register location.
StringRef getName() const
DIDerivedType * getStaticDataMemberDeclaration() const
void addGlobalName(StringRef Name, DIE &Die, const DIScope *Context) override
Add a new global name to the compile unit.
void addGlobalType(const DIType *Ty, const DIE &Die, const DIScope *Context) override
Add a new global type to the compile unit.
MCSection * getDwarfRangesSection() const
bool isDefinition() const
void addUInt(DIEValueList &Die, dwarf::Attribute Attribute, Optional< dwarf::Form > Form, uint64_t Integer)
Add an unsigned integer attribute data and value.
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_FOR...
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
StringRef - Represent a constant reference to a string, i.e.
void addLocationList(DIE &Die, dwarf::Attribute Attribute, unsigned Index)
Add a Dwarf loclistptr attribute data and value.
unsigned getUniqueID() const
unsigned getPointerSize(unsigned AS=0) const
Layout pointer size FIXME: The defaults need to be removed once all of the backends/clients are updat...
void applySubprogramAttributes(const DISubprogram *SP, DIE &SPDie, bool Minimal=false)
static GCRegistry::Add< ErlangGC > A("erlang","erlang-compatible garbage collector")
void finishSubprogramDefinition(const DISubprogram *SP)
void emitHeader(bool UseOffsets) override
Emit the header for this unit, not including the initial length field.
bool hasFrameIndexExprs() const
StringRef getLinkageName() const
bool doesDwarfUseRelocationsAcrossSections() const
value_iterator addValue(BumpPtrAllocator &Alloc, const DIEValue &V)
const MCSymbol * getEnd() const
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...
unsigned getIndex(const MCSymbol *Sym, bool TLS=false)
Returns the index into the address pool with the given label/symbol.
DIE * createScopeChildrenDIE(LexicalScope *Scope, SmallVectorImpl< DIE * > &Children, unsigned *ChildScopeCount=nullptr)
A helper function to create children of a Scope DIE.