diff options
Diffstat (limited to 'examples/Fibonacci')
-rw-r--r-- | examples/Fibonacci/CMakeLists.txt | 1 | ||||
-rw-r--r-- | examples/Fibonacci/Makefile | 2 | ||||
-rw-r--r-- | examples/Fibonacci/fibonacci.cpp | 8 |
3 files changed, 5 insertions, 6 deletions
diff --git a/examples/Fibonacci/CMakeLists.txt b/examples/Fibonacci/CMakeLists.txt index c015e50ac350..087ccdd7d841 100644 --- a/examples/Fibonacci/CMakeLists.txt +++ b/examples/Fibonacci/CMakeLists.txt @@ -2,7 +2,6 @@ set(LLVM_LINK_COMPONENTS Core ExecutionEngine Interpreter - JIT MC Support nativecodegen diff --git a/examples/Fibonacci/Makefile b/examples/Fibonacci/Makefile index 71f6ba0ef52e..c99110a22119 100644 --- a/examples/Fibonacci/Makefile +++ b/examples/Fibonacci/Makefile @@ -12,6 +12,6 @@ TOOLNAME = Fibonacci EXAMPLE_TOOL = 1 # Link in JIT support -LINK_COMPONENTS := jit interpreter nativecodegen +LINK_COMPONENTS := interpreter mcjit nativecodegen include $(LEVEL)/Makefile.common diff --git a/examples/Fibonacci/fibonacci.cpp b/examples/Fibonacci/fibonacci.cpp index ba8e95342fa5..8092e19380dd 100644 --- a/examples/Fibonacci/fibonacci.cpp +++ b/examples/Fibonacci/fibonacci.cpp @@ -26,7 +26,6 @@ #include "llvm/IR/Verifier.h" #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" @@ -96,15 +95,16 @@ int main(int argc, char **argv) { LLVMContext Context; // Create some module to put our function into it. - std::unique_ptr<Module> M(new Module("test", Context)); + std::unique_ptr<Module> Owner(new Module("test", Context)); + Module *M = Owner.get(); // We are about to create the "fib" function: - Function *FibF = CreateFibFunction(M.get(), Context); + Function *FibF = CreateFibFunction(M, Context); // Now we going to create JIT std::string errStr; ExecutionEngine *EE = - EngineBuilder(M.get()) + EngineBuilder(std::move(Owner)) .setErrorStr(&errStr) .setEngineKind(EngineKind::JIT) .create(); |