mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Remove DwarfDebug::FirstCU as it has no use
It was only being used as a flag to identify the lack of debug info from within endModule - use the section labels for that instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220575 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -169,8 +169,7 @@ static LLVM_CONSTEXPR DwarfAccelTable::Atom TypeAtoms[] = {
|
|||||||
DwarfAccelTable::Atom(dwarf::DW_ATOM_type_flags, dwarf::DW_FORM_data1)};
|
DwarfAccelTable::Atom(dwarf::DW_ATOM_type_flags, dwarf::DW_FORM_data1)};
|
||||||
|
|
||||||
DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
|
DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
|
||||||
: Asm(A), MMI(Asm->MMI), FirstCU(nullptr), PrevLabel(nullptr),
|
: Asm(A), MMI(Asm->MMI), PrevLabel(nullptr), GlobalRangeCount(0),
|
||||||
GlobalRangeCount(0),
|
|
||||||
InfoHolder(A, *this, "info_string", DIEValueAllocator),
|
InfoHolder(A, *this, "info_string", DIEValueAllocator),
|
||||||
UsedNonDefaultText(false),
|
UsedNonDefaultText(false),
|
||||||
SkeletonHolder(A, *this, "skel_string", DIEValueAllocator),
|
SkeletonHolder(A, *this, "skel_string", DIEValueAllocator),
|
||||||
@ -403,9 +402,6 @@ DwarfCompileUnit &DwarfDebug::constructDwarfCompileUnit(DICompileUnit DIUnit) {
|
|||||||
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);
|
dwarf::DW_FORM_data1, RVer);
|
||||||
|
|
||||||
if (!FirstCU)
|
|
||||||
FirstCU = &NewCU;
|
|
||||||
|
|
||||||
if (useSplitDwarf()) {
|
if (useSplitDwarf()) {
|
||||||
NewCU.initSection(Asm->getObjFileLowering().getDwarfInfoDWOSection(),
|
NewCU.initSection(Asm->getObjFileLowering().getDwarfInfoDWOSection(),
|
||||||
DwarfInfoDWOSectionSym);
|
DwarfInfoDWOSectionSym);
|
||||||
@ -438,8 +434,6 @@ void DwarfDebug::beginModule() {
|
|||||||
|
|
||||||
FunctionDIs = makeSubprogramMap(*M);
|
FunctionDIs = makeSubprogramMap(*M);
|
||||||
|
|
||||||
// If module has named metadata anchors then use them, otherwise scan the
|
|
||||||
// module using debug info finder to collect debug info.
|
|
||||||
NamedMDNode *CU_Nodes = M->getNamedMetadata("llvm.dbg.cu");
|
NamedMDNode *CU_Nodes = M->getNamedMetadata("llvm.dbg.cu");
|
||||||
if (!CU_Nodes)
|
if (!CU_Nodes)
|
||||||
return;
|
return;
|
||||||
@ -687,7 +681,10 @@ void DwarfDebug::endModule() {
|
|||||||
assert(CurFn == nullptr);
|
assert(CurFn == nullptr);
|
||||||
assert(CurMI == nullptr);
|
assert(CurMI == nullptr);
|
||||||
|
|
||||||
if (!FirstCU)
|
// If we aren't actually generating debug info (check beginModule -
|
||||||
|
// conditionalized on !DisableDebugInfoPrinting and the presence of the
|
||||||
|
// llvm.dbg.cu metadata node)
|
||||||
|
if (!DwarfInfoSectionSym)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// End any existing sections.
|
// End any existing sections.
|
||||||
@ -741,9 +738,6 @@ void DwarfDebug::endModule() {
|
|||||||
// clean up.
|
// clean up.
|
||||||
SPMap.clear();
|
SPMap.clear();
|
||||||
AbstractVariables.clear();
|
AbstractVariables.clear();
|
||||||
|
|
||||||
// Reset these for the next Module if we have one.
|
|
||||||
FirstCU = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find abstract variable, if any, associated with Var.
|
// Find abstract variable, if any, associated with Var.
|
||||||
|
@ -164,12 +164,6 @@ class DwarfDebug : public AsmPrinterHandler {
|
|||||||
// All DIEValues are allocated through this allocator.
|
// All DIEValues are allocated through this allocator.
|
||||||
BumpPtrAllocator DIEValueAllocator;
|
BumpPtrAllocator DIEValueAllocator;
|
||||||
|
|
||||||
// Handle to the compile unit used for the inline extension handling,
|
|
||||||
// this is just so that the DIEValue allocator has a place to store
|
|
||||||
// the particular elements.
|
|
||||||
// FIXME: Store these off of DwarfDebug instead?
|
|
||||||
DwarfCompileUnit *FirstCU;
|
|
||||||
|
|
||||||
// Maps MDNode with its corresponding DwarfCompileUnit.
|
// Maps MDNode with its corresponding DwarfCompileUnit.
|
||||||
MapVector<const MDNode *, DwarfCompileUnit *> CUMap;
|
MapVector<const MDNode *, DwarfCompileUnit *> CUMap;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user