diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-19 13:25:39 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-19 13:25:39 +0000 |
commit | f0da0668ec829820b192962edf8827836876c47a (patch) | |
tree | f12b65b217fce54841d0387e6cafc7b704994c38 /gcc/opts.h | |
parent | aed3bc0e207df1dc89ea12c0e65c0af902e17cb7 (diff) | |
download | gcc-f0da0668ec829820b192962edf8827836876c47a.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opts.h')
-rw-r--r-- | gcc/opts.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gcc/opts.h b/gcc/opts.h index 00422b6ea38..9bbbced721a 100644 --- a/gcc/opts.h +++ b/gcc/opts.h @@ -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 |