diff options
author | Ian Lance Taylor <iant@google.com> | 2007-10-14 06:49:14 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-10-14 06:49:14 +0000 |
commit | 75f2446ec3c13eca3fe0c7cfdbb232e760d36596 (patch) | |
tree | a243e4c2c79cd8790a316a38b552507b62bf0421 /gold/main.cc | |
parent | eb4dfdd470e49ab56eed5cead19704e0926530d0 (diff) | |
download | gdb-75f2446ec3c13eca3fe0c7cfdbb232e760d36596.zip gdb-75f2446ec3c13eca3fe0c7cfdbb232e760d36596.tar.gz gdb-75f2446ec3c13eca3fe0c7cfdbb232e760d36596.tar.bz2 |
Run all error handling through an Errors object. Delete output file
on error.
Diffstat (limited to 'gold/main.cc')
-rw-r--r-- | gold/main.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gold/main.cc b/gold/main.cc index 49b50b2..eda586b 100644 --- a/gold/main.cc +++ b/gold/main.cc @@ -29,6 +29,7 @@ #include "options.h" #include "parameters.h" +#include "errors.h" #include "dirsearch.h" #include "workqueue.h" #include "object.h" @@ -51,6 +52,8 @@ main(int argc, char** argv) program_name = argv[0]; + Errors errors(program_name); + // Handle the command line options. Command_line command_line; command_line.process(argc - 1, argv + 1); @@ -59,7 +62,7 @@ main(int argc, char** argv) if (command_line.options().print_stats()) start_time = get_run_time(); - initialize_parameters(&command_line.options()); + initialize_parameters(&command_line.options(), &errors); // The work queue. Workqueue workqueue(command_line.options()); @@ -100,5 +103,5 @@ main(int argc, char** argv) program_name, static_cast<long long>(layout.output_file_size())); } - gold_exit(true); + gold_exit(errors.error_count() == 0); } |