Revert r343317
- asan buildbots are breaking and I need to investigate the issue
llvm-svn: 343341
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index 70eed19..5d9f5a3 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -725,7 +725,7 @@
// http://lists.dwarfstd.org/htdig.cgi/dwarf-discuss-dwarfstd.org/2011-December/001173.html
DWARFDataExtractor debugFrameData(DObj->getDebugFrameSection(),
isLittleEndian(), DObj->getAddressSize());
- DebugFrame.reset(new DWARFDebugFrame(Arch, false /* IsEH */));
+ DebugFrame.reset(new DWARFDebugFrame(false /* IsEH */));
DebugFrame->parse(debugFrameData);
return DebugFrame.get();
}
@@ -736,7 +736,7 @@
DWARFDataExtractor debugFrameData(DObj->getEHFrameSection(), isLittleEndian(),
DObj->getAddressSize());
- DebugFrame.reset(new DWARFDebugFrame(Arch, true /* IsEH */));
+ DebugFrame.reset(new DWARFDebugFrame(true /* IsEH */));
DebugFrame->parse(debugFrameData);
return DebugFrame.get();
}
@@ -1571,11 +1571,7 @@
function_ref<ErrorPolicy(Error)> HandleError,
std::string DWPName) {
auto DObj = llvm::make_unique<DWARFObjInMemory>(Obj, L, HandleError);
- std::unique_ptr<DWARFContext> Ctx =
- llvm::make_unique<DWARFContext>(std::move(DObj), std::move(DWPName));
- logAllUnhandledErrors(Ctx->loadArchitectureInfo(Obj), errs(),
- Obj.getFileName() + ": ");
- return Ctx;
+ return llvm::make_unique<DWARFContext>(std::move(DObj), std::move(DWPName));
}
std::unique_ptr<DWARFContext>
@@ -1586,11 +1582,9 @@
return llvm::make_unique<DWARFContext>(std::move(DObj), "");
}
-Error DWARFContext::loadArchitectureInfo(const object::ObjectFile &Obj) {
+Error DWARFContext::loadRegisterInfo(const object::ObjectFile &Obj) {
// Detect the architecture from the object file. We usually don't need OS
// info to lookup a target and create register info.
- Arch = Triple::ArchType(Obj.getArch());
-
Triple TT;
TT.setArch(Triple::ArchType(Obj.getArch()));
TT.setVendor(Triple::UnknownVendor);