diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-23 15:13:12 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-23 15:13:12 +0000 |
commit | 8be1803e426ba58979f77f8b8978a23d315a60b6 (patch) | |
tree | dd3d960ba0ae8b82eeaf2d114c9eb9550fb1cb58 /gcc/gengtype-parse.c | |
parent | f31ecdaa2c4053244361f5f479422c6151f79e31 (diff) | |
download | gcc-8be1803e426ba58979f77f8b8978a23d315a60b6.tar.gz |
2010-11-23 Basile Starynkevitch <basile@starynkevitch.net>
Jeremie Salvucci <jeremie.salvucci@free.fr>
* gengtype.c (enum typekind, struct options)
(struct nested_ptr_data, struct pair, NUM_PARAM)
(enum gc_used_num, struct type, UNION_P, UNION_OR_STRUCT_P):
Move to gengtype.h.
(string_type, scalar_nonchar, scalar_nonchar, scalar_char):
Remove static, add zero state_number.
(typedefs, structures, param_structs, variables): Remove static.
(create_option): Remove.
(create_string_option, create_type_option, create_nested_option):
New functions.
(create_nested_ptr_option): Use create_nested_option.
(note_variable, adjust_field_rtx_def, adjust_field_type): Call the
new create*option functions.
(process_gc_options): Adjust for discriminated option.
(output_mangled_typename): Handle TYPE_NONE.
(walk_type): Test option kinds.
(write_types_process_field): Handle TYPE_NONE and TYPE_ARRAY.
(write_func_for_structure, write_type, write_local, write_root)
(write_roots, note_def_vec, dump_options): Adjust for
discriminated option.
* gengtype.h
(typedefs, structures, param_structs, variables, enum typekind):
Move from gengtype.c
(enum option_kind): New discriminating enumeration.
(struct options): Becomes discriminated.
(struct nested_ptr_data): Nove from gengtype.c
(create_string_option, create_type_option, create_nested_option)
(create_nested_ptr_option): New functions
(struct pair, enum_gc_used_enum, NUM_PARAM, struct type, UNION_P)
(UNION_OR_STRUCT_P): Move from gengtype.c
* gengtype-parse.c (str_optvalue_opt, type_optvalue, option): Make
discriminated options.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167080 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gengtype-parse.c')
-rw-r--r-- | gcc/gengtype-parse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/gengtype-parse.c b/gcc/gengtype-parse.c index 476a9fd203c..8f0b0c53233 100644 --- a/gcc/gengtype-parse.c +++ b/gcc/gengtype-parse.c @@ -372,7 +372,7 @@ str_optvalue_opt (options_p prev) value = string_seq (); require (')'); } - return create_option (prev, name, value); + return create_string_option (prev, name, value); } /* absdecl: type '*'* @@ -410,7 +410,7 @@ type_optvalue (options_p prev, const char *name) require ('('); ty = absdecl (); require (')'); - return create_option (prev, name, ty); + return create_type_option (prev, name, ty); } /* Nested pointer data: '(' type '*'* ',' string_seq ',' string_seq ')' */ @@ -459,7 +459,7 @@ option (options_p prev) default: parse_error ("expected an option keyword, have %s", print_cur_token ()); advance (); - return create_option (prev, "", ""); + return create_string_option (prev, "", ""); } } |