[llvm] r308550 - Remove some leftover DWARFContextInMemory.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 16:34:59 PDT 2017


Author: rafael
Date: Wed Jul 19 16:34:59 2017
New Revision: 308550

URL: http://llvm.org/viewvc/llvm-project?rev=308550&view=rev
Log:
Remove some leftover DWARFContextInMemory.

Not sure how I missed these on the previous commit.

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

Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp?rev=308550&r1=308549&r2=308550&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp Wed Jul 19 16:34:59 2017
@@ -783,20 +783,6 @@ DWARFContext::getInliningInfoForAddress(
   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()) {

Modified: llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp?rev=308550&r1=308549&r2=308550&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp Wed Jul 19 16:34:59 2017
@@ -104,7 +104,7 @@ void IntelJITEventListener::NotifyObject
 
   // 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.

Modified: llvm/trunk/tools/llvm-dwarfdump/fuzzer/llvm-dwarfdump-fuzzer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-dwarfdump/fuzzer/llvm-dwarfdump-fuzzer.cpp?rev=308550&r1=308549&r2=308550&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-dwarfdump/fuzzer/llvm-dwarfdump-fuzzer.cpp (original)
+++ llvm/trunk/tools/llvm-dwarfdump/fuzzer/llvm-dwarfdump-fuzzer.cpp Wed Jul 19 16:34:59 2017
@@ -31,6 +31,6 @@ extern "C" void LLVMFuzzerTestOneInput(u
     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);
 }

Modified: llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp?rev=308550&r1=308549&r2=308550&view=diff
==============================================================================
--- llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp (original)
+++ llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp Wed Jul 19 16:34:59 2017
@@ -2169,8 +2169,7 @@ TEST(DWARFDebugInfo, TestErrorReportingP
   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) {




More information about the llvm-commits mailing list