r213869 - Remove the last use of llvm::ExecutionEngine::create.
Rafael Espindola
rafael.espindola at gmail.com
Thu Jul 24 08:54:23 PDT 2014
Author: rafael
Date: Thu Jul 24 10:54:23 2014
New Revision: 213869
URL: http://llvm.org/viewvc/llvm-project?rev=213869&view=rev
Log:
Remove the last use of llvm::ExecutionEngine::create.
Modified:
cfe/trunk/examples/clang-interpreter/main.cpp
Modified: cfe/trunk/examples/clang-interpreter/main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/main.cpp?rev=213869&r1=213868&r2=213869&view=diff
==============================================================================
--- cfe/trunk/examples/clang-interpreter/main.cpp (original)
+++ cfe/trunk/examples/clang-interpreter/main.cpp Thu Jul 24 10:54:23 2014
@@ -42,12 +42,19 @@ std::string GetExecutablePath(const char
return llvm::sys::fs::getMainExecutable(Argv0, MainAddr);
}
+static llvm::ExecutionEngine *createExecutionEngine(llvm::Module *M,
+ std::string *ErrorStr) {
+ llvm::EngineBuilder EB = llvm::EngineBuilder(M)
+ .setEngineKind(llvm::EngineKind::Either)
+ .setErrorStr(ErrorStr);
+ return EB.create();
+}
+
static int Execute(llvm::Module *Mod, char * const *envp) {
llvm::InitializeNativeTarget();
std::string Error;
- std::unique_ptr<llvm::ExecutionEngine> EE(
- llvm::ExecutionEngine::create(Mod, /*ForceInterpreter*/ false, &Error));
+ std::unique_ptr<llvm::ExecutionEngine> EE(createExecutionEngine(Mod, &Error));
if (!EE) {
llvm::errs() << "unable to make execution engine: " << Error << "\n";
return 255;
More information about the cfe-commits
mailing list