Fix for bug 391.
Improve exeception handling around bcreader invocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14674 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 5340a19..02577df 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -117,6 +117,9 @@
// Make sure we read in the function if it exists in this Module
try {
MP->materializeFunction(F);
+ } catch ( std::string& errmsg ) {
+ std::cerr << "Error parsing bytecode file: " << errmsg << "\n";
+ abort();
} catch (...) {
std::cerr << "Error parsing bytecode file!\n";
abort();