[llvm-commits] CVS: llvm/lib/VMCore/Pass.cpp
LLVM
llvm at cs.uiuc.edu
Wed Jul 7 16:03:08 PDT 2004
Changes in directory llvm/lib/VMCore:
Pass.cpp updated: 1.58 -> 1.59
---
Log message:
Fix for bug 391: http://llvm.cs.uiuc.edu/PR391 .
Improve exeception handling around bcreader invocations.
---
Diffs of the changes: (+9 -1)
Index: llvm/lib/VMCore/Pass.cpp
diff -u llvm/lib/VMCore/Pass.cpp:1.58 llvm/lib/VMCore/Pass.cpp:1.59
--- llvm/lib/VMCore/Pass.cpp:1.58 Sun Jul 4 06:53:53 2004
+++ llvm/lib/VMCore/Pass.cpp Wed Jul 7 16:01:38 2004
@@ -92,7 +92,15 @@
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);
}
More information about the llvm-commits
mailing list