diff options
author | Luke Cheeseman <luke.cheeseman@arm.com> | 2018-11-23 17:13:06 +0000 |
---|---|---|
committer | Luke Cheeseman <luke.cheeseman@arm.com> | 2018-11-23 17:13:06 +0000 |
commit | 6db3a6a4a770b1052a96bdbcb248f7d837a986f3 (patch) | |
tree | 0f5714719438617861c2296228a8b153afe89f31 /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | |
parent | 19d75608f8c646df4cb89b83ef7004c0e4a437aa (diff) | |
download | bcm5719-llvm-6db3a6a4a770b1052a96bdbcb248f7d837a986f3.tar.gz bcm5719-llvm-6db3a6a4a770b1052a96bdbcb248f7d837a986f3.zip |
Revert r347490 as it breaks address sanitizer builds
llvm-svn: 347499
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp index 35c3f59b3f4..e330ce221b2 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp @@ -767,7 +767,7 @@ const DWARFDebugFrame *DWARFContext::getDebugFrame() { // 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(); } @@ -778,7 +778,7 @@ const DWARFDebugFrame *DWARFContext::getEHFrame() { 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(); } @@ -1644,11 +1644,7 @@ DWARFContext::create(const object::ObjectFile &Obj, const LoadedObjectInfo *L, 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> @@ -1659,11 +1655,9 @@ DWARFContext::create(const StringMap<std::unique_ptr<MemoryBuffer>> &Sections, 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); |