[PATCH] IntelJITEventListener updates to fix breaks by recent changes to EngineBuilder and DIContext

Arch D. Robison arch.robison at intel.com
Tue Aug 19 12:35:53 PDT 2014


Revisions r214433 and r215967 changed two interfaces slightly, in a way that keeps IntelJITEventListener from compiling.  The patch fixes these problems.

http://reviews.llvm.org/D4975

Files:
  lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
  tools/llvm-jitlistener/llvm-jitlistener.cpp
  unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h

Index: tools/llvm-jitlistener/llvm-jitlistener.cpp
===================================================================
--- tools/llvm-jitlistener/llvm-jitlistener.cpp
+++ tools/llvm-jitlistener/llvm-jitlistener.cpp
@@ -145,7 +145,7 @@
 
     // Compile the IR
     std::string Error;
-    TheJIT.reset(EngineBuilder(TheModule)
+    TheJIT.reset(EngineBuilder(std::unique_ptr<Module>(TheModule))
       .setEngineKind(EngineKind::JIT)
       .setErrorStr(&Error)
       .setJITMemoryManager(MemMgr)
Index: unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h
===================================================================
--- unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h
+++ unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h
@@ -66,7 +66,7 @@
   JITEventListenerTestBase(WrapperT* w)
   : MockWrapper(w)
   , M(new llvm::Module("module", llvm::getGlobalContext()))
-  , EE(llvm::EngineBuilder(M)
+  , EE(llvm::EngineBuilder(std::unique_ptr<llvm::Module>(M))
     .setEngineKind(llvm::EngineKind::JIT)
     .setOptLevel(llvm::CodeGenOpt::None)
     .create())
Index: lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
===================================================================
--- lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
+++ lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
@@ -190,7 +190,7 @@
 void IntelJITEventListener::NotifyObjectEmitted(const ObjectImage &Obj) {
   // Get the address of the object image for use as a unique identifier
   const void* ObjData = Obj.getData().data();
-  DIContext* Context = DIContext::getDWARFContext(Obj.getObjectFile());
+  DIContext* Context = DIContext::getDWARFContext(*Obj.getObjectFile());
   MethodAddressVector Functions;
 
   // Use symbol info to iterate functions in the object.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4975.12676.patch
Type: text/x-patch
Size: 1814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140819/8485dcca/attachment.bin>


More information about the llvm-commits mailing list