diff options
author | Richard Sandiford <richard@codesourcery.com> | 2005-06-14 14:37:49 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2005-06-14 14:37:49 +0000 |
commit | ee133b6978ba42e5b2b1f91ae0fa000bdc4686c1 (patch) | |
tree | 7e6e307d1535c560e0c4c03640939d48c37b0da8 /gcc/optc-gen.awk | |
parent | efe4c4e7d2e0e003177382034a65384a8ad1ce42 (diff) | |
download | gcc-ee133b6978ba42e5b2b1f91ae0fa000bdc4686c1.zip gcc-ee133b6978ba42e5b2b1f91ae0fa000bdc4686c1.tar.gz gcc-ee133b6978ba42e5b2b1f91ae0fa000bdc4686c1.tar.bz2 |
opt-functions.awk (global_state_p, [...]): New.
* opt-functions.awk (global_state_p, needs_state_p, static_var): New.
(var_ref): Take the option's flags as a second parameter. Check
static_var.
* optc-gen.awk: Declare local state variables. Pass flags to var_ref.
From-SVN: r100937
Diffstat (limited to 'gcc/optc-gen.awk')
-rw-r--r-- | gcc/optc-gen.awk | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index a71eb2a..85876e0 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -85,6 +85,14 @@ for (i = 0; i < n_opts; i++) { var_seen[name] = 1; } +print "" +print "/* Local state variables. */" +for (i = 0; i < n_opts; i++) { + name = static_var(opts[i], flags[i]); + if (name != "") + print "static " var_type(flags[i]) name ";" +} +print "" print "const char * const lang_names[] =\n{" for (i = 0; i < n_langs; i++) { @@ -152,7 +160,8 @@ for (i = 0; i < n_opts; i++) { condition, cl_flags, cl_flags) else printf(" %s,\n", cl_flags) - printf(" %s, %s }%s\n", var_ref(flags[i]), var_set(flags[i]), comma) + printf(" %s, %s }%s\n", var_ref(opts[i], flags[i]), + var_set(flags[i]), comma) } print "};" |