35 :
DwarfUnit(dwarf::DW_TAG_compile_unit, Node, A, DW, DWU), UniqueID(UID),
36 Skeleton(nullptr), BaseAddress(nullptr) {
108 DeclContext =
resolve(SDMDecl->getScope());
109 assert(SDMDecl->isStaticMember() &&
"Expected static member decl");
113 addDIEEntry(*VariableDIE, dwarf::DW_AT_specification, *VariableSpecDIE);
116 if (GTy !=
DD->
resolve(SDMDecl->getBaseType()))
126 addFlag(*VariableDIE, dwarf::DW_AT_external);
133 addFlag(*VariableDIE, dwarf::DW_AT_declaration);
138 addUInt(*VariableDIE, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata,
142 bool addToAccelTable =
false;
144 std::unique_ptr<DIEDwarfExpression> DwarfExpr;
145 for (
const auto &
GE : GlobalExprs) {
152 if (GlobalExprs.size() == 1 && Expr && Expr->
isConstant()) {
153 addToAccelTable =
true;
164 if (!Global && (!Expr || !Expr->
isConstant()))
168 addToAccelTable =
true;
170 DwarfExpr = llvm::make_unique<DIEDwarfExpression>(*
Asm, *
this, *Loc);
181 assert((PointerSize == 4 || PointerSize == 8) &&
182 "Add support for other sizes if necessary");
186 addUInt(*Loc, dwarf::DW_FORM_data1,
187 PointerSize == 4 ? dwarf::DW_OP_const4u
188 : dwarf::DW_OP_const8u);
191 addExpr(*Loc, dwarf::DW_FORM_udata,
194 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_const_index);
195 addUInt(*Loc, dwarf::DW_FORM_udata,
199 addUInt(*Loc, dwarf::DW_FORM_data1,
201 : dwarf::DW_OP_form_tls_address);
209 DwarfExpr->addFragmentOffset(Expr);
210 DwarfExpr->addExpression(Expr);
214 addBlock(*VariableDIE, dwarf::DW_AT_location, DwarfExpr->finalize());
219 if (addToAccelTable) {
238 if (CURanges.empty() || !SameAsPrevCU ||
239 (&CURanges.back().getEnd()->getSection() !=
241 CURanges.push_back(Range);
245 CURanges.back().setEnd(Range.
getEnd());
270 assert(Begin &&
"Begin label should not be null!");
271 assert(End &&
"End label should not be null!");
292 addFlag(*SPDie, dwarf::DW_AT_APPLE_omit_frame_ptr);
299 addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
318 "Only handle inlined subprograms here, use "
319 "constructSubprogramScopeDIE for non-inlined "
328 if (Scope->
getParent() && isa<DISubprogram>(DS)) {
339 unsigned ChildScopeCount;
348 for (
const auto *
IE : ImportedEntities[DS])
355 if (Children.size() == ChildScopeCount) {
356 FinalChildren.
insert(FinalChildren.
end(),
357 std::make_move_iterator(Children.begin()),
358 std::make_move_iterator(Children.end()));
362 assert(ScopeDIE &&
"Scope DIE should not be null.");
366 for (
auto &
I : Children)
369 FinalChildren.
push_back(std::move(ScopeDIE));
393 (Skeleton ? Skeleton :
this)->CURangeLists.push_back(std::move(
List));
398 if (Ranges.
size() == 1) {
399 const auto &single = Ranges.
front();
423 DIE *OriginDIE = getAbstractSPDies()[InlinedSP];
424 assert(OriginDIE &&
"Unable to find original DIE for an inlined subprogram.");
427 addDIEEntry(*ScopeDIE, dwarf::DW_AT_abstract_origin, *OriginDIE);
435 addUInt(*ScopeDIE, dwarf::DW_AT_call_line,
None, IA->getLine());
437 addUInt(*ScopeDIE, dwarf::DW_AT_GNU_discriminator,
None,
438 IA->getDiscriminator());
464 auto D = constructVariableDIEImpl(DV, Abstract);
469 DIE *DwarfCompileUnit::constructVariableDIEImpl(
const DbgVariable &DV,
488 if (
const MachineInstr *DVInsn = DV.
getMInsn()) {
489 assert(DVInsn->getNumOperands() == 4);
490 if (DVInsn->getOperand(0).isReg()) {
491 const MachineOperand RegOp = DVInsn->getOperand(0);
493 if (DVInsn->getOperand(1).isImm()) {
494 MachineLocation Location(RegOp.getReg(),
495 DVInsn->getOperand(1).getImm());
497 }
else if (RegOp.getReg())
499 }
else if (DVInsn->getOperand(0).isImm()) {
503 if (Expr && Expr->getNumElements()) {
505 DIEDwarfExpression DwarfExpr(*
Asm, *
this, *Loc);
507 DwarfExpr.addFragmentOffset(Expr);
508 DwarfExpr.addUnsignedConstant(DVInsn->getOperand(0).getImm());
509 DwarfExpr.addExpression(Expr);
510 addBlock(*VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize());
513 }
else if (DVInsn->getOperand(0).isFPImm())
515 else if (DVInsn->getOperand(0).isCImm())
527 DIEDwarfExpression DwarfExpr(*
Asm, *
this, *Loc);
529 unsigned FrameReg = 0;
530 const DIExpression *Expr = Fragment.Expr;
532 int Offset = TFI->getFrameIndexReference(*
Asm->
MF, Fragment.FI, FrameReg);
533 DwarfExpr.addFragmentOffset(Expr);
534 SmallVector<uint64_t, 8> Ops;
535 Ops.push_back(dwarf::DW_OP_plus_uconst);
536 Ops.push_back(Offset);
537 Ops.append(Expr->elements_begin(), Expr->elements_end());
538 DIExpressionCursor Cursor(Ops);
539 DwarfExpr.setMemoryLocationKind();
540 DwarfExpr.addMachineRegExpression(
542 DwarfExpr.addExpression(std::move(Cursor));
544 addBlock(*VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize());
551 DIE *&ObjectPointer) {
560 unsigned *ChildScopeCount) {
561 DIE *ObjectPointer =
nullptr;
566 unsigned ChildCountWithoutScopes = Children.
size();
572 *ChildScopeCount = Children.
size() - ChildCountWithoutScopes;
574 return ObjectPointer;
587 addDIEEntry(ScopeDIE, dwarf::DW_AT_object_pointer, *ObjectPointer);
596 if (FnArgs.
size() > 1 && !FnArgs[FnArgs.
size() - 1] &&
609 for (
auto &
I : Children)
612 return ObjectPointer;
631 else if (
auto *SPDecl = SP->getDeclaration()) {
639 AbsDef = &
createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE,
nullptr);
645 addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
654 if (
auto *NS = dyn_cast<DINamespace>(Entity))
656 else if (
auto *M = dyn_cast<DIModule>(Entity))
658 else if (
auto *SP = dyn_cast<DISubprogram>(Entity))
660 else if (
auto *
T = dyn_cast<DIType>(Entity))
662 else if (
auto *GV = dyn_cast<DIGlobalVariable>(Entity))
665 EntityDie =
getDIE(Entity);
670 addDIEEntry(*IMDie, dwarf::DW_AT_import, *EntityDie);
673 addString(*IMDie, dwarf::DW_AT_name, Name);
680 if (
DIE *AbsSPDIE = getAbstractSPDies().
lookup(SP)) {
683 addDIEEntry(*D, dwarf::DW_AT_abstract_origin, *AbsSPDIE);
695 auto *VariableDie = Var.
getDIE();
696 if (AbsVar && AbsVar->
getDIE()) {
697 addDIEEntry(*VariableDie, dwarf::DW_AT_abstract_origin,
713 auto &AbstractVariables = getAbstractVariables();
714 auto I = AbstractVariables.find(Cleansed);
715 if (
I != AbstractVariables.end())
716 return I->second.get();
723 auto AbsDbgVariable = make_unique<DbgVariable>(Var,
nullptr);
725 getAbstractVariables()[Var] = std::move(AbsDbgVariable);
737 : dwarf::DW_UT_compile;
747 GlobalNames[FullName] = &Die;
759 GlobalNames.insert(std::make_pair(std::move(FullName), &
getUnitDie()));
768 GlobalTypes[FullName] = &Die;
780 GlobalTypes.insert(std::make_pair(std::move(FullName), &
getUnitDie()));
792 addAddress(Die, dwarf::DW_AT_location, Location);
852 : dwarf::DW_FORM_data4;
860 addString(VariableDie, dwarf::DW_AT_name, Name);
863 if (
uint32_t AlignInBytes = DIVar->getAlignInBytes())
864 addUInt(VariableDie, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata,
870 addFlag(VariableDie, dwarf::DW_AT_artificial);
881 auto *SPDecl = SP->getDeclaration();
887 bool DwarfCompileUnit::isDwoUnit()
const {
StringRef getName() const
void push_back(const T &Elt)
DIE::value_iterator addSectionDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, const MCSymbol *Lo)
addSectionDelta - Add a label delta attribute data and value.
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 setMemoryLocationKind()
Lock this down to become a memory location description.
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.
const MachineFunction * MF
The current machine function.
SmallVectorImpl< InsnRange > & getRanges()
DenseMap< LexicalScope *, SmallVector< DbgVariable *, 8 > > & getScopeVariables()
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.
DIE::value_iterator addSectionLabel(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Label, const MCSymbol *Sec)
Add a Dwarf section label attribute data and value.
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...
const DILocation * getInlinedAt() const
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.
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...
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)
bool isLexicalScopeDIENull(LexicalScope *Scope)
A helper function to check whether the DIE for a given Scope is going to be null. ...
void finishVariableDefinition(const DbgVariable &Var)
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
static const uint16_t * lookup(unsigned opcode, unsigned domain, ArrayRef< uint16_t[3]> Table)
void addScopeRangeList(DIE &ScopeDIE, SmallVector< RangeSpan, 2 > Range)
A helper function to construct a RangeSpanList for a given lexical scope.
void addGlobalName(StringRef Name, const DIE &Die, const DIScope *Context) override
Add a new global name to the compile unit.
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.
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)
element_iterator elements_begin() const
DIE & addChild(DIE *Child)
Add a child to the DIE.
void addGlobalNameForTypeUnit(StringRef Name, const DIScope *Context)
Add a new global name present in a type unit to this compile unit.
void addGlobalTypeUnitType(const DIType *Ty, const DIScope *Context)
Add a new global type present in a type unit to this compile unit.
void addConstantValue(DIE &Die, const MachineOperand &MO, const DIType *Ty)
Add constant value entry in variable DIE.
bool includeMinimalInlineScopes() const
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...
void applySubprogramAttributes(const DISubprogram *SP, DIE &SPDie, bool SkipSPAttributes=false)
This dwarf writer support class manages information associated with a source file.
element_iterator elements_end() const
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
DbgVariable * getExistingAbstractVariable(InlinedVariable IV, const DILocalVariable *&Cleansed)
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.
void emitCommonHeader(bool UseOffsets, dwarf::UnitType UT)
Emit the common part of the header for this unit.
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.
bool hasDwarfPubSections(bool includeMinimalInlineScopes) const
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.
UnitType
Constants for unit types in DWARF v5.
StringRef getDisplayName() const
void addExpression(DIExpressionCursor &&Expr, unsigned FragmentOffsetInBits=0)
Emit all remaining operations in the DIExpressionCursor.
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)
void createAbstractVariable(const DILocalVariable *DV, LexicalScope *Scope)
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()
DbgValueHistoryMap::InlinedVariable InlinedVariable
Find abstract variable associated with Var.
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.
void append(in_iter in_start, in_iter in_end)
Add the specified range to the end of the SmallVector.
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.
bool addScopeVariable(LexicalScope *LS, DbgVariable *Var)
DIE * getOrCreateContextDIE(const DIScope *Context)
Get context owner's DIE.
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...
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)
StringRef getName() const
DIDerivedType * getStaticDataMemberDeclaration() const
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 finishSubprogramDefinition(const DISubprogram *SP)
void emitHeader(bool UseOffsets) override
Emit the header for this unit, not including the initial length field.
bool hasFrameIndexExprs() const
bool addMachineRegExpression(const TargetRegisterInfo &TRI, DIExpressionCursor &Expr, unsigned MachineReg, unsigned FragmentOffsetInBits=0)
Emit a machine register location.
StringRef getLinkageName() const
value_iterator addValue(BumpPtrAllocator &Alloc, const DIEValue &V)
std::pair< const MachineInstr *, const MachineInstr * > InsnRange
InsnRange - This is used to track range of instructions with identical lexical scope.
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.