Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create().
Also a test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76276 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/examples/BrainF/BrainFDriver.cpp b/examples/BrainF/BrainFDriver.cpp
index 021b951..fba79cf 100644
--- a/examples/BrainF/BrainFDriver.cpp
+++ b/examples/BrainF/BrainFDriver.cpp
@@ -141,8 +141,7 @@
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/examples/Fibonacci/fibonacci.cpp b/examples/Fibonacci/fibonacci.cpp
index d637d4d..c5c8f0d 100644
--- a/examples/Fibonacci/fibonacci.cpp
+++ b/examples/Fibonacci/fibonacci.cpp
@@ -100,8 +100,7 @@
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/examples/HowToUseJIT/HowToUseJIT.cpp b/examples/HowToUseJIT/HowToUseJIT.cpp
index 6d43cb4..8a78849 100644
--- a/examples/HowToUseJIT/HowToUseJIT.cpp
+++ b/examples/HowToUseJIT/HowToUseJIT.cpp
@@ -104,8 +104,7 @@
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/examples/Kaleidoscope/toy.cpp b/examples/Kaleidoscope/toy.cpp
index 4fd80a9..abcd412 100644
--- a/examples/Kaleidoscope/toy.cpp
+++ b/examples/Kaleidoscope/toy.cpp
@@ -1103,7 +1103,7 @@
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 @@
return 0;
}
-
diff --git a/examples/ParallelJIT/ParallelJIT.cpp b/examples/ParallelJIT/ParallelJIT.cpp
index d82a6be..464bd22 100644
--- a/examples/ParallelJIT/ParallelJIT.cpp
+++ b/examples/ParallelJIT/ParallelJIT.cpp
@@ -242,8 +242,7 @@
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;