summaryrefslogtreecommitdiff
path: root/gcc/opth-gen.awk
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-26 23:18:28 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-26 23:18:28 +0000
commitd62a5950068849e2419dfbeaca7e83e456e14cf9 (patch)
tree36e9808ac190cda7d402aca282c7bbe11cbf8b71 /gcc/opth-gen.awk
parentfc0b81b6311a4ff954ce77fec5259d7521fe28ec (diff)
downloadgcc-d62a5950068849e2419dfbeaca7e83e456e14cf9.tar.gz
* doc/options.texi (Enum, EnumValue): Document new record types.
(Enum): Document new option flag. * opt-functions.awk * optc-gen.awk: Handle enumerated option arguments. * opth-gen.awk: Handle enumerated option arguments. * opts-common.c (enum_arg_ok_for_language, enum_arg_to_value, enum_value_to_arg): New. (decode_cmdline_option): Handle enumerated arguments. (read_cmdline_option): Handle CL_ERR_ENUM_ARG. (set_option, option_enabled, get_option_state): Handle CLVC_ENUM. * opts.c (print_filtered_help, print_specific_help): Take lang_mask arguments. (print_filtered_help): Handle printing values of enumerated options. Print possible arguments for enumerated options. (print_specific_help): Update call to print_filtered_help. (common_handle_option): Update calls to print_specific_help. Use value rather than arg for OPT_fdiagnostics_show_location_. Don't handle OPT_ffp_contract_, OPT_fexcess_precision_, OPT_fvisibility_, OPT_ftls_model_, OPT_fira_algorithm_ or OPT_fira_region_ here. * opts.h (enum cl_var_type): Add CLVC_ENUM. (struct cl_option): Add var_enum. (CL_ENUM_CANONICAL, CL_ENUM_DRIVER_ONLY, struct cl_enum_arg, struct cl_enum, cl_enums, cl_enums_count): New. (CL_ERR_ENUM_ARG): Define. (CL_ERR_NEGATIVE): Update value. (enum_value_to_arg): Declare. * common.opt (flag_ira_algorithm, flag_ira_region, flag_fp_contract_mode, flag_excess_precision_cmdline, default_visibility, flag_tls_default): Remove Variable entries. (help_enum_printed): New Variable. (fdiagnostics-show-location=): Use Enum. Add associated SourceInclude, Enum and EnumValue entries. (fexcess-precision=, ffp-contract=, fira-algorithm=, fira-region=, ftls-model=, fvisibility=): Use Enum, Var and Init. Add associated Enum and EnumValue entries. po: * exgettext: Handle UnknownError. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167190 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opth-gen.awk')
-rw-r--r--gcc/opth-gen.awk25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/opth-gen.awk b/gcc/opth-gen.awk
index 9fafb99d460..db32121f914 100644
--- a/gcc/opth-gen.awk
+++ b/gcc/opth-gen.awk
@@ -77,6 +77,31 @@ BEGIN {
else if ($1 == "SourceInclude") {
extra_c_includes[n_extra_c_includes++] = $2;
}
+ else if ($1 == "Enum") {
+ props = $2
+ name = opt_args("Name", props)
+ type = opt_args("Type", props)
+ unknown_error = opt_args("UnknownError", props)
+ enum_names[n_enums] = name
+ enum_type[name] = type
+ enum_index[name] = n_enums
+ enum_unknown_error[name] = unknown_error
+ enum_help[name] = $3
+ n_enums++
+ }
+ else if ($1 == "EnumValue") {
+ props = $2
+ enum_name = opt_args("Enum", props)
+ string = opt_args("String", props)
+ value = opt_args("Value", props)
+ val_flags = "0"
+ val_flags = val_flags \
+ test_flag("Canonical", props, "| CL_ENUM_CANONICAL") \
+ test_flag("DriverOnly", props, "| CL_ENUM_DRIVER_ONLY")
+ enum_data[enum_name] = enum_data[enum_name] \
+ " { " quote string quote ", " value ", " val_flags \
+ " },\n"
+ }
else {
name = opt_args("Mask", $1)
if (name == "") {