From fc8a2d5a8390952029e1c47a623e046b744f44d4 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Sat, 18 Jul 2009 00:42:18 +0000 Subject: Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create(). Also a test commit. llvm-svn: 76276 --- llvm/tools/lli/lli.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'llvm/tools') 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"; -- cgit v1.2.3