diff options
author | Reid Kleckner <reid@kleckner.net> | 2009-07-18 00:42:18 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2009-07-18 00:42:18 +0000 |
commit | 4b1511b027ce0b648b3379f2891816c25b46f515 (patch) | |
tree | cefcab8368bdccbb9f270209acf14cc77f572fa8 /tools/lli | |
parent | 016de81177ec5c950f1668be4a48992bc1ee0d75 (diff) | |
download | external_llvm-4b1511b027ce0b648b3379f2891816c25b46f515.zip external_llvm-4b1511b027ce0b648b3379f2891816c25b46f515.tar.gz external_llvm-4b1511b027ce0b648b3379f2891816c25b46f515.tar.bz2 |
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 'tools/lli')
-rw-r--r-- | tools/lli/lli.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index 8afdbca..12f9155 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -131,6 +131,12 @@ int main(int argc, char **argv, char * const *envp) { exit(1); } + EngineBuilder builder(MP); + builder.setErrorStr(&ErrorMsg) + .setEngineKind(ForceInterpreter + ? EngineKind::Interpreter + : EngineKind::JIT); + // If we are supposed to override the target triple, do so now. if (!TargetTriple.empty()) Mod->setTargetTriple(TargetTriple); @@ -146,8 +152,9 @@ int main(int argc, char **argv, char * const *envp) { case '2': OLvl = CodeGenOpt::Default; break; case '3': OLvl = CodeGenOpt::Aggressive; break; } - - EE = ExecutionEngine::create(MP, ForceInterpreter, &ErrorMsg, OLvl); + builder.setOptLevel(OLvl); + + EE = builder.create(); if (!EE) { if (!ErrorMsg.empty()) errs() << argv[0] << ": error creating EE: " << ErrorMsg << "\n"; |