Sink DwarfUnit::addLocationList down into DwarfCompileUnit
authorDavid Blaikie <dblaikie@gmail.com>
Sun, 2 Nov 2014 07:03:19 +0000 (07:03 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sun, 2 Nov 2014 07:03:19 +0000 (07:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221087 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 0b7f0f339f7b11f9a403a90414d06aaddfed995d..b9efb250a64b8ab92369c9d6b1253b18920b920c 100644 (file)
@@ -800,4 +800,13 @@ void DwarfCompileUnit::addComplexAddress(const DbgVariable &DV, DIE &Die,
   // Now attach the location information to the DIE.
   addBlock(Die, Attribute, Loc);
 }
+
+/// Add a Dwarf loclistptr attribute data and value.
+void DwarfCompileUnit::addLocationList(DIE &Die, dwarf::Attribute Attribute,
+                                       unsigned Index) {
+  DIEValue *Value = new (DIEValueAllocator) DIELocList(Index);
+  dwarf::Form Form = DD->getDwarfVersion() >= 4 ? dwarf::DW_FORM_sec_offset
+                                                : dwarf::DW_FORM_data4;
+  Die.addValue(Attribute, Form, Value);
+}
 } // end llvm namespace
index 8bd35fad4b1c13413283518269259955c18c0892..d03793aa4b94d080467a740556ae7b1082a1ead8 100644 (file)
@@ -207,6 +207,9 @@ public:
   void addComplexAddress(const DbgVariable &DV, DIE &Die,
                          dwarf::Attribute Attribute,
                          const MachineLocation &Location);
+
+  /// Add a Dwarf loclistptr attribute data and value.
+  void addLocationList(DIE &Die, dwarf::Attribute Attribute, unsigned Index);
 };
 
 } // end llvm namespace
index 162671f457bee324d5121866a5d19a5a7ea2206f..25ff7e2e6e93290dd5e0329abe50b4cda0166110 100644 (file)
@@ -232,16 +232,6 @@ void DwarfUnit::addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr) {
   Die.addValue((dwarf::Attribute)0, Form, Value);
 }
 
-/// addLocationList - Add a Dwarf loclistptr attribute data and value.
-///
-void DwarfUnit::addLocationList(DIE &Die, dwarf::Attribute Attribute,
-                                unsigned Index) {
-  DIEValue *Value = new (DIEValueAllocator) DIELocList(Index);
-  dwarf::Form Form = DD->getDwarfVersion() >= 4 ? dwarf::DW_FORM_sec_offset
-                                                : dwarf::DW_FORM_data4;
-  Die.addValue(Attribute, Form, Value);
-}
-
 /// addLabel - Add a Dwarf label attribute data and value.
 ///
 void DwarfUnit::addLabel(DIE &Die, dwarf::Attribute Attribute, dwarf::Form Form,
index 8b6a92229e61618e4cedf17ae7bbbcc94be1a321..a37f0324f2b2d92fcb166b1fa660f615d8a5b34d 100644 (file)
@@ -222,9 +222,6 @@ public:
 
   void addLabel(DIELoc &Die, dwarf::Form Form, const MCSymbol *Label);
 
-  /// addLocationList - Add a Dwarf loclistptr attribute data and value.
-  void addLocationList(DIE &Die, dwarf::Attribute Attribute, unsigned Index);
-
   /// addSectionOffset - Add an offset into a section attribute data and value.
   ///
   void addSectionOffset(DIE &Die, dwarf::Attribute Attribute, uint64_t Integer);