aboutsummaryrefslogtreecommitdiff
path: root/gcc/opth-gen.awk
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-11-19 13:30:38 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2010-11-19 13:30:38 +0000
commit69ccdddbb807489bdc6f25871532b6f8e236f82f (patch)
tree7fd6c4c0bba8f7cc2410b5d720f57e9dea16b4a0 /gcc/opth-gen.awk
parent6a1f6c9c8645b35f6704ded5f1f3f9186dadc109 (diff)
downloadgcc-69ccdddbb807489bdc6f25871532b6f8e236f82f.zip
gcc-69ccdddbb807489bdc6f25871532b6f8e236f82f.tar.gz
gcc-69ccdddbb807489bdc6f25871532b6f8e236f82f.tar.bz2
common.opt (debug_struct_ordinary, [...]): New Variable entries.
* common.opt (debug_struct_ordinary, debug_struct_generic): New Variable entries. * dwarf2out.c (matches_main_base, dump_struct_debug, DUMP_GSTRUCT, should_emit_struct_debug): Move from opts.c. * flag-types.h (enum debug_struct_file): Move from opts.c. * flags.h (should_emit_struct_debug): Remove. (base_of_path): Declare. (set_struct_debug_option): Add gcc_options parameter. * optc-gen.awk, opth-gen.awk: Handle array variables. * opts.c (enum debug_struct_file, debug_struct_ordinary, debug_struct_generic): Remove. (set_struct_debug_option): Add gcc_options parameter. (base_of_path): Remove static. (main_input_basename, main_input_baselength, matches_main_base, dump_struct_debug, DUMP_GSTRUCT, should_emit_struct_debug): Remove. * toplev.c (main_input_basename, main_input_baselength): Define here. * toplev.h (main_input_basename, main_input_baselength): Declare here. c-family: * c-opts.c (c_common_handle_option): Update calls to set_struct_debug_option. From-SVN: r166944
Diffstat (limited to 'gcc/opth-gen.awk')
-rw-r--r--gcc/opth-gen.awk6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/opth-gen.awk b/gcc/opth-gen.awk
index 677225e..4588a53 100644
--- a/gcc/opth-gen.awk
+++ b/gcc/opth-gen.awk
@@ -86,13 +86,17 @@ for (i = 0; i < n_extra_vars; i++) {
orig_var = var
name = var
type = var
+ type_after = var
sub("^.*[ *]", "", name)
+ sub("\\[.*\\]$", "", name)
+ sub("\\[.*\\]$", "", type)
sub(" *" name "$", "", type)
+ sub("^.*" name, "", type_after)
var_seen[name] = 1
print "#ifdef GENERATOR_FILE"
print "extern " orig_var ";"
print "#else"
- print " " type " x_" name ";"
+ print " " type " x_" name type_after ";"
print "#define " name " global_options.x_" name
print "#endif"
}