diff options
author | Joseph Myers <joseph@codesourcery.com> | 2010-11-19 13:25:39 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2010-11-19 13:25:39 +0000 |
commit | 21bf1558203226d4191d93a0b110b46611782f72 (patch) | |
tree | f12b65b217fce54841d0387e6cafc7b704994c38 /gcc/opts.h | |
parent | 3be0ac864a1e360076605c24c39387f0b97bdf0c (diff) | |
download | gcc-21bf1558203226d4191d93a0b110b46611782f72.zip gcc-21bf1558203226d4191d93a0b110b46611782f72.tar.gz gcc-21bf1558203226d4191d93a0b110b46611782f72.tar.bz2 |
options.texi (Var): Document effects of Defer.
* doc/options.texi (Var): Document effects of Defer.
(Defer): Document.
* opt-functions.awk (var_type, var_set): Handle deferred options.
* opts-common.c (set_option): Handle CLVC_DEFER.
* common.opt (fcall-saved-, fcall-used-, fdump-, ffixed-,
fplugin=, fplugin-arg-, fstack-limit, fstack-limit-register=,
fstack-limit-symbol=): Mark as deferred.
* opts.c: Don't include rtl.h, ggc.h, output.h, tree-pass.h or
plugin.h.
(print_filtered_help): Don't report state of CLVC_DEFER options.
(common_handle_option): Move code for OPT_fcall_used_,
OPT_fcall_saved_, OPT_fdump_, OPT_ffixed_, OPT_fplugin_,
OPT_fplugin_arg_, OPT_fstack_limit, OPT_fstack_limit_register_ and
OPT_fstack_limit_symbol_ to opts-global.c.
(option_enabled, get_option_state): Handle CLVC_DEFER.
* opts.h: Include vec.h.
(enum cl_var_type): Add CLVC_DEFER.
(cl_deferred_option): Define type and vectors.
(handle_common_deferred_options): Declare.
* opts-global.c: New.
* toplev.c (toplev_main): Call handle_common_deferred_options
* Makefile.in (OPTS_H): Include $(VEC_H).
(OBJS-common): Include opts-global.o.
(opts.o): Update dependencies.
(opts-global.o): Add dependencies.
From-SVN: r166942
Diffstat (limited to 'gcc/opts.h')
-rw-r--r-- | gcc/opts.h | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #define GCC_OPTS_H #include "input.h" +#include "vec.h" /* Specifies how a switch's VAR_VALUE relates to its FLAG_VAR. */ enum cl_var_type { @@ -39,7 +40,11 @@ enum cl_var_type { /* The switch takes a string argument and FLAG_VAR points to that argument. */ - CLVC_STRING + CLVC_STRING, + + /* The switch should be stored in the VEC pointed to by FLAG_VAR for + later processing. */ + CLVC_DEFER }; struct cl_option @@ -158,6 +163,20 @@ struct cl_decoded_option int errors; }; +/* Structure describing an option deferred for handling after the main + option handlers. */ + +typedef struct +{ + /* Elements from struct cl_decoded_option used for deferred + options. */ + size_t opt_index; + const char *arg; + int value; +} cl_deferred_option; +DEF_VEC_O(cl_deferred_option); +DEF_VEC_ALLOC_O(cl_deferred_option,heap); + /* Structure describing a single option-handling callback. */ struct cl_option_handler_func @@ -264,4 +283,5 @@ extern void control_warning_option (unsigned int opt_index, int kind, struct gcc_options *opts_set, diagnostic_context *dc); extern void print_ignored_options (void); +extern void handle_common_deferred_options (void); #endif |