diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-19 04:04:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-19 04:04:25 +0000 |
commit | 2a8a2795ee8edb8120d10c3c2af397f429b13c57 (patch) | |
tree | f77e8ceaf358640f215dc0207854cb9d00975e08 /llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h | |
parent | 687744d0114c46529def899ee6c67428cbdf3d92 (diff) | |
download | bcm5719-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.h | 4 |
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? */ |