Print an error message if there is an error materialize the bc file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11041 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 6a067fd..4426c67 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -110,7 +110,12 @@
     return Addr;   // Check if function already code gen'd
 
   // Make sure we read in the function if it exists in this Module
-  MP->materializeFunction(F);
+  try {
+    MP->materializeFunction(F);
+  } catch (...) {
+    std::cerr << "Error parsing bytecode file!\n";
+    abort();
+  }
 
   if (F->isExternal()) {
     void *Addr = getPointerToNamedFunction(F->getName());