diff options
author | Cary Coutant <ccoutant@google.com> | 2009-08-25 01:10:48 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2009-08-25 01:10:48 +0000 |
commit | 293c13867ae768c9c51a8f5d8d7ddf59b9cff58e (patch) | |
tree | 952ea98bef654c1744cd598dfa28f611612b26ae /gold/options.h | |
parent | c1af96a0c544a1dac4a4536ab371980282bb74b0 (diff) | |
download | gdb-293c13867ae768c9c51a8f5d8d7ddf59b9cff58e.zip gdb-293c13867ae768c9c51a8f5d8d7ddf59b9cff58e.tar.gz gdb-293c13867ae768c9c51a8f5d8d7ddf59b9cff58e.tar.bz2 |
* 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.
Diffstat (limited to 'gold/options.h')
-rw-r--r-- | gold/options.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gold/options.h b/gold/options.h index 359866e..3f14529 100644 --- a/gold/options.h +++ b/gold/options.h @@ -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_; |