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/lib/ExecutionEngine/Interpreter/Interpreter.h | |
parent | 687744d0114c46529def899ee6c67428cbdf3d92 (diff) | |
download | llvm-2a8a2795ee8edb8120d10c3c2af397f429b13c57.zip llvm-2a8a2795ee8edb8120d10c3c2af397f429b13c57.tar.gz llvm-2a8a2795ee8edb8120d10c3c2af397f429b13c57.tar.bz2 |
Make it explicit that ExecutionEngine takes ownership of the modules.
llvm-svn: 215967
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/Interpreter.h')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/Interpreter.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h index 84a1c6b..4a5fbb9 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h +++ b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h @@ -94,7 +94,7 @@ class Interpreter : public ExecutionEngine, public InstVisitor<Interpreter> { std::vector<Function*> AtExitHandlers; public: - explicit Interpreter(Module *M); + explicit Interpreter(std::unique_ptr<Module> M); ~Interpreter(); /// runAtExitHandlers - Run any functions registered by the program's calls to @@ -105,10 +105,11 @@ public: static void Register() { InterpCtor = create; } - - /// create - Create an interpreter ExecutionEngine. This can never fail. + + /// Create an interpreter ExecutionEngine. /// - static ExecutionEngine *create(Module *M, std::string *ErrorStr = nullptr); + static ExecutionEngine *create(std::unique_ptr<Module> M, + std::string *ErrorStr = nullptr); /// run - Start execution with the specified function and arguments. /// |