summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2018-12-14 22:34:03 +0000
committerDavid Blaikie <dblaikie@gmail.com>2018-12-14 22:34:03 +0000
commit61c127c1ad9f7e415e00e449d8f52af54896c007 (patch)
treef4b59c96fffdc82ca45b0040e9e066ea97ab4eab /llvm/lib
parent26d994f56ed4a5b8ba4b8851334090242b06edd7 (diff)
downloadbcm5719-llvm-61c127c1ad9f7e415e00e449d8f52af54896c007.tar.gz
bcm5719-llvm-61c127c1ad9f7e415e00e449d8f52af54896c007.zip
DebugInfo: Move addAddrBase from DwarfUnit to DwarfCompileUnit
Only CUs need an address table reference. llvm-svn: 349203
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp9
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h3
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp9
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h3
4 files changed, 12 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index d93c7f6c845..1dca3f0fce5 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -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());
+}
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index 13679c37fe5..6e9490702c8 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -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;
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 2053395808f..062eb3a8892 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -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());
-}
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
index 860d1653184..c5cb7e1bc33 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
@@ -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);
OpenPOWER on IntegriCloud