diff options
Diffstat (limited to 'llvm/examples')
-rw-r--r-- | llvm/examples/BrainF/BrainFDriver.cpp | 3 | ||||
-rw-r--r-- | llvm/examples/Fibonacci/fibonacci.cpp | 3 | ||||
-rw-r--r-- | llvm/examples/HowToUseJIT/HowToUseJIT.cpp | 3 | ||||
-rw-r--r-- | llvm/examples/Kaleidoscope/toy.cpp | 3 | ||||
-rw-r--r-- | llvm/examples/ParallelJIT/ParallelJIT.cpp | 3 |
5 files changed, 5 insertions, 10 deletions
diff --git a/llvm/examples/BrainF/BrainFDriver.cpp b/llvm/examples/BrainF/BrainFDriver.cpp index 021b9510ce4..fba79cfbd55 100644 --- a/llvm/examples/BrainF/BrainFDriver.cpp +++ b/llvm/examples/BrainF/BrainFDriver.cpp @@ -141,8 +141,7 @@ int main(int argc, char **argv) { InitializeNativeTarget(); std::cout << "------- Running JIT -------\n"; - ExistingModuleProvider *mp = new ExistingModuleProvider(mod); - ExecutionEngine *ee = ExecutionEngine::create(mp, false); + ExecutionEngine *ee = EngineBuilder(mod).create(); std::vector<GenericValue> args; Function *brainf_func = mod->getFunction("brainf"); GenericValue gv = ee->runFunction(brainf_func, args); diff --git a/llvm/examples/Fibonacci/fibonacci.cpp b/llvm/examples/Fibonacci/fibonacci.cpp index d637d4dea17..c5c8f0de89e 100644 --- a/llvm/examples/Fibonacci/fibonacci.cpp +++ b/llvm/examples/Fibonacci/fibonacci.cpp @@ -100,8 +100,7 @@ int main(int argc, char **argv) { Function *FibF = CreateFibFunction(M, Context); // Now we going to create JIT - ExistingModuleProvider *MP = new ExistingModuleProvider(M); - ExecutionEngine *EE = ExecutionEngine::create(MP, false); + ExecutionEngine *EE = EngineBuilder(M).create(); errs() << "verifying... "; if (verifyModule(*M)) { diff --git a/llvm/examples/HowToUseJIT/HowToUseJIT.cpp b/llvm/examples/HowToUseJIT/HowToUseJIT.cpp index 6d43cb47ced..8a788491fd1 100644 --- a/llvm/examples/HowToUseJIT/HowToUseJIT.cpp +++ b/llvm/examples/HowToUseJIT/HowToUseJIT.cpp @@ -104,8 +104,7 @@ int main() { ReturnInst::Create(Add1CallRes, BB); // Now we create the JIT. - ExistingModuleProvider* MP = new ExistingModuleProvider(M); - ExecutionEngine* EE = ExecutionEngine::create(MP, false); + ExecutionEngine* EE = EngineBuilder(M).create(); outs() << "We just constructed this LLVM module:\n\n" << *M; outs() << "\n\nRunning foo: "; diff --git a/llvm/examples/Kaleidoscope/toy.cpp b/llvm/examples/Kaleidoscope/toy.cpp index 4fd80a93634..abcd412f077 100644 --- a/llvm/examples/Kaleidoscope/toy.cpp +++ b/llvm/examples/Kaleidoscope/toy.cpp @@ -1103,7 +1103,7 @@ int main() { TheModule = new Module("my cool jit", Context); // Create the JIT. - TheExecutionEngine = ExecutionEngine::create(TheModule); + TheExecutionEngine = EngineBuilder(TheModule).create(); { ExistingModuleProvider OurModuleProvider(TheModule); @@ -1138,4 +1138,3 @@ int main() { return 0; } - diff --git a/llvm/examples/ParallelJIT/ParallelJIT.cpp b/llvm/examples/ParallelJIT/ParallelJIT.cpp index d82a6be81db..464bd22e8ff 100644 --- a/llvm/examples/ParallelJIT/ParallelJIT.cpp +++ b/llvm/examples/ParallelJIT/ParallelJIT.cpp @@ -242,8 +242,7 @@ int main() { Function* fibF = CreateFibFunction( M ); // Now we create the JIT. - ExistingModuleProvider* MP = new ExistingModuleProvider(M); - ExecutionEngine* EE = ExecutionEngine::create(MP, false); + ExecutionEngine* EE = EngineBuilder(M).create(); //~ std::cout << "We just constructed this LLVM module:\n\n" << *M; //~ std::cout << "\n\nRunning foo: " << std::flush; |