diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-01 01:07:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-01 01:07:25 +0000 |
commit | 93f7c408798b1f60c5b31d926b379baf08443ea3 (patch) | |
tree | cd556b1a0ec60e1306aec1c8151fec338edfe70d /llvm/lib/ExecutionEngine/ExecutionEngine.cpp | |
parent | 87d16ffdb0245e10a243f71fe1b57d17ee7d303f (diff) | |
download | bcm5719-llvm-93f7c408798b1f60c5b31d926b379baf08443ea3.tar.gz bcm5719-llvm-93f7c408798b1f60c5b31d926b379baf08443ea3.zip |
Print an error message if we can't materialize the bytecode file
llvm-svn: 11043
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index 76ba2284306..5892d169e78 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/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; |