[dwarfdump] Handle relocations in Dwarf accelerator tables
[oota-llvm.git] / lib / DebugInfo / DWARFUnit.cpp
index 46a765c70468df165207a2baf1f681dcfe9005db..82c45297662b66f27b3b45e451377ca884e24080 100644 (file)
 using namespace llvm;
 using namespace dwarf;
 
-
-void DWARFUnitSectionBase::parse(DWARFContext &C, StringRef SectionData,
-                                 const RelocAddrMap &Map) {
-  parseImpl(C, C.getDebugAbbrev(), SectionData, C.getRangeSection(),
-            C.getStringSection(), StringRef(), C.getAddrSection(), Map,
+void DWARFUnitSectionBase::parse(DWARFContext &C, const DWARFSection &Section) {
+  parseImpl(C, Section, C.getDebugAbbrev(), C.getRangeSection(),
+            C.getStringSection(), StringRef(), C.getAddrSection(),
             C.isLittleEndian());
 }
 
-void DWARFUnitSectionBase::parseDWO(DWARFContext &C, StringRef SectionData,
-                                    const RelocAddrMap &Map) {
-  parseImpl(C, C.getDebugAbbrevDWO(), SectionData, C.getRangeDWOSection(),
+void DWARFUnitSectionBase::parseDWO(DWARFContext &C,
+                                    const DWARFSection &DWOSection) {
+  parseImpl(C, DWOSection, C.getDebugAbbrevDWO(), C.getRangeDWOSection(),
             C.getStringDWOSection(), C.getStringOffsetDWOSection(),
-            C.getAddrSection(), Map, C.isLittleEndian());
+            C.getAddrSection(), C.isLittleEndian());
 }
 
-DWARFUnit::DWARFUnit(DWARFContext &DC, const DWARFDebugAbbrev *DA,
-                     StringRef IS, StringRef RS, StringRef SS, StringRef SOS,
-                     StringRef AOS, const RelocAddrMap *M, bool LE,
-                     const DWARFUnitSectionBaseUnitSection)
-  : Context(DC), Abbrev(DA), InfoSection(IS), RangeSection(RS),
-    StringSection(SS), StringOffsetSection(SOS), AddrOffsetSection(AOS),
-    RelocMap(M), isLittleEndian(LE), UnitSection(UnitSection)  {
+DWARFUnit::DWARFUnit(DWARFContext &DC, const DWARFSection &Section,
+                     const DWARFDebugAbbrev *DA, StringRef RS, StringRef SS,
+                     StringRef SOS, StringRef AOS, bool LE,
+                     const DWARFUnitSectionBase &UnitSection)
+    : Context(DC), InfoSection(Section), Abbrev(DA), RangeSection(RS),
+      StringSection(SS), StringOffsetSection(SOS), AddrOffsetSection(AOS),
+      isLittleEndian(LE), UnitSection(UnitSection) {
   clear();
 }