53 return dwarf::DW_TAG_skeleton_unit;
55 return dwarf::DW_TAG_compile_unit;
77 bool UseAddrOffsetFormOrExpressions =
81 if (Label->isInSection() && UseAddrOffsetFormOrExpressions)
88 : dwarf::DW_FORM_GNU_addr_index,
96 "Addr+offset expressions are only valuable when using debug_addr (to "
97 "reduce relocations) available in DWARFv5 or higher");
125 return Asm->
OutStreamer->emitDwarfFileDirective(0,
"",
"", std::nullopt,
128 if (LastFile != File) {
132 File->getSource(), CUID);
148 auto *CB = GVContext ? dyn_cast<DICommonBlock>(GVContext) :
nullptr;
157 assert(SDMDecl->isStaticMember() &&
"Expected static member decl");
161 addDIEEntry(*VariableDIE, dwarf::DW_AT_specification, *VariableSpecDIE);
164 if (GTy != SDMDecl->getBaseType())
170 if (!DisplayName.
empty())
177 addFlag(*VariableDIE, dwarf::DW_AT_external);
184 addFlag(*VariableDIE, dwarf::DW_AT_declaration);
191 addUInt(*VariableDIE, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata,
205 bool addToAccelTable =
false;
207 std::optional<unsigned> NVPTXAddressSpace;
208 std::unique_ptr<DIEDwarfExpression> DwarfExpr;
209 for (
const auto &GE : GlobalExprs) {
218 addToAccelTable =
true;
241 addToAccelTable =
true;
243 DwarfExpr = std::make_unique<DIEDwarfExpression>(*
Asm, *
this, *Loc);
253 unsigned LocalNVPTXAddressSpace;
259 NVPTXAddressSpace = LocalNVPTXAddressSpace;
262 DwarfExpr->addFragmentOffset(Expr);
269 auto GetPointerSizedFormAndOp = [
this]() {
271 assert((PointerSize == 4 || PointerSize == 8) &&
272 "Add support for other sizes if necessary");
277 return PointerSize == 4
278 ? FormAndOp{dwarf::DW_FORM_data4, dwarf::DW_OP_const4u}
279 : FormAndOp{dwarf::DW_FORM_data8, dwarf::DW_OP_const8u};
281 if (
Global->isThreadLocal()) {
288 addWasmRelocBaseGlobal(Loc,
"__tls_base", 1);
290 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_plus);
297 auto FormAndOp = GetPointerSizedFormAndOp();
299 addUInt(*Loc, dwarf::DW_FORM_data1, FormAndOp.Op);
305 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_const_index);
306 addUInt(*Loc, dwarf::DW_FORM_udata,
310 addUInt(*Loc, dwarf::DW_FORM_data1,
312 : dwarf::DW_OP_form_tls_address);
319 addWasmRelocBaseGlobal(Loc,
"__memory_base", 1);
321 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_plus);
327 auto FormAndOp = GetPointerSizedFormAndOp();
329 addUInt(*Loc, dwarf::DW_FORM_data1, FormAndOp.Op);
336 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_breg0 + BaseReg);
338 addSInt(*Loc, dwarf::DW_FORM_sdata, 0);
340 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_plus);
350 if (DwarfExpr->isUnknownLocation())
351 DwarfExpr->setMemoryLocationKind();
352 DwarfExpr->addExpression(Expr);
359 const unsigned NVPTX_ADDR_global_space = 5;
360 addUInt(*VariableDIE, dwarf::DW_AT_address_class, dwarf::DW_FORM_data1,
361 NVPTXAddressSpace.value_or(NVPTX_ADDR_global_space));
364 addBlock(*VariableDIE, dwarf::DW_AT_location, DwarfExpr->finalize());
369 if (addToAccelTable) {
403 bool SameAsPrevCU =
this == PrevCU;
409 if (CURanges.empty() || !SameAsPrevCU ||
410 (&CURanges.back().End->getSection() !=
411 &Range.End->getSection())) {
415 CURanges.push_back(Range);
419 CURanges.back().End = Range.End;
451 assert(Begin &&
"Begin label should not be null!");
452 assert(
End &&
"End label should not be null!");
454 assert(
End->isDefined() &&
"Invalid end label");
466void DwarfCompileUnit::addWasmRelocBaseGlobal(
DIELoc *Loc,
StringRef GlobalName,
470 const unsigned TI_GLOBAL_RELOC = 3;
481 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_WASM_location);
482 addSInt(*Loc, dwarf::DW_FORM_sdata, TI_GLOBAL_RELOC);
492 addUInt(*Loc, dwarf::DW_FORM_data4, GlobalIndex);
505 BB_List.
push_back({R.second.BeginLabel, R.second.EndLabel});
512 addFlag(*SPDie, dwarf::DW_AT_APPLE_omit_frame_ptr);
519 switch (FrameBase.
Kind) {
523 addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
529 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_call_frame_cfa);
531 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_consts);
533 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_plus);
535 addBlock(*SPDie, dwarf::DW_AT_frame_base, Loc);
540 const unsigned TI_GLOBAL_RELOC = 3;
546 addWasmRelocBaseGlobal(Loc,
"__stack_pointer",
548 addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_stack_value);
549 addBlock(*SPDie, dwarf::DW_AT_frame_base, Loc);
573 DIE &ParentScopeDIE) {
574 if (!Scope || !Scope->getScopeNode())
577 auto *DS = Scope->getScopeNode();
579 assert((Scope->getInlinedAt() || !isa<DISubprogram>(DS)) &&
580 "Only handle inlined subprograms here, use "
581 "constructSubprogramScopeDIE for non-inlined "
585 if (Scope->getParent() && isa<DISubprogram>(DS)) {
587 assert(ScopeDIE &&
"Scope DIE should not be null.");
598 assert(ScopeDIE &&
"Scope DIE should not be null.");
607 HasRangeLists =
true;
612 ->
addRange(*(Skeleton ? Skeleton :
this), std::move(Range));
615 auto &
List = *IndexAndList.second;
623 addUInt(ScopeDIE, dwarf::DW_AT_ranges, dwarf::DW_FORM_rnglistx,
Index);
641 (Ranges.size() == 1 &&
644 Ranges.front().Begin))) {
655 List.reserve(Ranges.size());
660 const auto *BeginMBB = R.first->getParent();
661 const auto *EndMBB = R.second->getParent();
663 const auto *
MBB = BeginMBB;
675 : MBBSectionRange.BeginLabel,
687 DIE &ParentScopeDIE) {
688 assert(Scope->getScopeNode());
689 auto *DS = Scope->getScopeNode();
693 DIE *OriginDIE = getAbstractScopeDIEs()[InlinedSP];
694 assert(OriginDIE &&
"Unable to find original DIE for an inlined subprogram.");
698 addDIEEntry(*ScopeDIE, dwarf::DW_AT_abstract_origin, *OriginDIE);
704 addUInt(*ScopeDIE, dwarf::DW_AT_call_file, std::nullopt,
706 addUInt(*ScopeDIE, dwarf::DW_AT_call_line, std::nullopt, IA->getLine());
708 addUInt(*ScopeDIE, dwarf::DW_AT_call_column, std::nullopt, IA->getColumn());
710 addUInt(*ScopeDIE, dwarf::DW_AT_GNU_discriminator, std::nullopt,
711 IA->getDiscriminator());
726 const auto *DS = Scope->getScopeNode();
729 if (Scope->isAbstractScope()) {
731 "Abstract DIE for this scope exists!");
732 getAbstractScopeDIEs()[DS] = ScopeDIE;
735 if (!Scope->getInlinedAt()) {
736 assert(!LexicalBlockDIEs.count(DS) &&
737 "Concrete out-of-line DIE for this scope exists!");
738 LexicalBlockDIEs[DS] = ScopeDIE;
756 applyConcreteDbgVariableAttributes(V, DV, *VariableDie);
763void DwarfCompileUnit::applyConcreteDbgVariableAttributes(
768 if (Entry->isLocation()) {
770 }
else if (Entry->isInt()) {
771 auto *Expr = Single.getExpr();
772 if (Expr && Expr->getNumElements()) {
776 DwarfExpr.addFragmentOffset(Expr);
777 DwarfExpr.addUnsignedConstant(Entry->getInt());
778 DwarfExpr.addExpression(Expr);
779 addBlock(VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize());
780 if (DwarfExpr.TagOffset)
781 addUInt(VariableDie, dwarf::DW_AT_LLVM_tag_offset,
782 dwarf::DW_FORM_data1, *DwarfExpr.TagOffset);
785 }
else if (Entry->isConstantFP()) {
787 }
else if (Entry->isConstantInt()) {
789 }
else if (Entry->isTargetIndexLocation()) {
795 addBlock(VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize());
802 return Entry.isLocation() && !Entry.getLoc().getReg();
806 assert(Expr &&
"Variadic Debug Value must have an Expression.");
809 DwarfExpr.addFragmentOffset(Expr);
815 if (Entry.isLocation()) {
816 if (!DwarfExpr.addMachineRegExpression(
TRI, Cursor,
817 Entry.getLoc().getReg()))
819 }
else if (Entry.isInt()) {
821 DwarfExpr.addUnsignedConstant(Entry.getInt());
822 }
else if (Entry.isConstantFP()) {
827 APInt RawBytes = Entry.getConstantFP()->getValueAPF().bitcastToAPInt();
831 }
else if (Entry.isConstantInt()) {
832 APInt RawBytes = Entry.getConstantInt()->getValue();
836 }
else if (Entry.isTargetIndexLocation()) {
848 if (!DwarfExpr.addExpression(
851 return AddEntry(DVal->getLocEntries()[Idx], Cursor);
856 addBlock(VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize());
857 if (DwarfExpr.TagOffset)
858 addUInt(VariableDie, dwarf::DW_AT_LLVM_tag_offset, dwarf::DW_FORM_data1,
859 *DwarfExpr.TagOffset);
862void DwarfCompileUnit::applyConcreteDbgVariableAttributes(
868 addUInt(VariableDie, dwarf::DW_AT_LLVM_tag_offset, dwarf::DW_FORM_data1,
872void DwarfCompileUnit::applyConcreteDbgVariableAttributes(
const Loc::MMI &MMI,
875 std::optional<unsigned> NVPTXAddressSpace;
884 DwarfExpr.addFragmentOffset(Expr);
888 TRI->getOffsetOpcodes(Offset, Ops);
896 unsigned LocalNVPTXAddressSpace;
902 NVPTXAddressSpace = LocalNVPTXAddressSpace;
908 DwarfExpr.setMemoryLocationKind();
912 DwarfExpr.addMachineRegExpression(
914 DwarfExpr.addExpression(std::move(Cursor));
922 const unsigned NVPTX_ADDR_local_space = 6;
923 addUInt(VariableDie, dwarf::DW_AT_address_class, dwarf::DW_FORM_data1,
924 NVPTXAddressSpace.value_or(NVPTX_ADDR_local_space));
926 addBlock(VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize());
927 if (DwarfExpr.TagOffset)
928 addUInt(VariableDie, dwarf::DW_AT_LLVM_tag_offset, dwarf::DW_FORM_data1,
929 *DwarfExpr.TagOffset);
932void DwarfCompileUnit::applyConcreteDbgVariableAttributes(
939 DwarfExpr.addFragmentOffset(&Expr);
941 DwarfExpr.beginEntryValueExpression(Cursor);
942 DwarfExpr.addMachineRegExpression(
944 DwarfExpr.addExpression(std::move(Cursor));
946 addBlock(VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize());
949void DwarfCompileUnit::applyConcreteDbgVariableAttributes(
950 const std::monostate &,
const DbgVariable &DV,
DIE &VariableDie) {}
954 DIE *&ObjectPointer) {
965 DL.setDIE(*LabelDie);
967 if (Scope.isAbstractScope())
976 auto *Array = dyn_cast<DICompositeType>(Var->
getType());
977 if (!Array || Array->getTag() != dwarf::DW_TAG_array_type)
979 if (
auto *DLVar = Array->getDataLocation())
980 Result.push_back(DLVar);
981 if (
auto *AsVar = Array->getAssociated())
982 Result.push_back(AsVar);
983 if (
auto *AlVar = Array->getAllocated())
984 Result.push_back(AlVar);
985 for (
auto *El : Array->getElements()) {
986 if (
auto *Subrange = dyn_cast<DISubrange>(El)) {
987 if (
auto Count = Subrange->getCount())
988 if (
auto *Dependency = dyn_cast_if_present<DIVariable *>(Count))
989 Result.push_back(Dependency);
990 if (
auto LB = Subrange->getLowerBound())
991 if (
auto *Dependency = dyn_cast_if_present<DIVariable *>(LB))
992 Result.push_back(Dependency);
993 if (
auto UB = Subrange->getUpperBound())
994 if (
auto *Dependency = dyn_cast_if_present<DIVariable *>(UB))
995 Result.push_back(Dependency);
996 if (
auto ST = Subrange->getStride())
997 if (
auto *Dependency = dyn_cast_if_present<DIVariable *>(ST))
998 Result.push_back(Dependency);
999 }
else if (
auto *GenericSubrange = dyn_cast<DIGenericSubrange>(El)) {
1000 if (
auto Count = GenericSubrange->getCount())
1001 if (
auto *Dependency = dyn_cast_if_present<DIVariable *>(Count))
1002 Result.push_back(Dependency);
1003 if (
auto LB = GenericSubrange->getLowerBound())
1004 if (
auto *Dependency = dyn_cast_if_present<DIVariable *>(LB))
1005 Result.push_back(Dependency);
1006 if (
auto UB = GenericSubrange->getUpperBound())
1007 if (
auto *Dependency = dyn_cast_if_present<DIVariable *>(UB))
1008 Result.push_back(Dependency);
1009 if (
auto ST = GenericSubrange->getStride())
1010 if (
auto *Dependency = dyn_cast_if_present<DIVariable *>(ST))
1011 Result.push_back(Dependency);
1031 for (
auto *Var :
reverse(Input)) {
1032 DbgVar.
insert({Var->getVariable(), Var});
1037 while (!WorkList.
empty()) {
1038 auto Item = WorkList.
back();
1040 bool visitedAllDependencies = Item.getInt();
1046 if (Visited.
count(Var))
1050 if (visitedAllDependencies) {
1052 Result.push_back(Var);
1057 auto Res = Visiting.
insert(Var);
1059 assert(
false &&
"dependency cycle in local variables");
1068 if (
const auto *Dep = dyn_cast<const DILocalVariable>(Dependency))
1081 assert(!Scope->getInlinedAt());
1082 assert(!Scope->isAbstractScope());
1087 addDIEEntry(ScopeDIE, dwarf::DW_AT_object_pointer, *ObjectPointer);
1096 if (FnArgs.
size() > 1 && !FnArgs[FnArgs.
size() - 1] &&
1106 DIE *ObjectPointer =
nullptr;
1110 for (
auto &DV : Vars.Args)
1127 DeferredLocalDecls.
insert(LocalDecls.begin(), LocalDecls.end());
1131 auto skipLexicalScope = [
this](
LexicalScope *S) ->
bool {
1132 if (isa<DISubprogram>(S->getScopeNode()))
1135 if (!Vars.Args.empty() || !Vars.Locals.empty())
1143 if (skipLexicalScope(LS))
1149 return ObjectPointer;
1154 auto *SP = cast<DISubprogram>(Scope->getScopeNode());
1155 if (getAbstractScopeDIEs().
count(SP))
1167 else if (
auto *SPDecl = SP->getDeclaration()) {
1181 *ContextDIE,
nullptr);
1184 ContextCU->getAbstractScopeDIEs()[SP] = &AbsDef;
1187 ContextCU->
addSInt(AbsDef, dwarf::DW_AT_inline,
1189 : dwarf::DW_FORM_implicit_const,
1192 ContextCU->
addDIEEntry(AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
1203 case dwarf::DW_TAG_call_site:
1204 return dwarf::DW_TAG_GNU_call_site;
1205 case dwarf::DW_TAG_call_site_parameter:
1206 return dwarf::DW_TAG_GNU_call_site_parameter;
1217 case dwarf::DW_AT_call_all_calls:
1218 return dwarf::DW_AT_GNU_all_call_sites;
1219 case dwarf::DW_AT_call_target:
1220 return dwarf::DW_AT_GNU_call_site_target;
1221 case dwarf::DW_AT_call_origin:
1222 return dwarf::DW_AT_abstract_origin;
1223 case dwarf::DW_AT_call_return_pc:
1224 return dwarf::DW_AT_low_pc;
1225 case dwarf::DW_AT_call_value:
1226 return dwarf::DW_AT_GNU_call_site_value;
1227 case dwarf::DW_AT_call_tail_call:
1228 return dwarf::DW_AT_GNU_tail_call;
1239 case dwarf::DW_OP_entry_value:
1240 return dwarf::DW_OP_GNU_entry_value;
1262 assert(CalleeDIE &&
"Could not create DIE for call site entry origin");
1294 assert(PCAddr &&
"Missing return PC information for a call");
1304 for (
const auto &Param : Params) {
1305 unsigned Register = Param.getRegister();
1306 auto CallSiteDieParam =
1310 addAddress(*CallSiteDieParam, dwarf::DW_AT_location,
1322 CallSiteDIE.
addChild(CallSiteDieParam);
1331 auto *Entity =
Module->getEntity();
1332 if (
auto *NS = dyn_cast<DINamespace>(Entity))
1334 else if (
auto *M = dyn_cast<DIModule>(Entity))
1336 else if (
auto *SP = dyn_cast<DISubprogram>(Entity)) {
1340 if (
auto *AbsSPDie = getAbstractScopeDIEs().
lookup(SP))
1341 EntityDie = AbsSPDie;
1344 }
else if (
auto *
T = dyn_cast<DIType>(Entity))
1346 else if (
auto *GV = dyn_cast<DIGlobalVariable>(Entity))
1348 else if (
auto *IE = dyn_cast<DIImportedEntity>(Entity))
1351 EntityDie =
getDIE(Entity);
1354 addDIEEntry(*IMDie, dwarf::DW_AT_import, *EntityDie);
1356 if (!
Name.empty()) {
1369 DINodeArray Elements =
Module->getElements();
1370 for (
const auto *Element : Elements) {
1388 assert(ContextDIE &&
"Empty scope for the imported entity!");
1397 if (
DIE *AbsSPDIE = getAbstractScopeDIEs().
lookup(SP)) {
1400 addDIEEntry(*
D, dwarf::DW_AT_abstract_origin, *AbsSPDIE);
1412 auto *Die = Entity->
getDIE();
1416 if (AbsEntity && AbsEntity->
getDIE()) {
1418 Label = dyn_cast<const DbgLabel>(Entity);
1420 if (
const DbgVariable *Var = dyn_cast<const DbgVariable>(Entity))
1422 else if ((Label = dyn_cast<const DbgLabel>(Entity)))
1431 const auto *
Sym = Label->getSymbol();
1443 auto &AbstractEntities = getAbstractEntities();
1444 auto I = AbstractEntities.find(Node);
1445 if (
I != AbstractEntities.end())
1446 return I->second.get();
1452 assert(Scope && Scope->isAbstractScope());
1453 auto &Entity = getAbstractEntities()[Node];
1454 if (isa<const DILocalVariable>(Node)) {
1455 Entity = std::make_unique<DbgVariable>(cast<const DILocalVariable>(Node),
1458 }
else if (isa<const DILabel>(Node)) {
1459 Entity = std::make_unique<DbgLabel>(
1460 cast<const DILabel>(Node),
nullptr );
1474 : dwarf::DW_UT_compile;
1505 GlobalNames[FullName] = &Die;
1517 GlobalNames.insert(std::make_pair(std::move(FullName), &
getUnitDie()));
1526 GlobalTypes[FullName] = &Die;
1538 GlobalTypes.insert(std::make_pair(std::move(FullName), &
getUnitDie()));
1543 auto *Single = std::get_if<Loc::Single>(&DV);
1544 if (Single && Single->getExpr())
1547 addAddress(Die, dwarf::DW_AT_location, Location);
1555 if (Location.isIndirect())
1568 addUInt(Die, dwarf::DW_AT_LLVM_tag_offset, dwarf::DW_FORM_data1,
1598 addUInt(Die, dwarf::DW_AT_LLVM_tag_offset, dwarf::DW_FORM_data1,
1606 ? dwarf::DW_FORM_loclistx
1618 if (
uint32_t AlignInBytes = DIVar->getAlignInBytes())
1619 addUInt(VariableDie, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata,
1627 addFlag(VariableDie, dwarf::DW_AT_artificial);
1635 const auto *
DILabel = Label.getLabel();
1647 auto *SPDecl = SP->getDeclaration();
1653bool DwarfCompileUnit::isDwoUnit()
const {
1671 : dwarf::DW_AT_GNU_addr_base,
1692 addUInt(Die, dwarf::DW_AT_encoding, dwarf::DW_FORM_data1, Btr.Encoding);
1694 addUInt(Die, dwarf::DW_AT_byte_size, std::nullopt,
1703 bool isAbstract = getAbstractScopeDIEs().count(LB->
getSubprogram());
1704 if (isAbstract && getAbstractScopeDIEs().
count(LB))
1705 return getAbstractScopeDIEs()[LB];
1706 assert(!isAbstract &&
"Missed lexical block DIE in abstract tree!");
1709 return LexicalBlockDIEs.lookup(LB);
1713 if (isa_and_nonnull<DILocalScope>(
Context)) {
1714 if (
auto *LFScope = dyn_cast<DILexicalBlockFile>(
Context))
1715 Context = LFScope->getNonLexicalBlockFileScope();
1716 if (
auto *LScope = dyn_cast<DILexicalBlock>(
Context))
1720 auto *SPScope = cast<DISubprogram>(
Context);
1721 if (getAbstractScopeDIEs().
count(SPScope))
1722 return getAbstractScopeDIEs()[SPScope];
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
static SmallVector< DbgVariable *, 8 > sortLocalVars(SmallVectorImpl< DbgVariable * > &Input)
Sort local variables so that variables appearing inside of helper expressions come first.
static SmallVector< const DIVariable *, 2 > dependencies(DbgVariable *Var)
Return all DIVariables that appear in count: expressions.
static dwarf::Tag GetCompileUnitType(UnitKind Kind, DwarfDebug *DW)
This file contains constants used for implementing Dwarf debug support.
static bool lookup(const GsymReader &GR, DataExtractor &Data, uint64_t &Offset, uint64_t BaseAddr, uint64_t Addr, SourceLocations &SrcLocs, llvm::Error &Err)
A Lookup helper functions.
unsigned const TargetRegisterInfo * TRI
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallString class.
Class for arbitrary precision integers.
uint64_t getZExtValue() const
Get zero extended value.
unsigned getBitWidth() const
Return the number of bits in the APInt.
unsigned getIndex(const MCSymbol *Sym, bool TLS=false)
Returns the index into the address pool with the given label/symbol.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
This class is intended to be used as a driving class for all asm writers.
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
MCSymbol * getSymbol(const GlobalValue *GV) const
TargetMachine & TM
Target machine description.
const MCAsmInfo * MAI
Target Asm Printer information.
MachineFunction * MF
The current machine function.
MapVector< unsigned, MBBSectionRange > MBBSectionRanges
virtual const MCSymbol * getFunctionFrameSymbol() const
Return symbol for the function pseudo stack if the stack frame is not a register based.
MCSymbol * createTempSymbol(const Twine &Name) const
MCSymbol * GetExternalSymbolSymbol(Twine Sym) const
Return the MCSymbol for the specified ExternalSymbol.
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
const DataLayout & getDataLayout() const
Return information about data layout.
void emitInt64(uint64_t Value) const
Emit a long long directive and value.
Basic type, like 'int' or 'float'.
unsigned getLineNo() const
StringRef getName() const
DIScope * getScope() const
DIGlobalVariable * getDecl() const
bool isDebugDirectivesOnly() const
static std::optional< DebugNameTableKind > getNameTableKind(StringRef Str)
static std::optional< DebugEmissionKind > getEmissionKind(StringRef Str)
DIEBlock - Represents a block of values.
DwarfExpression implementation for singular DW_AT_location.
Represents a pointer to a location list in the debug_loc section.
DIELoc - Represents an expression location.
A structured debug information entry.
DIE & addChild(DIE *Child)
Add a child to the DIE.
DIE & addChildFront(DIE *Child)
static DIE * get(BumpPtrAllocator &Alloc, dwarf::Tag Tag)
const DIE * getUnitDie() const
Climb up the parent chain to get the compile unit or type unit DIE that this DIE belongs to.
Holds a DIExpression and keeps track of how many operands have been consumed so far.
element_iterator elements_end() const
bool isEntryValue() const
Check if the expression consists of exactly one entry value operand.
element_iterator elements_begin() const
ArrayRef< uint64_t > getElements() const
uint64_t getElement(unsigned I) const
std::optional< SignedOrUnsignedConstant > isConstant() const
Determine whether this represents a constant value, if so.
static const DIExpression * extractAddressClass(const DIExpression *Expr, unsigned &AddrClass)
Checks if the last 4 elements of the expression are DW_OP_constu <DWARF Address Space> DW_OP_swap DW_...
DIDerivedType * getStaticDataMemberDeclaration() const
MDTuple * getTemplateParams() const
bool isLocalToUnit() const
StringRef getLinkageName() const
StringRef getDisplayName() const
bool isDefinition() const
DINodeArray getAnnotations() const
An imported module (C++ using directive or similar).
DISubprogram * getSubprogram() const
Get the subprogram for this scope.
Tagged DWARF-like metadata node.
dwarf::Tag getTag() const
Base class for scope-like contexts.
StringRef getName() const
DIScope * getScope() const
StringRef getName() const
uint32_t getAlignInBytes() const
DIScope * getScope() const
StringRef getName() const
unsigned getPointerSize(unsigned AS=0) const
Layout pointer size in bytes, rounded up to a whole number of bytes.
This class is defined as the common parent of DbgVariable and DbgLabel such that it could levarage po...
const DINode * getEntity() const
Accessors.
This class is used to track label information.
A single location or constant within a variable location description, with either a single entry (wit...
The location of a single variable, composed of an expression and 0 or more DbgValueLocEntries.
ArrayRef< DbgValueLocEntry > getLocEntries() const
This class is used to track local variable information.
bool isArtificial() const
Return true if DbgVariable is artificial.
dwarf::Tag getTag() const
bool isObjectPointer() const
const DILocalVariable * getVariable() const
StringRef getName() const
const DIType * getType() const
Loc::Variant & asVariant()
To workaround P2162R0 https://github.com/cplusplus/papers/issues/873 the base class subobject needs t...
MCSymbol * getLabelBeforeInsn(const MachineInstr *MI)
Return Label preceding the instruction.
MCSymbol * getLabelAfterInsn(const MachineInstr *MI)
Return Label immediately following the instruction.
ValueT lookup(const_arg_type_t< KeyT > Val) const
lookup - Return the entry for the specified key, or a default constructed value if no such entry exis...
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
bool useGNUAnalogForDwarf5Feature() const
Whether to use the GNU analog for a DWARF5 tag, attribute, or location atom.
void constructCallSiteParmEntryDIEs(DIE &CallSiteDIE, SmallVector< DbgCallSiteParam, 4 > &Params)
Construct call site parameter DIEs for the CallSiteDIE.
void attachLowHighPC(DIE &D, const MCSymbol *Begin, const MCSymbol *End)
void emitHeader(bool UseOffsets) override
Emit the header for this unit, not including the initial length field.
dwarf::Tag getDwarf5OrGNUTag(dwarf::Tag Tag) const
This takes a DWARF 5 tag and returns it or a GNU analog.
DIE & updateSubprogramScopeDIE(const DISubprogram *SP)
Find DIE for the given subprogram and attach appropriate DW_AT_low_pc and DW_AT_high_pc attributes.
void constructAbstractSubprogramScopeDIE(LexicalScope *Scope)
bool includeMinimalInlineScopes() const
DIE * getOrCreateImportedEntityDIE(const DIImportedEntity *IE)
Get or create a DIE for an imported entity.
void addBaseTypeRef(DIEValueList &Die, int64_t Idx)
void addGlobalNameForTypeUnit(StringRef Name, const DIScope *Context)
Add a new global name present in a type unit to this compile unit.
void finishEntityDefinition(const DbgEntity *Entity)
void addRange(RangeSpan Range)
addRange - Add an address range to the list of ranges for this unit.
void addAddrTableBase()
Add the DW_AT_addr_base attribute to the unit DIE.
DIE & constructCallSiteEntryDIE(DIE &ScopeDIE, const DISubprogram *CalleeSP, bool IsTail, const MCSymbol *PCAddr, const MCSymbol *CallAddr, unsigned CallReg)
Construct a call site entry DIE describing a call within Scope to a callee described by CalleeSP.
std::vector< BaseTypeRef > ExprRefedBaseTypes
DIE * constructInlinedScopeDIE(LexicalScope *Scope, DIE &ParentScopeDIE)
This scope represents an inlined body of a function.
void createBaseTypeDIEs()
void addGlobalType(const DIType *Ty, const DIE &Die, const DIScope *Context) override
Add a new global type to the compile unit.
void addScopeRangeList(DIE &ScopeDIE, SmallVector< RangeSpan, 2 > Range)
A helper function to construct a RangeSpanList for a given lexical scope.
uint64_t getDWOId() const
DIE * getOrCreateCommonBlock(const DICommonBlock *CB, ArrayRef< GlobalExpr > GlobalExprs)
void addVariableAddress(const DbgVariable &DV, DIE &Die, MachineLocation Location)
Add DW_AT_location attribute for a DbgVariable based on provided MachineLocation.
DIE * getLexicalBlockDIE(const DILexicalBlock *LB)
Get a DIE for the given DILexicalBlock.
void addGlobalName(StringRef Name, const DIE &Die, const DIScope *Context) override
Add a new global name to the compile unit.
void createAbstractEntity(const DINode *Node, LexicalScope *Scope)
void applyStmtList(DIE &D)
Apply the DW_AT_stmt_list from this compile unit to the specified DIE.
DIE * getOrCreateContextDIE(const DIScope *Ty) override
Construct a DIE for a given scope.
void applyCommonDbgVariableAttributes(const DbgVariable &Var, DIE &VariableDie)
Add attributes to Var which reflect the common attributes of VariableDie, namely those which are not ...
DIE * constructVariableDIE(DbgVariable &DV, bool Abstract=false)
Construct a DIE for the given DbgVariable.
dwarf::LocationAtom getDwarf5OrGNULocationAtom(dwarf::LocationAtom Loc) const
This takes a DWARF 5 location atom and either returns it or a GNU analog.
DIE & constructSubprogramScopeDIE(const DISubprogram *Sub, LexicalScope *Scope)
Construct a DIE for this subprogram scope.
DIE * getOrCreateGlobalVariableDIE(const DIGlobalVariable *GV, ArrayRef< GlobalExpr > GlobalExprs)
Get or create global variable DIE.
void addLocationAttribute(DIE *ToDIE, const DIGlobalVariable *GV, ArrayRef< GlobalExpr > GlobalExprs)
void applySubprogramAttributesToDefinition(const DISubprogram *SP, DIE &SPDie)
DIE * createAndAddScopeChildren(LexicalScope *Scope, DIE &ScopeDIE)
void addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr)
Add a Dwarf expression attribute data and value.
dwarf::Attribute getDwarf5OrGNUAttr(dwarf::Attribute Attr) const
This takes a DWARF 5 attribute and returns it or a GNU analog.
void addAddress(DIE &Die, dwarf::Attribute Attribute, const MachineLocation &Location)
Add an address attribute to a die based on the location provided.
void applyLabelAttributes(const DbgLabel &Label, DIE &LabelDie)
void addLocalLabelAddress(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Label)
addLocalLabelAddress - Add a dwarf label attribute data and value using DW_FORM_addr only.
DIE * constructLexicalScopeDIE(LexicalScope *Scope)
Construct new DW_TAG_lexical_block for this scope and attach DW_AT_low_pc/DW_AT_high_pc labels.
unsigned getOrCreateSourceID(const DIFile *File) override
Look up the source ID for the given file.
void constructScopeDIE(LexicalScope *Scope, DIE &ParentScopeDIE)
DwarfCompileUnit(unsigned UID, const DICompileUnit *Node, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU, UnitKind Kind=UnitKind::Full)
DIE * constructLabelDIE(DbgLabel &DL, const LexicalScope &Scope)
Construct a DIE for the given DbgLabel.
void addGlobalTypeUnitType(const DIType *Ty, const DIScope *Context)
Add a new global type present in a type unit to this compile unit.
DbgEntity * getExistingAbstractEntity(const DINode *Node)
bool hasDwarfPubSections() 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...
void addLocationList(DIE &Die, dwarf::Attribute Attribute, unsigned Index)
Add a Dwarf loclistptr attribute data and value.
void addComplexAddress(const DIExpression *DIExpr, DIE &Die, dwarf::Attribute Attribute, const MachineLocation &Location)
Start with the address based on the location provided, and generate the DWARF information necessary t...
DIE * constructImportedEntityDIE(const DIImportedEntity *IE)
DwarfCompileUnit & getCU() override
void attachRangesOrLowHighPC(DIE &D, SmallVector< RangeSpan, 2 > Ranges)
void finishSubprogramDefinition(const DISubprogram *SP)
Collects and handles dwarf debug information.
MDNodeSet & getLocalDeclsForScope(const DILocalScope *S)
std::optional< MD5::MD5Result > getMD5AsBytes(const DIFile *File) const
If the File has an MD5 checksum, return it as an MD5Result allocated in the MCContext.
bool useGNUTLSOpcode() const
Returns whether to use DW_OP_GNU_push_tls_address, instead of the standard DW_OP_form_tls_address opc...
bool useAddrOffsetForm() const
const DwarfCompileUnit * getPrevCU() const
Returns the previous CU that was being updated.
uint16_t getDwarfVersion() const
Returns the Dwarf Version.
void addAccelNamespace(const DwarfUnit &Unit, const DICompileUnit::DebugNameTableKind NameTableKind, StringRef Name, const DIE &Die)
bool alwaysUseRanges(const DwarfCompileUnit &) const
Returns whether range encodings should be used for single entry range lists.
void addSubprogramNames(const DwarfUnit &Unit, const DICompileUnit::DebugNameTableKind NameTableKind, const DISubprogram *SP, DIE &Die)
bool useAllLinkageNames() const
Returns whether we should emit all DW_AT_[MIPS_]linkage_name.
void insertSectionLabel(const MCSymbol *S)
dwarf::Form getDwarfSectionOffsetForm() const
Returns a suitable DWARF form to represent a section offset, i.e.
bool useAppleExtensionAttributes() const
void setPrevCU(const DwarfCompileUnit *PrevCU)
const MachineFunction * getCurrentFunction() const
void addArangeLabel(SymbolCU SCU)
Add a label so that arange data can be generated for it.
AddressPool & getAddressPool()
bool useSectionsAsReferences() const
Returns whether to use sections as labels rather than temp symbols.
void terminateLineTable(const DwarfCompileUnit *CU)
Terminate the line table by adding the last range label.
DwarfCompileUnit * lookupCU(const DIE *Die)
Find the matching DwarfCompileUnit for the given CU DIE.
const MCSymbol * getSectionLabel(const MCSection *S)
static void emitDebugLocValue(const AsmPrinter &AP, const DIBasicType *BT, const DbgValueLoc &Value, DwarfExpression &DwarfExpr)
bool useSplitDwarf() const
Returns whether or not to change the current debug info for the split dwarf proposal support.
bool useAddrOffsetExpressions() const
bool useRangesSection() const
Returns whether ranges section should be emitted.
void addAccelName(const DwarfUnit &Unit, const DICompileUnit::DebugNameTableKind NameTableKind, StringRef Name, const DIE &Die)
bool isLexicalScopeDIENull(LexicalScope *Scope)
A helper function to check whether the DIE for a given Scope is going to be null.
AccelTableKind getAccelTableKind() const
Returns what kind (if any) of accelerator tables to emit.
void setLocation(const MachineLocation &Loc, const DIExpression *DIExpr)
Set the location (Loc) and DIExpression (DIExpr) to describe.
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...
void setMemoryLocationKind()
Lock this down to become a memory location description.
std::optional< uint8_t > TagOffset
void setCallSiteParamValueFlag()
Lock this down to become a call site parameter location.
bool addMachineRegExpression(const TargetRegisterInfo &TRI, DIExpressionCursor &Expr, llvm::Register MachineReg, unsigned FragmentOffsetInBits=0)
Emit a machine register location.
void addExpression(DIExpressionCursor &&Expr)
Emit all remaining operations in the DIExpressionCursor.
void addWasmLocation(unsigned Index, uint64_t Offset)
Emit location information expressed via WebAssembly location + offset The Index is an identifier for ...
void beginEntryValueExpression(DIExpressionCursor &ExprCursor)
Begin emission of an entry value dwarf operation.
void addScopeLabel(LexicalScope *LS, DbgLabel *Label)
DenseMap< LexicalScope *, ScopeVars > & getScopeVariables()
DenseMap< LexicalScope *, LabelList > & getScopeLabels()
void addScopeVariable(LexicalScope *LS, DbgVariable *Var)
This dwarf writer support class manages information associated with a source file.
virtual DIE * getOrCreateTypeDIE(const MDNode *TyNode)
Find existing DIE or create new DIE for the given type.
DwarfDebug & getDwarfDebug() const
void addAnnotation(DIE &Buffer, DINodeArray Annotations)
Add DW_TAG_LLVM_annotation.
void addBlock(DIE &Die, dwarf::Attribute Attribute, DIELoc *Loc)
Add block data.
void addTemplateParams(DIE &Buffer, DINodeArray TParams)
Add template parameters in buffer.
virtual DIE * getOrCreateContextDIE(const DIScope *Context)
Get context owner's DIE.
void addAttribute(DIEValueList &Die, dwarf::Attribute Attribute, dwarf::Form Form, T &&Value)
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_FOR...
void addUInt(DIEValueList &Die, dwarf::Attribute Attribute, std::optional< dwarf::Form > Form, uint64_t Integer)
Add an unsigned integer attribute data and value.
void addString(DIE &Die, dwarf::Attribute Attribute, StringRef Str)
Add a string attribute data and value.
void addConstantValue(DIE &Die, const ConstantInt *CI, const DIType *Ty)
Add constant value entry in variable DIE.
DIE * getOrCreateNameSpace(const DINamespace *NS)
void insertDIE(const DINode *Desc, DIE *D)
Insert DIE into the map.
void addSectionDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, const MCSymbol *Lo)
addSectionDelta - Add a label delta attribute data and value.
const DICompileUnit * CUNode
MDNode for the compile unit.
DIE * getDIE(const DINode *D) const
Returns the DIE map slot for the specified debug variable.
MCSymbol * LabelBegin
The start of the unit within its section.
void addSInt(DIEValueList &Die, dwarf::Attribute Attribute, std::optional< dwarf::Form > Form, int64_t Integer)
Add an signed integer attribute data and value.
void addLabelDelta(DIEValueList &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, const MCSymbol *Lo)
Add a label delta attribute data and value.
void addLinkageName(DIE &Die, StringRef LinkageName)
Add a linkage name, if it isn't empty.
std::string getParentContextString(const DIScope *Context) const
Get string containing language specific context for a global name.
void addSourceLine(DIE &Die, unsigned Line, const DIFile *File)
Add location information to specified debug information entry.
void emitCommonHeader(bool UseOffsets, dwarf::UnitType UT)
Emit the common part of the header for this unit.
BumpPtrAllocator DIEValueAllocator
DIE * getOrCreateModule(const DIModule *M)
const DICompileUnit * getCUNode() const
DIE & createAndAddDIE(dwarf::Tag 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.
DIE * getOrCreateStaticMemberDIE(const DIDerivedType *DT)
Create new static data member DIE.
void addLabel(DIEValueList &Die, dwarf::Attribute Attribute, dwarf::Form Form, const MCSymbol *Label)
Add a Dwarf label attribute data and value.
void addConstantFPValue(DIE &Die, const ConstantFP *CFP)
Add constant value entry in variable DIE.
DIE * getOrCreateSubprogramDIE(const DISubprogram *SP, bool Minimal=false)
void addSectionLabel(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Label, const MCSymbol *Sec)
Add a Dwarf section label attribute data and value.
void addPoolOpAddress(DIEValueList &Die, const MCSymbol *Label)
void constructTypeDIE(DIE &Buffer, const DICompositeType *CTy)
MCSymbol * EndLabel
Emitted at the end of the CU and used to compute the CU Length field.
void addFlag(DIE &Die, dwarf::Attribute Attribute)
Add a flag that is true to the DIE.
AsmPrinter * Asm
Target of Dwarf emission.
unsigned getUniqueID() const
Gets Unique ID for this unit.
void addType(DIE &Entity, const DIType *Ty, dwarf::Attribute Attribute=dwarf::DW_AT_type)
Add a new type attribute to the specified entity.
void applySubprogramAttributes(const DISubprogram *SP, DIE &SPDie, bool SkipSPAttributes=false)
void addDIEEntry(DIE &Die, dwarf::Attribute Attribute, DIE &Entry)
Add a DIE attribute data and value.
LexicalScope - This class is used to track scope information.
Multi-value location description.
unsigned getDebugLocListIndex() const
std::optional< uint8_t > getDebugLocListTagOffset() const
Single value location description.
unsigned getCodePointerSize() const
Get the code pointer size in bytes.
Base class for the full range of assembler expressions which are needed for parsing.
MCSection * getDwarfRangesSection() const
MCSection * getDwarfAddrSection() const
MCSection * getDwarfLineSection() const
int getDwarfRegNum(MCRegister RegNum, bool isEH) const
Map a target register to an equivalent dwarf register number.
MCSymbol * getBeginSymbol()
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
bool isDefined() const
isDefined - Check if this symbol is defined (i.e., it has an address).
bool sameSection(const MachineBasicBlock *MBB) const
Returns true if this and MBB belong to the same section.
unsigned getSectionIDNum() const
Returns the unique section ID number of this basic block.
bool isEndSection() const
Returns true if this block ends any section.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
const LLVMTargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
A Module instance is used to store all the information related to an LLVM module.
StringRef getName() const
Get a short "name" for the module.
Wrapper class representing virtual and physical registers.
static constexpr bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
bool empty() const
Determine if the SetVector is empty or not.
bool insert(const value_type &X)
Insert a new element into the SetVector.
Implements a dense probed hash-table based set with some number of buckets stored inline.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void append(ItTy in_start, ItTy in_end)
Add the specified range to the end of the SmallVector.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StackOffset holds a fixed and a scalable offset in bytes.
StringRef - Represent a constant reference to a string, i.e.
std::string str() const
str - Get the contents as an std::string.
constexpr bool empty() const
empty - Check if the string is empty.
Information about stack frame layout on the target.
virtual DwarfFrameBase getDwarfFrameBase(const MachineFunction &MF) const
Return the frame base information to be encoded in the DWARF subprogram debug info.
virtual StackOffset getFrameIndexReference(const MachineFunction &MF, int FI, Register &FrameReg) const
getFrameIndexReference - This method should return the base register and offset used to reference a f...
virtual MCRegister getStaticBase() const
Returns the register used as static base in RWPI variants.
static SectionKind getKindForGlobal(const GlobalObject *GO, const TargetMachine &TM)
Classify the specified global variable into a set of target independent categories embodied in Sectio...
bool supportDebugThreadLocalLocation() const
Target supports TLS offset relocation in debug section?
virtual const MCExpr * getIndirectSymViaRWPI(const MCSymbol *Sym) const
Get the target specific RWPI relocation.
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.
const Triple & getTargetTriple() const
bool useEmulatedTLS() const
Returns true if this target uses emulated TLS.
Reloc::Model getRelocationModel() const
Returns the code generation relocation model.
const MCRegisterInfo * getMCRegisterInfo() const
bool DisableFramePointerElim(const MachineFunction &MF) const
DisableFramePointerElim - This returns true if frame pointer elimination optimization should be disab...
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
virtual const TargetFrameLowering * getFrameLowering() const
bool isNVPTX() const
Tests whether the target is NVPTX (32- or 64-bit).
bool isWasm() const
Tests whether the target is wasm (32- and 64-bit).
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
StringRef toStringRef(SmallVectorImpl< char > &Out) const
This returns the twine as a single StringRef if it can be represented as such.
std::pair< iterator, bool > insert(const ValueT &V)
size_type count(const_arg_type_t< ValueT > V) const
Return 1 if the specified key is in the set, 0 otherwise.
A DeclContext is a named program scope that is used for ODR uniquing of types.
NodeTy * getNextNode()
Get the next node, or nullptr for the list tail.
StringRef AttributeEncodingString(unsigned Encoding)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
UnitType
Constants for unit types in DWARF v5.
@ WASM_SYMBOL_TYPE_GLOBAL
This is an optimization pass for GlobalISel generic memory operations.
uint64_t divideCeil(uint64_t Numerator, uint64_t Denominator)
Returns the integer ceil(Numerator / Denominator).
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
auto reverse(ContainerTy &&C)
@ Apple
.apple_names, .apple_namespaces, .apple_types, .apple_objc.
@ Global
Append to llvm.global_dtors.
auto count(R &&Range, const E &Element)
Wrapper function around std::count to count the number of times an element Element occurs in the give...
DWARFExpression::Operation Op
std::pair< const MachineInstr *, const MachineInstr * > InsnRange
InsnRange - This is used to track range of instructions with identical lexical scope.
DISubprogram * getDISubprogram(const MDNode *Scope)
Find subprogram that is enclosing this scope.
Single location defined by (potentially multiple) EntryValueInfo.
std::set< EntryValueInfo > EntryValues
Single location defined by (potentially multiple) MMI entries.
const std::set< FrameIndexExpr > & getFrameIndexExprs() const
Get the FI entries, sorted by fragment offset.
Helper used to pair up a symbol and its DWARF compile unit.
union llvm::TargetFrameLowering::DwarfFrameBase::@235 Location
enum llvm::TargetFrameLowering::DwarfFrameBase::FrameBaseKind Kind
struct WasmFrameBase WasmLoc
This struct describes target specific location.