summaryrefslogtreecommitdiff
path: root/gcc/optc-gen.awk
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-31 22:37:14 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-31 22:37:14 +0000
commitec840af4d87c856dfdcd8a7e36136ca182dabb99 (patch)
tree329a018906d50347a718b59278baff52475262ef /gcc/optc-gen.awk
parentaa686d7d15e611777da1bd513614aebfbfcdeb61 (diff)
downloadgcc-ec840af4d87c856dfdcd8a7e36136ca182dabb99.tar.gz
* opts.h (cl_option): Add comments to fields. Add bit-fields for
various flags. (CL_SEPARATE_NARGS_SHIFT, CL_SEPARATE_NARGS_MASK, CL_SEPARATE_ALIAS, CL_NO_DRIVER_ARG, CL_REJECT_DRIVER, CL_SAVE, CL_DISABLED, CL_REPOR, CL_REJECT_NEGATIVE, CL_MISSING_OK, CL_UINTEGER, CL_NEGATIVE_ALIAS): Remove. (CL_JOINED, CL_SEPARATE, CL_UNDOCUMENTED): Update bit positions. * opt-functions.awk (flag_init, switch_bit_fields): New. (switch_flags): Don't handle flags moved to bit-fields. Don't generate CL_MISSING_OK or CL_SAVE. * optc-gen.awk: Update to generate bit-field output as well as flags field. * gcc.c (driver_wrong_lang_callback): Use cl_reject_driver bit-field instead of CL_REJECT_DRIVER flag. * opts-common.c (generate_canonical_option, decode_cmdline_option): Use bit-fields instead of CL_* flags. * opts.c (maybe_default_option): Use cl_reject_negative bit-field instead of CL_REJECT_NEGATIVE flag. * toplev.c (print_switch_values): Use cl_report bit-field instead of CL_REPORT flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171804 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optc-gen.awk')
-rw-r--r--gcc/optc-gen.awk12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk
index 24def356218..a821c648d37 100644
--- a/gcc/optc-gen.awk
+++ b/gcc/optc-gen.awk
@@ -401,15 +401,21 @@ for (i = 0; i < n_opts; i++) {
printf(" %d,\n", idx)
condition = opt_args("Condition", flags[i])
cl_flags = switch_flags(flags[i])
+ cl_bit_fields = switch_bit_fields(flags[i])
+ cl_zero_bit_fields = switch_bit_fields("")
if (condition != "")
printf("#if %s\n" \
" %s,\n" \
+ " 0, %s,\n" \
"#else\n" \
- " CL_DISABLED,\n" \
+ " 0,\n" \
+ " 1 /* Disabled. */, %s,\n" \
"#endif\n",
- condition, cl_flags, cl_flags)
+ condition, cl_flags, cl_bit_fields, cl_zero_bit_fields)
else
- printf(" %s,\n", cl_flags)
+ printf(" %s,\n" \
+ " 0, %s,\n",
+ cl_flags, cl_bit_fields)
printf(" %s, %s }%s\n", var_ref(opts[i], flags[i]),
var_set(flags[i]), comma)
}