[DebugInfo] Pass DWARFSection down to DWARFUnit constructor (NFC).
[oota-llvm.git] / lib / DebugInfo / DWARFContext.cpp
index 39799f0b235ae7d0bdbb0c2573614911e10f13fa..2cacfd9b949a0cdaae48d964e1c8345fa10b254e 100644 (file)
@@ -314,7 +314,7 @@ DWARFContext::getLineTableForUnit(DWARFUnit *cu) {
 }
 
 void DWARFContext::parseCompileUnits() {
-  CUs.parse(*this, getInfoSection().Data, getInfoSection().Relocs);
+  CUs.parse(*this, getInfoSection());
 }
 
 void DWARFContext::parseTypeUnits() {
@@ -322,12 +322,12 @@ void DWARFContext::parseTypeUnits() {
     return;
   for (const auto &I : getTypesSections()) {
     TUs.push_back(DWARFUnitSection<DWARFTypeUnit>());
-    TUs.back().parse(*this, I.second.Data, I.second.Relocs);
+    TUs.back().parse(*this, I.second);
   }
 }
 
 void DWARFContext::parseDWOCompileUnits() {
-  DWOCUs.parseDWO(*this, getInfoDWOSection().Data, getInfoDWOSection().Relocs);
+  DWOCUs.parseDWO(*this, getInfoDWOSection());
 }
 
 void DWARFContext::parseDWOTypeUnits() {
@@ -335,7 +335,7 @@ void DWARFContext::parseDWOTypeUnits() {
     return;
   for (const auto &I : getTypesDWOSections()) {
     DWOTUs.push_back(DWARFUnitSection<DWARFTypeUnit>());
-    DWOTUs.back().parseDWO(*this, I.second.Data, I.second.Relocs);
+    DWOTUs.back().parseDWO(*this, I.second);
   }
 }
 
@@ -626,7 +626,7 @@ DWARFContextInMemory::DWARFContextInMemory(object::ObjectFile &Obj)
           Sym->getAddress(SymAddr);
         }
 
-        object::RelocVisitor V(Obj.getFileFormatName());
+        object::RelocVisitor V(Obj);
         // The section address is always 0 for debug sections.
         object::RelocToApply R(V.visit(Type, Reloc, 0, SymAddr));
         if (V.error()) {