diff options
Diffstat (limited to 'llvm/tools/lli/lli.cpp')
-rw-r--r-- | llvm/tools/lli/lli.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp index 8afdbcad95b..12f91558247 100644 --- a/llvm/tools/lli/lli.cpp +++ b/llvm/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"; |