aboutsummaryrefslogtreecommitdiff
path: root/gold/parameters.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-14 06:49:14 +0000
committerIan Lance Taylor <iant@google.com>2007-10-14 06:49:14 +0000
commit75f2446ec3c13eca3fe0c7cfdbb232e760d36596 (patch)
treea243e4c2c79cd8790a316a38b552507b62bf0421 /gold/parameters.h
parenteb4dfdd470e49ab56eed5cead19704e0926530d0 (diff)
downloadgdb-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.h')
-rw-r--r--gold/parameters.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/gold/parameters.h b/gold/parameters.h
index 3b480c2..c4e3fe3 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);