]> granicus.if.org Git - llvm/commitdiff
DebugInfo: Move addAddrBase from DwarfUnit to DwarfCompileUnit
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 14 Dec 2018 22:34:03 +0000 (22:34 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 14 Dec 2018 22:34:03 +0000 (22:34 +0000)
Only CUs need an address table reference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349203 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.h

index d93c7f6c8459ea038b083b5109c986b770b4989d..1dca3f0fce5baf647f26da923f5d14e9746812a0 100644 (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());
+}
index 13679c37fe547c45ac7dd833a91e09160305bae4..6e9490702c8a011aa275212dea1561342e7cfd8b 100644 (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;
index 2053395808f1bcf1f16e5fb2d349a8eeb4d165ee..062eb3a8892b828cb52ba7ed118e7328b7a507f9 100644 (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());
-}
index 860d165318430a9611bd09a569b41fbc2c1a9498..c5cb7e1bc33927131f6ddf81042f4627ae76af88 100644 (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);