const struct floatformat **format;
struct type *type;
+ type_allocator alloc (objfile);
format = gdbarch_floatformat_for_type (gdbarch, name_hint, bits);
if (format != nullptr)
type = init_float_type (objfile, bits, name, format);
else
- type = init_type (objfile, TYPE_CODE_ERROR, bits, name);
+ type = alloc.new_type (TYPE_CODE_ERROR, bits, name);
return type;
}
ctf_errmsg (ctf_errno (fp)));
}
+ type_allocator alloc (of);
kind = ctf_type_kind (fp, tid);
if (kind == CTF_K_INTEGER)
{
else
{
complaint (_("read_base_type: unsupported base kind (%d)"), kind);
- type = init_type (of, TYPE_CODE_ERROR, cet.cte_bits, name);
+ type = alloc.new_type (TYPE_CODE_ERROR, cet.cte_bits, name);
}
if (name != nullptr && strcmp (name, "char") == 0)
struct type *this_type, *target_type;
char *aname = obstack_strdup (&objfile->objfile_obstack, name);
- this_type = init_type (objfile, TYPE_CODE_TYPEDEF, 0, aname);
+ this_type = type_allocator (objfile).new_type (TYPE_CODE_TYPEDEF, 0, aname);
set_tid_type (objfile, tid, this_type);
target_type = fetch_tid_type (ccp, btid);
if (target_type != this_type)