aboutsummaryrefslogtreecommitdiff
path: root/tools/gccas/gccas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gccas/gccas.cpp')
-rw-r--r--tools/gccas/gccas.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp
index aeef9b135b..c46b29608a 100644
--- a/tools/gccas/gccas.cpp
+++ b/tools/gccas/gccas.cpp
@@ -137,17 +137,10 @@ int main(int argc, char **argv) {
" llvm .s -> .o assembler for GCC\n");
sys::PrintStackTraceOnErrorSignal();
- std::auto_ptr<Module> M;
- try {
- // Parse the file now...
- M.reset(ParseAssemblyFile(InputFilename));
- } catch (const ParseException &E) {
- std::cerr << argv[0] << ": " << E.getMessage() << "\n";
- return 1;
- }
-
+ ParseError Err;
+ std::auto_ptr<Module> M(ParseAssemblyFile(InputFilename,&Err));
if (M.get() == 0) {
- std::cerr << argv[0] << ": assembly didn't read correctly.\n";
+ std::cerr << argv[0] << ": " << Err.getMessage() << "\n";
return 1;
}