]> granicus.if.org Git - llvm/commitdiff
Remove some leftover DWARFContextInMemory.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 19 Jul 2017 23:34:59 +0000 (23:34 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 19 Jul 2017 23:34:59 +0000 (23:34 +0000)
Not sure how I missed these on the previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308550 91177308-0d34-0410-b5e6-96231b3b80d8

lib/DebugInfo/DWARF/DWARFContext.cpp
lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
tools/llvm-dwarfdump/fuzzer/llvm-dwarfdump-fuzzer.cpp
unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp

index c91bd27c91a6df1d76faa4d6ae2fbbbfc824ab88..a117a99e0e4b59b5122f8ca344b7ab52061aabc7 100644 (file)
@@ -783,20 +783,6 @@ DWARFContext::getInliningInfoForAddress(uint64_t Address,
   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()) {
index a7b1fe206f1089120f333973a49741f885fa5125..cb6dd5e57283e8bc2a94f4c402f55085056ebaf4 100644 (file)
@@ -104,7 +104,7 @@ void IntelJITEventListener::NotifyObjectEmitted(
 
   // 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.
index 32e173f9d1fce57c974126e0d3b5d90ccd430f50..12ed77f6da694d9234b66806791e042fc19bc153 100644 (file)
@@ -31,6 +31,6 @@ extern "C" void LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
     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);
 }
index 0bb5cebe9c81d27b6a67b6c62cebd984479b3dcf..1a81d5543b895c247c64e31b469753200ade8c96 100644 (file)
@@ -2169,8 +2169,7 @@ TEST(DWARFDebugInfo, TestErrorReportingPolicy) {
   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) {