Unify arch_character_type and init_character_type

This unifies arch_character_type and init_character_type by using a
type allocator.

Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-03-13 10:57:56 -06:00
parent 2d39ccd3d1
commit f50b437c3d
10 changed files with 28 additions and 44 deletions

View File

@@ -566,7 +566,7 @@ read_base_type (struct ctf_context *ccp, ctf_id_t tid)
ischar = cet.cte_format & CTF_INT_CHAR;
isbool = cet.cte_format & CTF_INT_BOOL;
if (ischar)
type = init_character_type (of, TARGET_CHAR_BIT, !issigned, name);
type = init_character_type (alloc, TARGET_CHAR_BIT, !issigned, name);
else if (isbool)
type = init_boolean_type (of, gdbarch_int_bit (gdbarch),
!issigned, name);