summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2009-07-18 00:42:18 +0000
committerReid Kleckner <reid@kleckner.net>2009-07-18 00:42:18 +0000
commit4b1511b027ce0b648b3379f2891816c25b46f515 (patch)
treecefcab8368bdccbb9f270209acf14cc77f572fa8 /examples
parent016de81177ec5c950f1668be4a48992bc1ee0d75 (diff)
downloadllvm-4b1511b027ce0b648b3379f2891816c25b46f515.tar.gz
llvm-4b1511b027ce0b648b3379f2891816c25b46f515.tar.bz2
llvm-4b1511b027ce0b648b3379f2891816c25b46f515.tar.xz
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
Diffstat (limited to 'examples')
-rw-r--r--examples/BrainF/BrainFDriver.cpp3
-rw-r--r--examples/Fibonacci/fibonacci.cpp3
-rw-r--r--examples/HowToUseJIT/HowToUseJIT.cpp3
-rw-r--r--examples/Kaleidoscope/toy.cpp3
-rw-r--r--examples/ParallelJIT/ParallelJIT.cpp3
5 files changed, 5 insertions, 10 deletions
diff --git a/examples/BrainF/BrainFDriver.cpp b/examples/BrainF/BrainFDriver.cpp
index 021b9510ce..fba79cfbd5 100644
--- a/examples/BrainF/BrainFDriver.cpp
+++ b/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/examples/Fibonacci/fibonacci.cpp b/examples/Fibonacci/fibonacci.cpp
index d637d4dea1..c5c8f0de89 100644
--- a/examples/Fibonacci/fibonacci.cpp
+++ b/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/examples/HowToUseJIT/HowToUseJIT.cpp b/examples/HowToUseJIT/HowToUseJIT.cpp
index 6d43cb47ce..8a788491fd 100644
--- a/examples/HowToUseJIT/HowToUseJIT.cpp
+++ b/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/examples/Kaleidoscope/toy.cpp b/examples/Kaleidoscope/toy.cpp
index 4fd80a9363..abcd412f07 100644
--- a/examples/Kaleidoscope/toy.cpp
+++ b/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/examples/ParallelJIT/ParallelJIT.cpp b/examples/ParallelJIT/ParallelJIT.cpp
index d82a6be81d..464bd22e8f 100644
--- a/examples/ParallelJIT/ParallelJIT.cpp
+++ b/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;