{
struct type *target = TYPE_TARGET_TYPE (type);
struct type *real_target = TYPE_TARGET_TYPE (real_type);
{
struct type *target = TYPE_TARGET_TYPE (type);
struct type *real_target = TYPE_TARGET_TYPE (real_type);
- memcpy (TYPE_FIELDS (target),
- TYPE_FIELDS (real_target),
- field_size);
+ field *fields = (struct field *) TYPE_ALLOC (target, field_size);
+ memcpy (fields, real_target->fields (), field_size);
+ target->set_fields (fields);
- if (TYPE_NAME (target))
- xfree ((char*) TYPE_NAME (target));
- TYPE_NAME (target) = xstrdup (TYPE_NAME (real_target));
+ xfree ((char *) target->name ());
+ target->set_name (xstrdup (real_target->name ()));
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
/* If type has no name, give it one. */
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
/* If type has no name, give it one. */
/* Some compilers try to be helpful by inventing "fake"
names for anonymous enums, structures, and unions, like
"~0fake" or ".0fake". Thanks, but no thanks... */
/* Some compilers try to be helpful by inventing "fake"
names for anonymous enums, structures, and unions, like
"~0fake" or ".0fake". Thanks, but no thanks... */
if (sym->linkage_name () != NULL
&& *sym->linkage_name () != '~'
&& *sym->linkage_name () != '.')
if (sym->linkage_name () != NULL
&& *sym->linkage_name () != '~'
&& *sym->linkage_name () != '.')
/* Anonymous structure type. */
type = coff_alloc_type (cs->c_symnum);
type->set_code (TYPE_CODE_STRUCT);
/* Anonymous structure type. */
type = coff_alloc_type (cs->c_symnum);
type->set_code (TYPE_CODE_STRUCT);
/* Anonymous enum type. */
type = coff_alloc_type (cs->c_symnum);
type->set_code (TYPE_CODE_ENUM);
/* Anonymous enum type. */
type = coff_alloc_type (cs->c_symnum);
type->set_code (TYPE_CODE_ENUM);
- FIELD_TYPE (list->field) = decode_type (ms, ms->c_type,
- &sub_aux, objfile);
+ list->field.set_type (decode_type (ms, ms->c_type, &sub_aux,
+ objfile));
SET_FIELD_BITPOS (list->field, 8 * ms->c_value);
FIELD_BITSIZE (list->field) = 0;
nfields++;
SET_FIELD_BITPOS (list->field, 8 * ms->c_value);
FIELD_BITSIZE (list->field) = 0;
nfields++;
- FIELD_TYPE (list->field) = decode_type (ms, ms->c_type,
- &sub_aux, objfile);
+ list->field.set_type (decode_type (ms, ms->c_type, &sub_aux,
+ objfile));
SET_FIELD_BITPOS (list->field, ms->c_value);
FIELD_BITSIZE (list->field) = sub_aux.x_sym.x_misc.x_lnsz.x_size;
nfields++;
SET_FIELD_BITPOS (list->field, ms->c_value);
FIELD_BITSIZE (list->field) = sub_aux.x_sym.x_misc.x_lnsz.x_size;
nfields++;
- TYPE_NFIELDS (type) = nfields;
- TYPE_FIELDS (type) = (struct field *)
- TYPE_ALLOC (type, sizeof (struct field) * nfields);
+ type->set_num_fields (nfields);
+ type->set_fields
+ ((struct field *) TYPE_ALLOC (type, sizeof (struct field) * nfields));
name = obstack_strdup (&objfile->objfile_obstack, name);
sym->set_linkage_name (name);
name = obstack_strdup (&objfile->objfile_obstack, name);
sym->set_linkage_name (name);
- TYPE_NFIELDS (type) = nsyms;
- TYPE_FIELDS (type) = (struct field *)
- TYPE_ALLOC (type, sizeof (struct field) * nsyms);
+ type->set_num_fields (nsyms);
+ type->set_fields
+ ((struct field *) TYPE_ALLOC (type, sizeof (struct field) * nsyms));
/* Find the symbols for the values and put them into the type.
The symbols can be found in the symlist that we put them on
/* Find the symbols for the values and put them into the type.
The symbols can be found in the symlist that we put them on
SYMBOL_TYPE (xsym) = type;
TYPE_FIELD_NAME (type, n) = xsym->linkage_name ();
SYMBOL_TYPE (xsym) = type;
TYPE_FIELD_NAME (type, n) = xsym->linkage_name ();
if (SYMBOL_VALUE (xsym) < 0)
unsigned_enum = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;
if (SYMBOL_VALUE (xsym) < 0)
unsigned_enum = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;