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
This commit is contained in:
Chris Lattner 2004-02-01 00:32:35 +00:00
parent 52220f61bb
commit da79bd2322

View File

@ -110,7 +110,12 @@ void *JIT::getPointerToFunction(Function *F) {
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());