diff options
Diffstat (limited to 'lib/VMCore/Pass.cpp')
-rw-r--r-- | lib/VMCore/Pass.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp index 8881329..b37b460 100644 --- a/lib/VMCore/Pass.cpp +++ b/lib/VMCore/Pass.cpp @@ -92,7 +92,15 @@ FunctionPassManager::~FunctionPassManager() { delete PM; } void FunctionPassManager::add(FunctionPass *P) { PM->add(P); } void FunctionPassManager::add(ImmutablePass *IP) { PM->add(IP); } bool FunctionPassManager::run(Function &F) { - MP->materializeFunction(&F); + try { + MP->materializeFunction(&F); + } catch (std::string& errstr) { + std::cerr << "Error reading bytecode file: " << errstr << "\n"; + abort(); + } catch (...) { + std::cerr << "Error reading bytecode file:\n"; + abort(); + } return PM->run(F); } |