[DebugInfo] Add DwarfDebug& to DwarfFile.

Use the DwarfDebug in one function that previously took it as a
parameter, and lay the foundation for use this for other operations
coming soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220452 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-10-23 00:16:03 +00:00
parent ee129ed18d
commit 22a01da9de
3 changed files with 17 additions and 10 deletions

View File

@@ -170,9 +170,10 @@ static LLVM_CONSTEXPR DwarfAccelTable::Atom TypeAtoms[] = {
DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
: Asm(A), MMI(Asm->MMI), FirstCU(nullptr), PrevLabel(nullptr),
GlobalRangeCount(0), InfoHolder(A, "info_string", DIEValueAllocator),
GlobalRangeCount(0),
InfoHolder(A, *this, "info_string", DIEValueAllocator),
UsedNonDefaultText(false),
SkeletonHolder(A, "skel_string", DIEValueAllocator),
SkeletonHolder(A, *this, "skel_string", DIEValueAllocator),
IsDarwin(Triple(A->getTargetTriple()).isOSDarwin()),
AccelNames(DwarfAccelTable::Atom(dwarf::DW_ATOM_die_offset,
dwarf::DW_FORM_data4)),
@@ -1522,7 +1523,7 @@ void DwarfDebug::emitDIE(DIE &Die) {
void DwarfDebug::emitDebugInfo() {
DwarfFile &Holder = useSplitDwarf() ? SkeletonHolder : InfoHolder;
Holder.emitUnits(this, DwarfAbbrevSectionSym);
Holder.emitUnits(DwarfAbbrevSectionSym);
}
// Emit the abbreviation section.
@@ -2165,7 +2166,7 @@ void DwarfDebug::emitDebugInfoDWO() {
assert(useSplitDwarf() && "No split dwarf debug info?");
// Don't pass an abbrev symbol, using a constant zero instead so as not to
// emit relocations into the dwo file.
InfoHolder.emitUnits(this, /* AbbrevSymbol */ nullptr);
InfoHolder.emitUnits(/* AbbrevSymbol */ nullptr);
}
// Emit the .debug_abbrev.dwo section for separated dwarf. This contains the