Unify arch_float_type and init_float_type

This unifies arch_float_type and init_float_type by using a type
allocator.

Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-03-13 11:30:08 -06:00
parent 46c04ea32f
commit 77c5f49648
21 changed files with 97 additions and 95 deletions

View File

@ -375,7 +375,7 @@ ctf_init_float_type (struct objfile *objfile,
type_allocator alloc (objfile);
format = gdbarch_floatformat_for_type (gdbarch, name_hint, bits);
if (format != nullptr)
type = init_float_type (objfile, bits, name, format);
type = init_float_type (alloc, bits, name, format);
else
type = alloc.new_type (TYPE_CODE_ERROR, bits, name);