summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-08-19 04:04:25 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-08-19 04:04:25 +0000
commit2a8a2795ee8edb8120d10c3c2af397f429b13c57 (patch)
treef77e8ceaf358640f215dc0207854cb9d00975e08 /llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
parent687744d0114c46529def899ee6c67428cbdf3d92 (diff)
downloadbcm5719-llvm-2a8a2795ee8edb8120d10c3c2af397f429b13c57.tar.gz
bcm5719-llvm-2a8a2795ee8edb8120d10c3c2af397f429b13c57.zip
Make it explicit that ExecutionEngine takes ownership of the modules.
llvm-svn: 215967
Diffstat (limited to 'llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h')
-rw-r--r--llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
index 82d7f3550d2..1a365793a5c 100644
--- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
+++ b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
@@ -307,13 +307,13 @@ protected:
UnsupportedEnvironments.push_back(Triple::Cygnus);
}
- void createJIT(Module *M) {
+ void createJIT(std::unique_ptr<Module> M) {
// Due to the EngineBuilder constructor, it is required to have a Module
// in order to construct an ExecutionEngine (i.e. MCJIT)
assert(M != 0 && "a non-null Module must be provided to create MCJIT");
- EngineBuilder EB(M);
+ EngineBuilder EB(std::move(M));
std::string Error;
TheJIT.reset(EB.setEngineKind(EngineKind::JIT)
.setUseMCJIT(true) /* can this be folded into the EngineKind enum? */
OpenPOWER on IntegriCloud