summaryrefslogtreecommitdiff
path: root/tools/bugpoint/BugDriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bugpoint/BugDriver.cpp')
-rw-r--r--tools/bugpoint/BugDriver.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp
index 9d82e8b3cc..e499477630 100644
--- a/tools/bugpoint/BugDriver.cpp
+++ b/tools/bugpoint/BugDriver.cpp
@@ -73,15 +73,10 @@ BugDriver::BugDriver(const char *toolname, bool as_child, bool find_bugs,
/// return it, or return null if not possible.
///
Module *llvm::ParseInputFile(const std::string &InputFilename) {
- Module *Result = 0;
- try {
- Result = ParseBytecodeFile(InputFilename);
- if (!Result && !(Result = ParseAssemblyFile(InputFilename))){
- std::cerr << "bugpoint: could not read input file '"
- << InputFilename << "'!\n";
- }
- } catch (const ParseException &E) {
- std::cerr << "bugpoint: " << E.getMessage() << '\n';
+ ParseError Err;
+ Module *Result = ParseBytecodeFile(InputFilename);
+ if (!Result && !(Result = ParseAssemblyFile(InputFilename,&Err))) {
+ std::cerr << "bugpoint: " << Err.getMessage() << "\n";
Result = 0;
}
return Result;