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/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 @@
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 @@
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";