Remove some leftover DWARFContextInMemory.
Not sure how I missed these on the previous commit.
llvm-svn: 308550
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index c91bd27..a117a99 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -783,20 +783,6 @@
return InliningInfo;
}
-/// DWARFContextInMemory is the simplest possible implementation of a
-/// DWARFContext. It assumes all content is available in memory and stores
-/// pointers to it.
-class DWARFContextInMemory : public DWARFContext {
-public:
- DWARFContextInMemory(
- const object::ObjectFile &Obj, const LoadedObjectInfo *L = nullptr,
- function_ref<ErrorPolicy(Error)> HandleError = defaultErrorHandler);
-
- DWARFContextInMemory(const StringMap<std::unique_ptr<MemoryBuffer>> &Sections,
- uint8_t AddrSize,
- bool isLittleEndian = sys::IsLittleEndianHost);
-};
-
std::shared_ptr<DWARFContext>
DWARFContext::getDWOContext(StringRef AbsolutePath) {
if (auto S = DWP.lock()) {
diff --git a/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp b/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
index a7b1fe2..cb6dd5e 100644
--- a/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
+++ b/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
@@ -104,7 +104,7 @@
// Get the address of the object image for use as a unique identifier
const void* ObjData = DebugObj.getData().data();
- DIContext* Context = new DWARFContextInMemory(DebugObj);
+ std::unique_ptr<DIContext> Context = DWARFContext::create(DebugObj);
MethodAddressVector Functions;
// Use symbol info to iterate functions in the object.
diff --git a/llvm/tools/llvm-dwarfdump/fuzzer/llvm-dwarfdump-fuzzer.cpp b/llvm/tools/llvm-dwarfdump/fuzzer/llvm-dwarfdump-fuzzer.cpp
index 32e173f..12ed77f 100644
--- a/llvm/tools/llvm-dwarfdump/fuzzer/llvm-dwarfdump-fuzzer.cpp
+++ b/llvm/tools/llvm-dwarfdump/fuzzer/llvm-dwarfdump-fuzzer.cpp
@@ -31,6 +31,6 @@
return;
}
ObjectFile &Obj = *ObjOrErr.get();
- std::unique_ptr<DIContext> DICtx(new DWARFContextInMemory(Obj));
+ std::unique_ptr<DIContext> DICtx = DWARFContext::create(Obj);
DICtx->dump(nulls(), DIDT_All);
}
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
index 0bb5ceb..1a81d55 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
@@ -2169,8 +2169,7 @@
EXPECT_TRUE((bool)Obj);
// Case 1: error handler handles all errors. That allows
- // DWARFContextInMemory
- // to parse whole file and find both two errors we know about.
+ // DWARFContext to parse whole file and find both two errors we know about.
int Errors = 0;
std::unique_ptr<DWARFContext> Ctx1 =
DWARFContext::create(**Obj, nullptr, [&](Error E) {