diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
commit | 67c32a98315f785a9ec9d531c1f571a0196c7463 (patch) | |
tree | 4abb9cbeecc7901726dd0b4a37369596c852e9ef /examples/ParallelJIT | |
parent | 9f61947910e6ab40de38e6b4034751ef1513200f (diff) |
Diffstat (limited to 'examples/ParallelJIT')
-rw-r--r-- | examples/ParallelJIT/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/ParallelJIT/Makefile | 2 | ||||
-rw-r--r-- | examples/ParallelJIT/ParallelJIT.cpp | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/ParallelJIT/CMakeLists.txt b/examples/ParallelJIT/CMakeLists.txt index 8673917f5589d..07c0a085b91f6 100644 --- a/examples/ParallelJIT/CMakeLists.txt +++ b/examples/ParallelJIT/CMakeLists.txt @@ -2,7 +2,7 @@ set(LLVM_LINK_COMPONENTS Core ExecutionEngine Interpreter - JIT + MC Support nativecodegen ) diff --git a/examples/ParallelJIT/Makefile b/examples/ParallelJIT/Makefile index 8a49d4273132a..0f2a3575f76c7 100644 --- a/examples/ParallelJIT/Makefile +++ b/examples/ParallelJIT/Makefile @@ -10,7 +10,7 @@ LEVEL = ../.. TOOLNAME = ParallelJIT EXAMPLE_TOOL = 1 -LINK_COMPONENTS := jit interpreter nativecodegen +LINK_COMPONENTS := mcjit interpreter nativecodegen include $(LEVEL)/Makefile.common diff --git a/examples/ParallelJIT/ParallelJIT.cpp b/examples/ParallelJIT/ParallelJIT.cpp index 2aa63d91ffb36..4ebf3d071eff5 100644 --- a/examples/ParallelJIT/ParallelJIT.cpp +++ b/examples/ParallelJIT/ParallelJIT.cpp @@ -19,7 +19,6 @@ #include "llvm/ExecutionEngine/GenericValue.h" #include "llvm/ExecutionEngine/Interpreter.h" -#include "llvm/ExecutionEngine/JIT.h" #include "llvm/IR/Constants.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Instructions.h" @@ -243,13 +242,14 @@ int main() { LLVMContext Context; // Create some module to put our function into it. - Module *M = new Module("test", Context); + std::unique_ptr<Module> Owner = make_unique<Module>("test", Context); + Module *M = Owner.get(); Function* add1F = createAdd1( M ); Function* fibF = CreateFibFunction( M ); // Now we create the JIT. - ExecutionEngine* EE = EngineBuilder(M).create(); + ExecutionEngine* EE = EngineBuilder(std::move(Owner)).create(); //~ std::cout << "We just constructed this LLVM module:\n\n" << *M; //~ std::cout << "\n\nRunning foo: " << std::flush; |