[llvm] r216159 - IntelJITEventListener updates to fix breaks by recent changes to EngineBuilder and DIContext.
Elena Demikhovsky
elena.demikhovsky at intel.com
Thu Aug 21 00:01:55 PDT 2014
Author: delena
Date: Thu Aug 21 02:01:55 2014
New Revision: 216159
URL: http://llvm.org/viewvc/llvm-project?rev=216159&view=rev
Log:
IntelJITEventListener updates to fix breaks by recent changes to EngineBuilder and DIContext.
By Arch Robison.
Modified:
llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
llvm/trunk/tools/llvm-jitlistener/llvm-jitlistener.cpp
llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h
Modified: llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp?rev=216159&r1=216158&r2=216159&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp Thu Aug 21 02:01:55 2014
@@ -190,7 +190,7 @@ void IntelJITEventListener::NotifyFreein
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.
Modified: llvm/trunk/tools/llvm-jitlistener/llvm-jitlistener.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-jitlistener/llvm-jitlistener.cpp?rev=216159&r1=216158&r2=216159&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-jitlistener/llvm-jitlistener.cpp (original)
+++ llvm/trunk/tools/llvm-jitlistener/llvm-jitlistener.cpp Thu Aug 21 02:01:55 2014
@@ -113,7 +113,7 @@ protected:
// Parse the bitcode...
SMDiagnostic Err;
- TheModule = ParseIRFile(IRFile, Err, Context);
+ std::unique_ptr<Module> TheModule(ParseIRFile(IRFile, Err, Context));
if (!TheModule) {
errs() << Err.getMessage();
return;
@@ -145,7 +145,7 @@ protected:
// Compile the IR
std::string Error;
- TheJIT.reset(EngineBuilder(TheModule)
+ TheJIT.reset(EngineBuilder(std::move(TheModule))
.setEngineKind(EngineKind::JIT)
.setErrorStr(&Error)
.setJITMemoryManager(MemMgr)
@@ -160,7 +160,6 @@ protected:
}
LLVMContext Context; // Global ownership
- Module *TheModule; // Owned by ExecutionEngine.
JITMemoryManager *JMM; // Owned by ExecutionEngine.
std::unique_ptr<ExecutionEngine> TheJIT;
Modified: llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h?rev=216159&r1=216158&r2=216159&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h (original)
+++ llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h Thu Aug 21 02:01:55 2014
@@ -66,7 +66,7 @@ public:
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())
More information about the llvm-commits
mailing list