* gdbtypes.c (append_composite_type_field): New function.

(init_composite_type): New function.
* gdbtypes.h (append_composite_type_field): Declare.
(init_composite_type): Ditto.
This commit is contained in:
Andrew Cagney
2002-03-23 01:24:54 +00:00
parent 882c8f02fb
commit 0e10145828
3 changed files with 59 additions and 0 deletions

View File

@@ -1054,6 +1054,16 @@ extern struct type *alloc_type (struct objfile *);
extern struct type *init_type (enum type_code, int, int, char *,
struct objfile *);
/* Helper functions to construct a struct or record type. An
initially empty type is created using init_composite_type().
Fields are then added using append_struct_type_field(). A union
type has its size set to the largest field. A struct type has each
field packed against the previous. */
extern struct type *init_composite_type (char *name, enum type_code code);
extern void append_composite_type_field (struct type *t, char *name,
struct type *field);
extern struct type *lookup_reference_type (struct type *);
extern struct type *make_reference_type (struct type *, struct type **);