diff options
author | Zack Weinberg <zackw@panix.com> | 2007-03-26 20:55:10 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2007-03-26 20:55:10 +0000 |
commit | 95161faf6d635df17a7792840aa73600624b11fb (patch) | |
tree | 70749f6a010e63bca65e3197ff3b0ff5b77be848 /gcc/gengtype.h | |
parent | 4a399aef3a4ddd508c25f73320646d03dfc08660 (diff) |
gengtype.h (struct type): Replace 'sc' with boolean, scalar_is_char.
* gengtype.h (struct type): Replace 'sc' with boolean, scalar_is_char.
(string_type): Don't declare.
(do_scalar_typedef): Declare.
(create_scalar_type): Update prototype.
* gengtype.c (string_type): Make static.
(scalar_nonchar, scalar_char): New.
(do_scalar_typedef): Export. Always use scalar_nonchar for the type.
(resolve_typedef): Use scalar_nonchar for error recovery.
(create_scalar_type): Remove name_len field. Return scalar_char
or scalar_nonchar as appropriate.
(adjust_field_type): Look at scalar_is_char boolean to decide whether
to use string_type.
(throughout): Use scalar_nonchar instead of calling create_scalar_type,
whenever possible.
(main): Initialize scalar_char and scalar_nonchar before calling
gen_rtx_next.
* gengtype-lex.l: Adjust for removal of second argument to
create_scalar_type. Use yylval.s instead of yylval.t when
returning SCALAR.
* gengtype-yacc.y: Type of SCALAR is string. Call
create_scalar_type from type:SCALAR rule. Adjust for removal of
second argument to create_scalar_type.
From-SVN: r123231
Diffstat (limited to 'gcc/gengtype.h')
-rw-r--r-- | gcc/gengtype.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/gengtype.h b/gcc/gengtype.h index 034a7314cbb..1ee9d3acffb 100644 --- a/gcc/gengtype.h +++ b/gcc/gengtype.h @@ -90,7 +90,7 @@ struct type { lang_bitmap bitmap; type_p lang_struct; } s; - char *sc; + bool scalar_is_char; struct { type_p p; const char *len; @@ -112,9 +112,6 @@ struct type { || (x)->kind == TYPE_STRUCT \ || (x)->kind == TYPE_LANG_STRUCT) -/* The one and only TYPE_STRING. */ -extern struct type string_type; - /* Variables used to communicate between the lexer and the parser. */ extern int lexer_toplevel_done; extern struct fileloc lexer_line; @@ -132,12 +129,13 @@ extern char * xasprintf (const char *, ...) /* Constructor routines for types. */ extern void do_typedef (const char *s, type_p t, struct fileloc *pos); +extern void do_scalar_typedef (const char *s, struct fileloc *pos); extern type_p resolve_typedef (const char *s, struct fileloc *pos); extern type_p new_structure (const char *name, int isunion, struct fileloc *pos, pair_p fields, options_p o); extern type_p find_structure (const char *s, int isunion); -extern type_p create_scalar_type (const char *name, size_t name_len); +extern type_p create_scalar_type (const char *name); extern type_p create_pointer (type_p t); extern type_p create_array (type_p t, const char *len); extern options_p create_option (options_p, const char *name, const void *info); |