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.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'gold/parameters.h') diff --git a/gold/parameters.h b/gold/parameters.h index 3b480c211bd..c4e3fe311e9 100644 --- a/gold/parameters.h +++ b/gold/parameters.h @@ -27,6 +27,7 @@ namespace gold { class General_options; +class Errors; // Here we define the Parameters class which simply holds simple // general parameters which apply to the entire link. We use a global @@ -39,7 +40,17 @@ class General_options; class Parameters { public: - Parameters(const General_options*); + Parameters(const General_options*, Errors*); + + // Return the error object. + Errors* + errors() const + { return this->errors_; } + + // Return the output file name. + const char* + output_file_name() const + { return this->output_file_name_; } // Whether we are generating a regular executable. bool @@ -135,6 +146,11 @@ class Parameters STRIP_DEBUG }; + // A pointer to the error handling object. + Errors* errors_; + + // The output file name. + const char* output_file_name_; // The type of the output file. Output_file_type output_file_type_; // The target system root directory. @@ -160,7 +176,7 @@ class Parameters extern const Parameters* parameters; // Initialize the global variable. -extern void initialize_parameters(const General_options*); +extern void initialize_parameters(const General_options*, Errors*); // Set the size and endianness of the global parameters variable. extern void set_parameters_size_and_endianness(int size, bool is_big_endian); -- cgit v1.2.1