set_type_code (type, code);
gdb_assert ((bit % TARGET_CHAR_BIT) == 0);
TYPE_LENGTH (type) = bit / TARGET_CHAR_BIT;
- TYPE_NAME (type) = name;
+ type->set_name (name);
return type;
}
t = alloc_type_copy (target_type);
set_type_code (t, TYPE_CODE_COMPLEX);
TYPE_LENGTH (t) = 2 * TYPE_LENGTH (target_type);
- TYPE_NAME (t) = name;
+ t->set_name (name);
TYPE_TARGET_TYPE (t) = target_type;
TYPE_MAIN_TYPE (target_type)->flds_bnds.complex_type = t;
TYPE_OWNER (new_type).gdbarch = get_type_arch (type);
if (TYPE_NAME (type))
- TYPE_NAME (new_type) = xstrdup (TYPE_NAME (type));
+ new_type->set_name (xstrdup (TYPE_NAME (type)));
TYPE_INSTANCE_FLAGS (new_type) = TYPE_INSTANCE_FLAGS (type);
TYPE_LENGTH (new_type) = TYPE_LENGTH (type);
TYPE_LENGTH (type) = bit / TARGET_CHAR_BIT;
if (name)
- TYPE_NAME (type) = gdbarch_obstack_strdup (gdbarch, name);
+ type->set_name (gdbarch_obstack_strdup (gdbarch, name));
return type;
}
gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION);
t = arch_type (gdbarch, code, 0, NULL);
- TYPE_NAME (t) = name;
+ t->set_name (name);
INIT_CPLUS_SPECIFIC (t);
return t;
}