summaryrefslogtreecommitdiff
path: root/gold/parameters.cc
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.cc
parenteb4dfdd470e49ab56eed5cead19704e0926530d0 (diff)
downloadbinutils-gdb-75f2446ec3c13eca3fe0c7cfdbb232e760d36596.tar.gz
Run all error handling through an Errors object. Delete output file
on error.
Diffstat (limited to 'gold/parameters.cc')
-rw-r--r--gold/parameters.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/gold/parameters.cc b/gold/parameters.cc
index 337469a4ba6..817268b1624 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.