mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-13 07:50:50 +00:00
DwarfUnit: Suddently, DIE references, everywhere.
This'll make changing to unique_ptr ownership of DIEs easier since the usages will now have '*' on them making them textually compatible between unique_ptr and raw pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207253 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
db8c1ae04e
commit
f6e00376e7
@ -323,7 +323,7 @@ DIE *DwarfDebug::updateSubprogramScopeDIE(DwarfCompileUnit &SPCU,
|
||||
if (DIE *AbsSPDIE = AbstractSPDies.lookup(SP)) {
|
||||
// Pick up abstract subprogram DIE.
|
||||
SPDie = SPCU.createAndAddDIE(dwarf::DW_TAG_subprogram, *SPCU.getUnitDie());
|
||||
SPCU.addDIEEntry(SPDie, dwarf::DW_AT_abstract_origin, AbsSPDIE);
|
||||
SPCU.addDIEEntry(*SPDie, dwarf::DW_AT_abstract_origin, AbsSPDIE);
|
||||
} else {
|
||||
DISubprogram SPDecl = SP.getFunctionDeclaration();
|
||||
if (!SPDecl.isSubprogram()) {
|
||||
@ -335,7 +335,7 @@ DIE *DwarfDebug::updateSubprogramScopeDIE(DwarfCompileUnit &SPCU,
|
||||
DIScope SPContext = resolve(SP.getContext());
|
||||
if (SP.isDefinition() && !SPContext.isCompileUnit() &&
|
||||
!SPContext.isFile() && !isSubprogramContext(SPContext)) {
|
||||
SPCU.addFlag(SPDie, dwarf::DW_AT_declaration);
|
||||
SPCU.addFlag(*SPDie, dwarf::DW_AT_declaration);
|
||||
|
||||
// Add arguments.
|
||||
DICompositeType SPTy = SP.getType();
|
||||
@ -346,16 +346,16 @@ DIE *DwarfDebug::updateSubprogramScopeDIE(DwarfCompileUnit &SPCU,
|
||||
DIE *SPDeclDie = SPDie;
|
||||
SPDie =
|
||||
SPCU.createAndAddDIE(dwarf::DW_TAG_subprogram, *SPCU.getUnitDie());
|
||||
SPCU.addDIEEntry(SPDie, dwarf::DW_AT_specification, SPDeclDie);
|
||||
SPCU.addDIEEntry(*SPDie, dwarf::DW_AT_specification, SPDeclDie);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
attachLowHighPC(SPCU, SPDie, FunctionBeginSym, FunctionEndSym);
|
||||
attachLowHighPC(SPCU, *SPDie, FunctionBeginSym, FunctionEndSym);
|
||||
|
||||
const TargetRegisterInfo *RI = Asm->TM.getRegisterInfo();
|
||||
MachineLocation Location(RI->getFrameRegister(*Asm->MF));
|
||||
SPCU.addAddress(SPDie, dwarf::DW_AT_frame_base, Location);
|
||||
SPCU.addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
|
||||
|
||||
// Add name to the name table, we do this here because we're guaranteed
|
||||
// to have concrete versions of our DW_TAG_subprogram nodes.
|
||||
@ -385,7 +385,7 @@ bool DwarfDebug::isLexicalScopeDIENull(LexicalScope *Scope) {
|
||||
return !End;
|
||||
}
|
||||
|
||||
static void addSectionLabel(AsmPrinter &Asm, DwarfUnit &U, DIE *D,
|
||||
static void addSectionLabel(AsmPrinter &Asm, DwarfUnit &U, DIE &D,
|
||||
dwarf::Attribute A, const MCSymbol *L,
|
||||
const MCSymbol *Sec) {
|
||||
if (Asm.MAI->doesDwarfUseRelocationsAcrossSections())
|
||||
@ -394,7 +394,7 @@ static void addSectionLabel(AsmPrinter &Asm, DwarfUnit &U, DIE *D,
|
||||
U.addSectionDelta(D, A, L, Sec);
|
||||
}
|
||||
|
||||
void DwarfDebug::addScopeRangeList(DwarfCompileUnit &TheCU, DIE *ScopeDIE,
|
||||
void DwarfDebug::addScopeRangeList(DwarfCompileUnit &TheCU, DIE &ScopeDIE,
|
||||
const SmallVectorImpl<InsnRange> &Range) {
|
||||
// Emit offset in .debug_range as a relocatable label. emitDIE will handle
|
||||
// emitting it appropriately.
|
||||
@ -434,7 +434,7 @@ DIE *DwarfDebug::constructLexicalScopeDIE(DwarfCompileUnit &TheCU,
|
||||
|
||||
// If we have multiple ranges, emit them into the range section.
|
||||
if (ScopeRanges.size() > 1) {
|
||||
addScopeRangeList(TheCU, ScopeDIE, ScopeRanges);
|
||||
addScopeRangeList(TheCU, *ScopeDIE, ScopeRanges);
|
||||
return ScopeDIE;
|
||||
}
|
||||
|
||||
@ -447,7 +447,7 @@ DIE *DwarfDebug::constructLexicalScopeDIE(DwarfCompileUnit &TheCU,
|
||||
assert(Start->isDefined() && "Invalid starting label for an inlined scope!");
|
||||
assert(End->isDefined() && "Invalid end label for an inlined scope!");
|
||||
|
||||
attachLowHighPC(TheCU, ScopeDIE, Start, End);
|
||||
attachLowHighPC(TheCU, *ScopeDIE, Start, End);
|
||||
|
||||
return ScopeDIE;
|
||||
}
|
||||
@ -471,11 +471,11 @@ DIE *DwarfDebug::constructInlinedScopeDIE(DwarfCompileUnit &TheCU,
|
||||
}
|
||||
|
||||
DIE *ScopeDIE = new DIE(dwarf::DW_TAG_inlined_subroutine);
|
||||
TheCU.addDIEEntry(ScopeDIE, dwarf::DW_AT_abstract_origin, OriginDIE);
|
||||
TheCU.addDIEEntry(*ScopeDIE, dwarf::DW_AT_abstract_origin, OriginDIE);
|
||||
|
||||
// If we have multiple ranges, emit them into the range section.
|
||||
if (ScopeRanges.size() > 1)
|
||||
addScopeRangeList(TheCU, ScopeDIE, ScopeRanges);
|
||||
addScopeRangeList(TheCU, *ScopeDIE, ScopeRanges);
|
||||
else {
|
||||
SmallVectorImpl<InsnRange>::const_iterator RI = ScopeRanges.begin();
|
||||
MCSymbol *StartLabel = getLabelBeforeInsn(RI->first);
|
||||
@ -488,16 +488,16 @@ DIE *DwarfDebug::constructInlinedScopeDIE(DwarfCompileUnit &TheCU,
|
||||
"Invalid starting label for an inlined scope!");
|
||||
assert(EndLabel->isDefined() && "Invalid end label for an inlined scope!");
|
||||
|
||||
attachLowHighPC(TheCU, ScopeDIE, StartLabel, EndLabel);
|
||||
attachLowHighPC(TheCU, *ScopeDIE, StartLabel, EndLabel);
|
||||
}
|
||||
|
||||
InlinedSubprogramDIEs.insert(OriginDIE);
|
||||
|
||||
// Add the call site information to the DIE.
|
||||
DILocation DL(Scope->getInlinedAt());
|
||||
TheCU.addUInt(ScopeDIE, dwarf::DW_AT_call_file, None,
|
||||
TheCU.addUInt(*ScopeDIE, dwarf::DW_AT_call_file, None,
|
||||
TheCU.getOrCreateSourceID(DL.getFilename(), DL.getDirectory()));
|
||||
TheCU.addUInt(ScopeDIE, dwarf::DW_AT_call_line, None, DL.getLineNumber());
|
||||
TheCU.addUInt(*ScopeDIE, dwarf::DW_AT_call_line, None, DL.getLineNumber());
|
||||
|
||||
// Add name to the name table, we do this here because we're guaranteed
|
||||
// to have concrete versions of our DW_TAG_inlined_subprogram nodes.
|
||||
@ -614,12 +614,12 @@ DIE *DwarfDebug::constructScopeDIE(DwarfCompileUnit &TheCU,
|
||||
ScopeDIE->addChild(I);
|
||||
|
||||
if (DS.isSubprogram() && ObjectPointer != nullptr)
|
||||
TheCU.addDIEEntry(ScopeDIE, dwarf::DW_AT_object_pointer, ObjectPointer);
|
||||
TheCU.addDIEEntry(*ScopeDIE, dwarf::DW_AT_object_pointer, ObjectPointer);
|
||||
|
||||
return ScopeDIE;
|
||||
}
|
||||
|
||||
void DwarfDebug::addGnuPubAttributes(DwarfUnit &U, DIE *D) const {
|
||||
void DwarfDebug::addGnuPubAttributes(DwarfUnit &U, DIE &D) const {
|
||||
if (!GenerateGnuPubSections)
|
||||
return;
|
||||
|
||||
@ -646,10 +646,10 @@ DwarfCompileUnit &DwarfDebug::constructDwarfCompileUnit(DICompileUnit DIUnit) {
|
||||
Asm->OutStreamer.getContext().setMCLineTableCompilationDir(
|
||||
NewCU.getUniqueID(), CompilationDir);
|
||||
|
||||
NewCU.addString(Die, dwarf::DW_AT_producer, DIUnit.getProducer());
|
||||
NewCU.addUInt(Die, dwarf::DW_AT_language, dwarf::DW_FORM_data2,
|
||||
NewCU.addString(*Die, dwarf::DW_AT_producer, DIUnit.getProducer());
|
||||
NewCU.addUInt(*Die, dwarf::DW_AT_language, dwarf::DW_FORM_data2,
|
||||
DIUnit.getLanguage());
|
||||
NewCU.addString(Die, dwarf::DW_AT_name, FN);
|
||||
NewCU.addString(*Die, dwarf::DW_AT_name, FN);
|
||||
|
||||
if (!useSplitDwarf()) {
|
||||
NewCU.initStmtList(DwarfLineSectionSym);
|
||||
@ -657,20 +657,20 @@ DwarfCompileUnit &DwarfDebug::constructDwarfCompileUnit(DICompileUnit DIUnit) {
|
||||
// If we're using split dwarf the compilation dir is going to be in the
|
||||
// skeleton CU and so we don't need to duplicate it here.
|
||||
if (!CompilationDir.empty())
|
||||
NewCU.addString(Die, dwarf::DW_AT_comp_dir, CompilationDir);
|
||||
NewCU.addString(*Die, dwarf::DW_AT_comp_dir, CompilationDir);
|
||||
|
||||
addGnuPubAttributes(NewCU, Die);
|
||||
addGnuPubAttributes(NewCU, *Die);
|
||||
}
|
||||
|
||||
if (DIUnit.isOptimized())
|
||||
NewCU.addFlag(Die, dwarf::DW_AT_APPLE_optimized);
|
||||
NewCU.addFlag(*Die, dwarf::DW_AT_APPLE_optimized);
|
||||
|
||||
StringRef Flags = DIUnit.getFlags();
|
||||
if (!Flags.empty())
|
||||
NewCU.addString(Die, dwarf::DW_AT_APPLE_flags, Flags);
|
||||
NewCU.addString(*Die, dwarf::DW_AT_APPLE_flags, Flags);
|
||||
|
||||
if (unsigned RVer = DIUnit.getRunTimeVersion())
|
||||
NewCU.addUInt(Die, dwarf::DW_AT_APPLE_major_runtime_vers,
|
||||
NewCU.addUInt(*Die, dwarf::DW_AT_APPLE_major_runtime_vers,
|
||||
dwarf::DW_FORM_data1, RVer);
|
||||
|
||||
if (!FirstCU)
|
||||
@ -707,7 +707,7 @@ void DwarfDebug::constructSubprogramDIE(DwarfCompileUnit &TheCU,
|
||||
// class type.
|
||||
return;
|
||||
|
||||
DIE *SubprogramDie = TheCU.getOrCreateSubprogramDIE(SP);
|
||||
DIE &SubprogramDie = *TheCU.getOrCreateSubprogramDIE(SP);
|
||||
|
||||
// Expose as a global name.
|
||||
TheCU.addGlobalName(SP.getName(), SubprogramDie, resolve(SP.getContext()));
|
||||
@ -734,7 +734,7 @@ void DwarfDebug::constructImportedEntityDIE(DwarfCompileUnit &TheCU,
|
||||
assert(Module.Verify() &&
|
||||
"Use one of the MDNode * overloads to handle invalid metadata");
|
||||
assert(Context && "Should always have a context for an imported_module");
|
||||
DIE *IMDie = TheCU.createAndAddDIE(Module.getTag(), *Context, Module);
|
||||
DIE &IMDie = *TheCU.createAndAddDIE(Module.getTag(), *Context, Module);
|
||||
DIE *EntityDie;
|
||||
DIDescriptor Entity = resolve(Module.getEntity());
|
||||
if (Entity.isNameSpace())
|
||||
@ -819,11 +819,11 @@ void DwarfDebug::beginModule() {
|
||||
void DwarfDebug::computeInlinedDIEs() {
|
||||
// Attach DW_AT_inline attribute with inlined subprogram DIEs.
|
||||
for (DIE *ISP : InlinedSubprogramDIEs)
|
||||
FirstCU->addUInt(ISP, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
|
||||
FirstCU->addUInt(*ISP, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
|
||||
|
||||
for (const auto &AI : AbstractSPDies) {
|
||||
DIE *ISP = AI.second;
|
||||
if (InlinedSubprogramDIEs.count(ISP))
|
||||
DIE &ISP = *AI.second;
|
||||
if (InlinedSubprogramDIEs.count(&ISP))
|
||||
continue;
|
||||
FirstCU->addUInt(ISP, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
|
||||
}
|
||||
@ -893,19 +893,19 @@ void DwarfDebug::finalizeModuleInfo() {
|
||||
if (useSplitDwarf()) {
|
||||
// Emit a unique identifier for this CU.
|
||||
uint64_t ID = DIEHash(Asm).computeCUSignature(*TheU->getUnitDie());
|
||||
TheU->addUInt(TheU->getUnitDie(), dwarf::DW_AT_GNU_dwo_id,
|
||||
TheU->addUInt(*TheU->getUnitDie(), dwarf::DW_AT_GNU_dwo_id,
|
||||
dwarf::DW_FORM_data8, ID);
|
||||
SkCU->addUInt(SkCU->getUnitDie(), dwarf::DW_AT_GNU_dwo_id,
|
||||
SkCU->addUInt(*SkCU->getUnitDie(), dwarf::DW_AT_GNU_dwo_id,
|
||||
dwarf::DW_FORM_data8, ID);
|
||||
|
||||
// We don't keep track of which addresses are used in which CU so this
|
||||
// is a bit pessimistic under LTO.
|
||||
if (!AddrPool.isEmpty())
|
||||
addSectionLabel(*Asm, *SkCU, SkCU->getUnitDie(),
|
||||
addSectionLabel(*Asm, *SkCU, *SkCU->getUnitDie(),
|
||||
dwarf::DW_AT_GNU_addr_base, DwarfAddrSectionSym,
|
||||
DwarfAddrSectionSym);
|
||||
if (!TheU->getRangeLists().empty())
|
||||
addSectionLabel(*Asm, *SkCU, SkCU->getUnitDie(),
|
||||
addSectionLabel(*Asm, *SkCU, *SkCU->getUnitDie(),
|
||||
dwarf::DW_AT_GNU_ranges_base,
|
||||
DwarfDebugRangeSectionSym, DwarfDebugRangeSectionSym);
|
||||
}
|
||||
@ -921,7 +921,7 @@ void DwarfDebug::finalizeModuleInfo() {
|
||||
unsigned NumRanges = TheU->getRanges().size();
|
||||
if (NumRanges) {
|
||||
if (NumRanges > 1) {
|
||||
addSectionLabel(*Asm, U, U.getUnitDie(), dwarf::DW_AT_ranges,
|
||||
addSectionLabel(*Asm, U, *U.getUnitDie(), dwarf::DW_AT_ranges,
|
||||
Asm->GetTempSymbol("cu_ranges", U.getUniqueID()),
|
||||
DwarfDebugRangeSectionSym);
|
||||
|
||||
@ -929,13 +929,13 @@ void DwarfDebug::finalizeModuleInfo() {
|
||||
// DW_AT_ranges to specify the default base address for use in
|
||||
// location lists (see Section 2.6.2) and range lists (see Section
|
||||
// 2.17.3).
|
||||
U.addUInt(U.getUnitDie(), dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr,
|
||||
U.addUInt(*U.getUnitDie(), dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr,
|
||||
0);
|
||||
} else {
|
||||
RangeSpan &Range = TheU->getRanges().back();
|
||||
U.addLocalLabelAddress(U.getUnitDie(), dwarf::DW_AT_low_pc,
|
||||
U.addLocalLabelAddress(*U.getUnitDie(), dwarf::DW_AT_low_pc,
|
||||
Range.getStart());
|
||||
U.addLabelDelta(U.getUnitDie(), dwarf::DW_AT_high_pc, Range.getEnd(),
|
||||
U.addLabelDelta(*U.getUnitDie(), dwarf::DW_AT_high_pc, Range.getEnd(),
|
||||
Range.getStart());
|
||||
}
|
||||
}
|
||||
@ -1668,7 +1668,7 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
|
||||
constructScopeDIE(TheCU, AScope);
|
||||
}
|
||||
|
||||
DIE *CurFnDIE = constructScopeDIE(TheCU, FnScope);
|
||||
DIE &CurFnDIE = *constructScopeDIE(TheCU, FnScope);
|
||||
if (!CurFn->getTarget().Options.DisableFramePointerElim(*CurFn))
|
||||
TheCU.addFlag(CurFnDIE, dwarf::DW_AT_APPLE_omit_frame_ptr);
|
||||
|
||||
@ -2384,7 +2384,7 @@ void DwarfDebug::emitDebugRanges() {
|
||||
|
||||
// DWARF5 Experimental Separate Dwarf emitters.
|
||||
|
||||
void DwarfDebug::initSkeletonUnit(const DwarfUnit &U, DIE *Die,
|
||||
void DwarfDebug::initSkeletonUnit(const DwarfUnit &U, DIE &Die,
|
||||
std::unique_ptr<DwarfUnit> NewU) {
|
||||
NewU->addLocalString(Die, dwarf::DW_AT_GNU_dwo_name,
|
||||
U.getCUNode().getSplitDebugFilename());
|
||||
@ -2411,7 +2411,7 @@ DwarfCompileUnit &DwarfDebug::constructSkeletonCU(const DwarfCompileUnit &CU) {
|
||||
|
||||
NewCU.initStmtList(DwarfLineSectionSym);
|
||||
|
||||
initSkeletonUnit(CU, Die, std::move(OwnedUnit));
|
||||
initSkeletonUnit(CU, *Die, std::move(OwnedUnit));
|
||||
|
||||
return NewCU;
|
||||
}
|
||||
@ -2431,7 +2431,7 @@ DwarfTypeUnit &DwarfDebug::constructSkeletonTU(DwarfTypeUnit &TU) {
|
||||
NewTU.initSection(
|
||||
Asm->getObjFileLowering().getDwarfTypesSection(TU.getTypeSignature()));
|
||||
|
||||
initSkeletonUnit(TU, Die, std::move(OwnedUnit));
|
||||
initSkeletonUnit(TU, *Die, std::move(OwnedUnit));
|
||||
return NewTU;
|
||||
}
|
||||
|
||||
@ -2479,7 +2479,7 @@ MCDwarfDwoLineTable *DwarfDebug::getDwoLineTable(const DwarfCompileUnit &CU) {
|
||||
}
|
||||
|
||||
void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
|
||||
StringRef Identifier, DIE *RefDie,
|
||||
StringRef Identifier, DIE &RefDie,
|
||||
DICompositeType CTy) {
|
||||
// Flag the type unit reference as a declaration so that if it contains
|
||||
// members (implicit special members, static data member definitions, member
|
||||
@ -2501,7 +2501,7 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
|
||||
TU = &NewTU;
|
||||
InfoHolder.addUnit(std::move(OwnedUnit));
|
||||
|
||||
NewTU.addUInt(UnitDie, dwarf::DW_AT_language, dwarf::DW_FORM_data2,
|
||||
NewTU.addUInt(*UnitDie, dwarf::DW_AT_language, dwarf::DW_FORM_data2,
|
||||
CU.getLanguage());
|
||||
|
||||
MD5 Hash;
|
||||
@ -2528,7 +2528,7 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
|
||||
CU.addDIETypeSignature(RefDie, NewTU);
|
||||
}
|
||||
|
||||
void DwarfDebug::attachLowHighPC(DwarfCompileUnit &Unit, DIE *D,
|
||||
void DwarfDebug::attachLowHighPC(DwarfCompileUnit &Unit, DIE &D,
|
||||
MCSymbol *Begin, MCSymbol *End) {
|
||||
Unit.addLabelAddress(D, dwarf::DW_AT_low_pc, Begin);
|
||||
if (DwarfVersion < 4)
|
||||
|
@ -352,7 +352,7 @@ class DwarfDebug : public AsmPrinterHandler {
|
||||
|
||||
/// \brief A helper function to construct a RangeSpanList for a given
|
||||
/// lexical scope.
|
||||
void addScopeRangeList(DwarfCompileUnit &TheCU, DIE *ScopeDIE,
|
||||
void addScopeRangeList(DwarfCompileUnit &TheCU, DIE &ScopeDIE,
|
||||
const SmallVectorImpl<InsnRange> &Range);
|
||||
|
||||
/// \brief Construct new DW_TAG_lexical_block for this scope and
|
||||
@ -453,7 +453,7 @@ class DwarfDebug : public AsmPrinterHandler {
|
||||
/// DWARF 5 Experimental Split Dwarf Emitters
|
||||
|
||||
/// \brief Initialize common features of skeleton units.
|
||||
void initSkeletonUnit(const DwarfUnit &U, DIE *Die,
|
||||
void initSkeletonUnit(const DwarfUnit &U, DIE &Die,
|
||||
std::unique_ptr<DwarfUnit> NewU);
|
||||
|
||||
/// \brief Construct the split debug info compile unit for the debug info
|
||||
@ -478,7 +478,7 @@ class DwarfDebug : public AsmPrinterHandler {
|
||||
|
||||
/// Flags to let the linker know we have emitted new style pubnames. Only
|
||||
/// emit it here if we don't have a skeleton CU for split dwarf.
|
||||
void addGnuPubAttributes(DwarfUnit &U, DIE *D) const;
|
||||
void addGnuPubAttributes(DwarfUnit &U, DIE &D) const;
|
||||
|
||||
/// \brief Create new DwarfCompileUnit for the given metadata node with tag
|
||||
/// DW_TAG_compile_unit.
|
||||
@ -535,7 +535,7 @@ class DwarfDebug : public AsmPrinterHandler {
|
||||
/// \brief Return Label immediately following the instruction.
|
||||
MCSymbol *getLabelAfterInsn(const MachineInstr *MI);
|
||||
|
||||
void attachLowHighPC(DwarfCompileUnit &Unit, DIE *D, MCSymbol *Begin,
|
||||
void attachLowHighPC(DwarfCompileUnit &Unit, DIE &D, MCSymbol *Begin,
|
||||
MCSymbol *End);
|
||||
|
||||
public:
|
||||
@ -573,7 +573,7 @@ public:
|
||||
/// \brief Add a DIE to the set of types that we're going to pull into
|
||||
/// type units.
|
||||
void addDwarfTypeUnitType(DwarfCompileUnit &CU, StringRef Identifier,
|
||||
DIE *Die, DICompositeType CTy);
|
||||
DIE &Die, DICompositeType CTy);
|
||||
|
||||
/// \brief Add a label so that arange data can be generated for it.
|
||||
void addArangeLabel(SymbolCU SCU) { ArangeLabels.push_back(SCU); }
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -247,10 +247,10 @@ public:
|
||||
|
||||
/// addGlobalName - Add a new global entity to the compile unit.
|
||||
///
|
||||
void addGlobalName(StringRef Name, DIE *Die, DIScope Context);
|
||||
void addGlobalName(StringRef Name, DIE &Die, DIScope Context);
|
||||
|
||||
/// addAccelNamespace - Add a new name to the namespace accelerator table.
|
||||
void addAccelNamespace(StringRef Name, const DIE *Die);
|
||||
void addAccelNamespace(StringRef Name, const DIE &Die);
|
||||
|
||||
/// getDIE - Returns the debug information entry map slot for the
|
||||
/// specified debug variable. We delegate the request to DwarfDebug
|
||||
@ -273,113 +273,113 @@ public:
|
||||
void addDie(DIE *Buffer) { UnitDie->addChild(Buffer); }
|
||||
|
||||
/// addFlag - Add a flag that is true to the DIE.
|
||||
void addFlag(DIE *Die, dwarf::Attribute Attribute);
|
||||
void addFlag(DIE &Die, dwarf::Attribute Attribute);
|
||||
|
||||
/// addUInt - Add an unsigned integer attribute data and value.
|
||||
void addUInt(DIE *Die, dwarf::Attribute Attribute, Optional<dwarf::Form> Form,
|
||||
void addUInt(DIE &Die, dwarf::Attribute Attribute, Optional<dwarf::Form> Form,
|
||||
uint64_t Integer);
|
||||
|
||||
void addUInt(DIE *Block, dwarf::Form Form, uint64_t Integer);
|
||||
void addUInt(DIE &Block, dwarf::Form Form, uint64_t Integer);
|
||||
|
||||
/// addSInt - Add an signed integer attribute data and value.
|
||||
void addSInt(DIE *Die, dwarf::Attribute Attribute, Optional<dwarf::Form> Form,
|
||||
void addSInt(DIE &Die, dwarf::Attribute Attribute, Optional<dwarf::Form> Form,
|
||||
int64_t Integer);
|
||||
|
||||
void addSInt(DIELoc *Die, Optional<dwarf::Form> Form, int64_t Integer);
|
||||
void addSInt(DIELoc &Die, Optional<dwarf::Form> Form, int64_t Integer);
|
||||
|
||||
/// addString - Add a string attribute data and value.
|
||||
void addString(DIE *Die, dwarf::Attribute Attribute, const StringRef Str);
|
||||
void addString(DIE &Die, dwarf::Attribute Attribute, const StringRef Str);
|
||||
|
||||
/// addLocalString - Add a string attribute data and value.
|
||||
void addLocalString(DIE *Die, dwarf::Attribute Attribute,
|
||||
void addLocalString(DIE &Die, dwarf::Attribute Attribute,
|
||||
const StringRef Str);
|
||||
|
||||
/// addExpr - Add a Dwarf expression attribute data and value.
|
||||
void addExpr(DIELoc *Die, dwarf::Form Form, const MCExpr *Expr);
|
||||
void addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr);
|
||||
|
||||
/// addLabel - Add a Dwarf label attribute data and value.
|
||||
void addLabel(DIE *Die, dwarf::Attribute Attribute, dwarf::Form Form,
|
||||
void addLabel(DIE &Die, dwarf::Attribute Attribute, dwarf::Form Form,
|
||||
const MCSymbol *Label);
|
||||
|
||||
void addLabel(DIELoc *Die, dwarf::Form Form, const MCSymbol *Label);
|
||||
void addLabel(DIELoc &Die, dwarf::Form Form, const MCSymbol *Label);
|
||||
|
||||
/// addLocationList - Add a Dwarf loclistptr attribute data and value.
|
||||
void addLocationList(DIE *Die, dwarf::Attribute Attribute, unsigned Index);
|
||||
void addLocationList(DIE &Die, dwarf::Attribute Attribute, unsigned Index);
|
||||
|
||||
/// addSectionLabel - Add a Dwarf section label attribute data and value.
|
||||
///
|
||||
void addSectionLabel(DIE *Die, dwarf::Attribute Attribute,
|
||||
void addSectionLabel(DIE &Die, dwarf::Attribute Attribute,
|
||||
const MCSymbol *Label);
|
||||
|
||||
/// addSectionOffset - Add an offset into a section attribute data and value.
|
||||
///
|
||||
void addSectionOffset(DIE *Die, dwarf::Attribute Attribute, uint64_t Integer);
|
||||
void addSectionOffset(DIE &Die, dwarf::Attribute Attribute, uint64_t Integer);
|
||||
|
||||
/// addOpAddress - 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.
|
||||
void addOpAddress(DIELoc *Die, const MCSymbol *Label);
|
||||
void addOpAddress(DIELoc &Die, const MCSymbol *Label);
|
||||
|
||||
/// addSectionDelta - Add a label delta attribute data and value.
|
||||
void addSectionDelta(DIE *Die, dwarf::Attribute Attribute, const MCSymbol *Hi,
|
||||
void addSectionDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi,
|
||||
const MCSymbol *Lo);
|
||||
|
||||
/// addLabelDelta - Add a label delta attribute data and value.
|
||||
void addLabelDelta(DIE *Die, dwarf::Attribute Attribute, const MCSymbol *Hi,
|
||||
void addLabelDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi,
|
||||
const MCSymbol *Lo);
|
||||
|
||||
/// addDIEEntry - Add a DIE attribute data and value.
|
||||
void addDIEEntry(DIE *Die, dwarf::Attribute Attribute, DIE *Entry);
|
||||
void addDIEEntry(DIE &Die, dwarf::Attribute Attribute, DIE *Entry);
|
||||
|
||||
/// addDIEEntry - Add a DIE attribute data and value.
|
||||
void addDIEEntry(DIE *Die, dwarf::Attribute Attribute, DIEEntry *Entry);
|
||||
void addDIEEntry(DIE &Die, dwarf::Attribute Attribute, DIEEntry *Entry);
|
||||
|
||||
void addDIETypeSignature(DIE *Die, const DwarfTypeUnit &Type);
|
||||
void addDIETypeSignature(DIE &Die, const DwarfTypeUnit &Type);
|
||||
|
||||
/// addBlock - Add block data.
|
||||
void addBlock(DIE *Die, dwarf::Attribute Attribute, DIELoc *Block);
|
||||
void addBlock(DIE &Die, dwarf::Attribute Attribute, DIELoc *Block);
|
||||
|
||||
/// addBlock - Add block data.
|
||||
void addBlock(DIE *Die, dwarf::Attribute Attribute, DIEBlock *Block);
|
||||
void addBlock(DIE &Die, dwarf::Attribute Attribute, DIEBlock *Block);
|
||||
|
||||
/// addSourceLine - Add location information to specified debug information
|
||||
/// entry.
|
||||
void addSourceLine(DIE *Die, unsigned Line, StringRef File,
|
||||
void addSourceLine(DIE &Die, unsigned Line, StringRef File,
|
||||
StringRef Directory);
|
||||
void addSourceLine(DIE *Die, DIVariable V);
|
||||
void addSourceLine(DIE *Die, DIGlobalVariable G);
|
||||
void addSourceLine(DIE *Die, DISubprogram SP);
|
||||
void addSourceLine(DIE *Die, DIType Ty);
|
||||
void addSourceLine(DIE *Die, DINameSpace NS);
|
||||
void addSourceLine(DIE *Die, DIObjCProperty Ty);
|
||||
void addSourceLine(DIE &Die, DIVariable V);
|
||||
void addSourceLine(DIE &Die, DIGlobalVariable G);
|
||||
void addSourceLine(DIE &Die, DISubprogram SP);
|
||||
void addSourceLine(DIE &Die, DIType Ty);
|
||||
void addSourceLine(DIE &Die, DINameSpace NS);
|
||||
void addSourceLine(DIE &Die, DIObjCProperty Ty);
|
||||
|
||||
/// addAddress - Add an address attribute to a die based on the location
|
||||
/// provided.
|
||||
void addAddress(DIE *Die, dwarf::Attribute Attribute,
|
||||
void addAddress(DIE &Die, dwarf::Attribute Attribute,
|
||||
const MachineLocation &Location, bool Indirect = false);
|
||||
|
||||
/// addConstantValue - Add constant value entry in variable DIE.
|
||||
void addConstantValue(DIE *Die, const MachineOperand &MO, DIType Ty);
|
||||
void addConstantValue(DIE *Die, const ConstantInt *CI, bool Unsigned);
|
||||
void addConstantValue(DIE *Die, const APInt &Val, bool Unsigned);
|
||||
void addConstantValue(DIE &Die, const MachineOperand &MO, DIType Ty);
|
||||
void addConstantValue(DIE &Die, const ConstantInt *CI, bool Unsigned);
|
||||
void addConstantValue(DIE &Die, const APInt &Val, bool Unsigned);
|
||||
|
||||
/// addConstantFPValue - Add constant value entry in variable DIE.
|
||||
void addConstantFPValue(DIE *Die, const MachineOperand &MO);
|
||||
void addConstantFPValue(DIE *Die, const ConstantFP *CFP);
|
||||
void addConstantFPValue(DIE &Die, const MachineOperand &MO);
|
||||
void addConstantFPValue(DIE &Die, const ConstantFP *CFP);
|
||||
|
||||
/// addTemplateParams - Add template parameters in buffer.
|
||||
void addTemplateParams(DIE &Buffer, DIArray TParams);
|
||||
|
||||
/// addRegisterOp - Add register operand.
|
||||
void addRegisterOp(DIELoc *TheDie, unsigned Reg);
|
||||
void addRegisterOp(DIELoc &TheDie, unsigned Reg);
|
||||
|
||||
/// addRegisterOffset - Add register offset.
|
||||
void addRegisterOffset(DIELoc *TheDie, unsigned Reg, int64_t Offset);
|
||||
void addRegisterOffset(DIELoc &TheDie, unsigned Reg, int64_t Offset);
|
||||
|
||||
/// addComplexAddress - 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. Add the DWARF information to the die.
|
||||
void addComplexAddress(const DbgVariable &DV, DIE *Die,
|
||||
void addComplexAddress(const DbgVariable &DV, DIE &Die,
|
||||
dwarf::Attribute Attribute,
|
||||
const MachineLocation &Location);
|
||||
|
||||
@ -389,19 +389,19 @@ public:
|
||||
/// actual Block variable (navigating the Block struct) based on the
|
||||
/// starting location. Add the DWARF information to the die. Obsolete,
|
||||
/// please use addComplexAddress instead.
|
||||
void addBlockByrefAddress(const DbgVariable &DV, DIE *Die,
|
||||
void addBlockByrefAddress(const DbgVariable &DV, DIE &Die,
|
||||
dwarf::Attribute Attribute,
|
||||
const MachineLocation &Location);
|
||||
|
||||
/// addVariableAddress - Add DW_AT_location attribute for a
|
||||
/// DbgVariable based on provided MachineLocation.
|
||||
void addVariableAddress(const DbgVariable &DV, DIE *Die,
|
||||
void addVariableAddress(const DbgVariable &DV, DIE &Die,
|
||||
MachineLocation Location);
|
||||
|
||||
/// addType - Add a new type attribute to the specified entity. This takes
|
||||
/// and attribute parameter because DW_AT_friend attributes are also
|
||||
/// type references.
|
||||
void addType(DIE *Entity, DIType Ty,
|
||||
void addType(DIE &Entity, DIType Ty,
|
||||
dwarf::Attribute Attribute = dwarf::DW_AT_type);
|
||||
|
||||
/// getOrCreateNameSpace - Create a DIE for DINameSpace.
|
||||
@ -548,12 +548,12 @@ public:
|
||||
|
||||
/// addLabelAddress - Add a dwarf label attribute data and value using
|
||||
/// either DW_FORM_addr or DW_FORM_GNU_addr_index.
|
||||
void addLabelAddress(DIE *Die, dwarf::Attribute Attribute,
|
||||
void addLabelAddress(DIE &Die, dwarf::Attribute Attribute,
|
||||
const MCSymbol *Label);
|
||||
|
||||
/// addLocalLabelAddress - Add a dwarf label attribute data and value using
|
||||
/// DW_FORM_addr only.
|
||||
void addLocalLabelAddress(DIE *Die, dwarf::Attribute Attribute,
|
||||
void addLocalLabelAddress(DIE &Die, dwarf::Attribute Attribute,
|
||||
const MCSymbol *Label);
|
||||
|
||||
DwarfCompileUnit &getCU() override { return *this; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user