From 75f2446ec3c13eca3fe0c7cfdbb232e760d36596 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 14 Oct 2007 06:49:14 +0000 Subject: Run all error handling through an Errors object. Delete output file on error. --- gold/parameters.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gold/parameters.cc') 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. -- cgit v1.1