mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
* options.h (Command_line::Pre_options): New class.
(Command_line::pre_options): New member. * options.cc (gold::options::ready_to_register): New variable. (One_option::register_option): Do nothing if not registering options. Assert if same short option registered twice. (General_options::General_options): Turn off option registration when done constructing. (Command_line::Pre_options::Pre_options): New constructor.
This commit is contained in:
@@ -1479,6 +1479,16 @@ class Command_line
|
||||
Command_line(const Command_line&);
|
||||
Command_line& operator=(const Command_line&);
|
||||
|
||||
// This is a dummy class to provide a constructor that runs before
|
||||
// the constructor for the General_options. The Pre_options constructor
|
||||
// is used as a hook to set the flag enabling the options to register
|
||||
// themselves.
|
||||
struct Pre_options {
|
||||
Pre_options();
|
||||
};
|
||||
|
||||
// This must come before options_!
|
||||
Pre_options pre_options_;
|
||||
General_options options_;
|
||||
Position_dependent_options position_options_;
|
||||
Script_options script_options_;
|
||||
|
||||
Reference in New Issue
Block a user