Run all error handling through an Errors object. Delete output file

on error.
This commit is contained in:
Ian Lance Taylor
2007-10-14 06:49:14 +00:00
parent eb4dfdd470
commit 75f2446ec3
31 changed files with 1269 additions and 918 deletions

View File

@@ -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.