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 | 338733fdd2ba0d00ad2ace03836f3e0cbb3f8922 (patch) | |
tree | d16a682c87e5de85ca74fffc0c71c18a01742db2 /lib/ExecutionEngine | |
parent | 369b123bc707377e1da9dcba3b28bf08d8be99cc (diff) | |
download | external_llvm-338733fdd2ba0d00ad2ace03836f3e0cbb3f8922.zip external_llvm-338733fdd2ba0d00ad2ace03836f3e0cbb3f8922.tar.gz external_llvm-338733fdd2ba0d00ad2ace03836f3e0cbb3f8922.tar.bz2 |
Print an error message if we can't materialize the bytecode file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11043 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-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 76ba228..5892d16 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; |