mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
ExecutionEngine::create(): fix interpreter fallback when JIT is unavailable
ForceInterpreter=false shouldn't disable the interpreter completely because it can still be necessary to interpret if the target doesn't support JIT. No obvious way to test this in LLVM, but this matches what LLVMCreateExecutionEngineForModule() does and fixes the clang-interpreter example in the clang source tree which uses the ExecutionEngine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212086 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7186dd4513
commit
faa4e49b33
@ -411,10 +411,11 @@ ExecutionEngine *ExecutionEngine::create(Module *M,
|
|||||||
std::string *ErrorStr,
|
std::string *ErrorStr,
|
||||||
CodeGenOpt::Level OptLevel,
|
CodeGenOpt::Level OptLevel,
|
||||||
bool GVsWithCode) {
|
bool GVsWithCode) {
|
||||||
EngineBuilder EB = EngineBuilder(M)
|
|
||||||
.setEngineKind(ForceInterpreter
|
EngineBuilder EB =
|
||||||
? EngineKind::Interpreter
|
EngineBuilder(M)
|
||||||
: EngineKind::JIT)
|
.setEngineKind(ForceInterpreter ? EngineKind::Interpreter
|
||||||
|
: EngineKind::Either)
|
||||||
.setErrorStr(ErrorStr)
|
.setErrorStr(ErrorStr)
|
||||||
.setOptLevel(OptLevel)
|
.setOptLevel(OptLevel)
|
||||||
.setAllocateGVsWithCode(GVsWithCode);
|
.setAllocateGVsWithCode(GVsWithCode);
|
||||||
|
Loading…
Reference in New Issue
Block a user