summaryrefslogtreecommitdiff
path: root/gcc/opts.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/opts.h')
-rw-r--r--gcc/opts.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/opts.h b/gcc/opts.h
index b876c5195c9..88fabf9fddc 100644
--- a/gcc/opts.h
+++ b/gcc/opts.h
@@ -170,6 +170,7 @@ extern const unsigned int cl_lang_count;
/* Flags for an enumerated option argument. */
#define CL_ENUM_CANONICAL (1 << 0) /* Canonical for this value. */
#define CL_ENUM_DRIVER_ONLY (1 << 1) /* Only accepted in the driver. */
+#define CL_ENUM_SET_SHIFT 2 /* Shift for enum set. */
/* Structure describing an enumerated option argument. */
@@ -226,6 +227,7 @@ extern const unsigned int cl_enums_count;
#define CL_ERR_NEGATIVE (1 << 6) /* Negative form of option
not permitted (together
with OPT_SPECIAL_unknown). */
+#define CL_ERR_ENUM_SET_ARG (1 << 7) /* Bad argument of enumerated set. */
/* Structure describing the result of decoding an option. */
@@ -260,9 +262,14 @@ struct cl_decoded_option
/* For a boolean option, 1 for the true case and 0 for the "no-"
case. For an unsigned integer option, the value of the
- argument. 1 in all other cases. */
+ argument. For enum the value of the enumerator corresponding
+ to argument string. 1 in all other cases. */
HOST_WIDE_INT value;
+ /* For EnumSet the value mask. Variable should be changed to
+ value | (prev_value & ~mask). */
+ HOST_WIDE_INT mask;
+
/* Any flags describing errors detected in this option. */
int errors;
};
@@ -374,7 +381,8 @@ extern bool get_option_state (struct gcc_options *, int,
extern void set_option (struct gcc_options *opts,
struct gcc_options *opts_set,
int opt_index, HOST_WIDE_INT value, const char *arg,
- int kind, location_t loc, diagnostic_context *dc);
+ int kind, location_t loc, diagnostic_context *dc,
+ HOST_WIDE_INT = 0);
extern void *option_flag_var (int opt_index, struct gcc_options *opts);
bool handle_generated_option (struct gcc_options *opts,
struct gcc_options *opts_set,