diff options
Diffstat (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r-- | lib/ExecutionEngine/ExecutionEngine.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index 76ba228430..5892d169e7 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -130,11 +130,17 @@ ExecutionEngine *ExecutionEngine::create(ModuleProvider *MP, EE = JIT::create(MP, IL); // If we can't make a JIT, make an interpreter instead. - try { - if (EE == 0) - EE = Interpreter::create(MP->materializeModule(), IL); - } catch (...) { - EE = 0; + if (EE == 0) { + try { + Module *M = MP->materializeModule(); + try { + EE = Interpreter::create(M, IL); + } catch (...) { + std::cerr << "Error creating the interpreter!\n"; + } + } catch (...) { + std::cerr << "Error reading the bytecode file!\n"; + } } if (EE == 0) delete IL; |