1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

DebugInfo: Move addAddrBase from DwarfUnit to DwarfCompileUnit

Only CUs need an address table reference.

llvm-svn: 349203
This commit is contained in:
David Blaikie 2018-12-14 22:34:03 +00:00
parent 44a95960ae
commit 6264674d1f
4 changed files with 12 additions and 12 deletions

View File

@ -1125,3 +1125,12 @@ bool DwarfCompileUnit::includeMinimalInlineScopes() const {
return getCUNode()->getEmissionKind() == DICompileUnit::LineTablesOnly ||
(DD->useSplitDwarf() && !Skeleton);
}
void DwarfCompileUnit::addAddrTableBase() {
const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
MCSymbol *Label = DD->getAddressPool().getLabel();
addSectionLabel(getUnitDie(),
getDwarfVersion() >= 5 ? dwarf::DW_AT_addr_base
: dwarf::DW_AT_GNU_addr_base,
Label, TLOF.getDwarfAddrSection()->getBeginSymbol());
}

View File

@ -243,6 +243,9 @@ public:
void emitHeader(bool UseOffsets) override;
/// Add the DW_AT_addr_base attribute to the unit DIE.
void addAddrTableBase();
MCSymbol *getLabelBegin() const {
assert(getSection());
return LabelBegin;

View File

@ -1664,12 +1664,3 @@ void DwarfUnit::addLoclistsBase() {
DU->getLoclistsTableBaseSym(),
TLOF.getDwarfLoclistsSection()->getBeginSymbol());
}
void DwarfUnit::addAddrTableBase() {
const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
MCSymbol *Label = DD->getAddressPool().getLabel();
addSectionLabel(getUnitDie(),
getDwarfVersion() >= 5 ? dwarf::DW_AT_addr_base
: dwarf::DW_AT_GNU_addr_base,
Label, TLOF.getDwarfAddrSection()->getBeginSymbol());
}

View File

@ -275,9 +275,6 @@ public:
/// Add the DW_AT_loclists_base attribute to the unit DIE.
void addLoclistsBase();
/// Add the DW_AT_addr_base attribute to the unit DIE.
void addAddrTableBase();
virtual DwarfCompileUnit &getCU() = 0;
void constructTypeDIE(DIE &Buffer, const DICompositeType *CTy);