[llvm-commits] CVS: llvm/lib/VMCore/Pass.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Jul 6 14:35:16 PDT 2006
Changes in directory llvm/lib/VMCore:
Pass.cpp updated: 1.69 -> 1.70
---
Log message:
Change the ModuleProvider interface to not throw exceptions.
---
Diffs of the changes: (+2 -6)
Pass.cpp | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
Index: llvm/lib/VMCore/Pass.cpp
diff -u llvm/lib/VMCore/Pass.cpp:1.69 llvm/lib/VMCore/Pass.cpp:1.70
--- llvm/lib/VMCore/Pass.cpp:1.69 Wed Jun 7 15:00:19 2006
+++ llvm/lib/VMCore/Pass.cpp Thu Jul 6 16:35:01 2006
@@ -95,14 +95,10 @@
void FunctionPassManager::add(FunctionPass *P) { PM->add(P); }
void FunctionPassManager::add(ImmutablePass *IP) { PM->add(IP); }
bool FunctionPassManager::run(Function &F) {
- try {
- MP->materializeFunction(&F);
- } catch (std::string& errstr) {
+ std::string errstr;
+ if (MP->materializeFunction(&F, &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