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/parameters.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/parameters.cc')
-rw-r--r-- | gold/parameters.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gold/parameters.cc b/gold/parameters.cc index 337469a..817268b 100644 --- a/gold/parameters.cc +++ b/gold/parameters.cc @@ -30,8 +30,9 @@ namespace gold // Initialize the parameters from the options. -Parameters::Parameters(const General_options* options) - : sysroot_(options->sysroot()), +Parameters::Parameters(const General_options* options, Errors* errors) + : errors_(errors), output_file_name_(options->output_file_name()), + sysroot_(options->sysroot()), is_doing_static_link_valid_(false), doing_static_link_(false), is_size_and_endian_valid_(false), size_(0), is_big_endian_(false), optimization_level_(options->optimization_level()) @@ -89,9 +90,9 @@ const Parameters* parameters; // Initialize the global variable. void -initialize_parameters(const General_options* options) +initialize_parameters(const General_options* options, Errors* errors) { - parameters = static_parameters = new Parameters(options); + parameters = static_parameters = new Parameters(options, errors); } // Set whether we are doing a static link. |