20 #ifndef GCC_GENGTYPE_H
21 #define GCC_GENGTYPE_H
23 #define obstack_chunk_alloc ((void *(*) (long)) xmalloc)
24 #define obstack_chunk_free ((void (*) (void *)) free)
25 #define OBSTACK_CHUNK_SIZE 0
75 static inline const char*
205 const char *from,
const char *to);
321 type_p
param[NUM_PARAM];
338 ((x)->kind == TYPE_UNION \
339 || ((x)->kind == TYPE_LANG_STRUCT \
340 && (x)->u.s.lang_struct->kind == TYPE_UNION))
392 oprintf (outf_p o,
const char *S, ...)
400 outf_p get_output_file_with_visibility (
input_file* inpf);
405 const
char *get_output_file_name (
input_file *inpf);
409 extern const
char *
srcdir;
427 (const struct
fileloc *pos, const
char *msg, ...) ATTRIBUTE_PRINTF_2;
430 extern
char *
xasprintf (const
char *, ...) ATTRIBUTE_PRINTF_1;
436 extern
void add_subclass (type_p base, type_p subclass);
437 extern type_p new_structure (const
char *
name, enum
typekind kind,
438 struct
fileloc *pos, pair_p fields,
439 options_p o, type_p base);
441 extern type_p find_structure (const
char *s, enum
typekind kind);
442 extern type_p create_scalar_type (const
char *name);
443 extern type_p create_pointer (type_p t);
444 extern type_p create_array (type_p t, const
char *
len);
445 extern pair_p create_field_at (pair_p
next, type_p
type,
446 const
char *name, options_p opt,
447 struct fileloc *pos);
448 extern pair_p nreverse_pairs (pair_p list);
449 extern type_p adjust_field_type (type_p, options_p);
450 extern
void note_variable (const
char *s, type_p t, options_p o,
451 struct fileloc *pos);
454 extern
int yylex (const
char **yylval);
455 extern
void yybegin (const
char *fname);
456 extern
void yyend (
void);
467 CHAR_TOKEN_OFFSET = UCHAR_MAX + 1,
468 GTY_TOKEN = CHAR_TOKEN_OFFSET,
486 IGNORABLE_CXX_KEYWORD,
490 FIRST_TOKEN_WITH_VALUE = PARAM_IS
508 #define DBGPRINTF(Fmt,...) do {if (do_debug) \
509 fprintf (stderr, "%s:%d: " Fmt "\n", \
510 lbasename (__FILE__),__LINE__, ##__VA_ARGS__);} while (0)
512 #define DBGPRINT_COUNT_TYPE(Msg,Ty) do {if (do_debug) \
513 dbgprint_count_type_at (__FILE__, __LINE__, Msg, Ty);}while (0)
515 #define DBGPRINTF(Fmt,...) do {} while (0)
516 #define DBGPRINT_COUNT_TYPE(Msg,Ty) do{}while (0)
519 #define FOR_ALL_INHERITED_FIELDS(TYPE, FIELD_VAR) \
520 for (type_p sub = (TYPE); sub; sub = sub->u.s.base_class) \
521 for (FIELD_VAR = sub->u.s.fields; FIELD_VAR; FIELD_VAR = FIELD_VAR->next)