summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElena Demikhovsky <elena.demikhovsky@intel.com>2014-08-21 07:01:55 +0000
committerElena Demikhovsky <elena.demikhovsky@intel.com>2014-08-21 07:01:55 +0000
commit08f8596cc0b2d14603975b6dda3332db53134f50 (patch)
treef4545a6146c167286e3a997504dc2c01bfa185c2
parent71b7b68b741a29c473479c64dbaca00b94e316ab (diff)
downloadbcm5719-llvm-08f8596cc0b2d14603975b6dda3332db53134f50.tar.gz
bcm5719-llvm-08f8596cc0b2d14603975b6dda3332db53134f50.zip
IntelJITEventListener updates to fix breaks by recent changes to EngineBuilder and DIContext.
By Arch Robison. llvm-svn: 216159
-rw-r--r--llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp2
-rw-r--r--llvm/tools/llvm-jitlistener/llvm-jitlistener.cpp5
-rw-r--r--llvm/unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h2
3 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp b/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
index 4e22a8b3ea0..29be7c74902 100644
--- a/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
+++ b/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
@@ -190,7 +190,7 @@ void IntelJITEventListener::NotifyFreeingMachineCode(void *FnStart) {
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.
diff --git a/llvm/tools/llvm-jitlistener/llvm-jitlistener.cpp b/llvm/tools/llvm-jitlistener/llvm-jitlistener.cpp
index c159aa506d6..a6554698c17 100644
--- a/llvm/tools/llvm-jitlistener/llvm-jitlistener.cpp
+++ b/llvm/tools/llvm-jitlistener/llvm-jitlistener.cpp
@@ -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;
diff --git a/llvm/unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h b/llvm/unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h
index 61220f545f9..2af688c777e 100644
--- a/llvm/unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h
+++ b/llvm/unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h
@@ -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())
OpenPOWER on IntegriCloud