Unify arch_pointer_type and init_pointer_type

This unifies arch_pointer_type and init_pointer_type by using a type
allocator.

Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-03-13 12:25:27 -06:00
parent 0776344a33
commit 9c794d2d46
10 changed files with 33 additions and 48 deletions

View File

@@ -576,7 +576,7 @@ ft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
type_allocator alloc (gdbarch);
void_type = alloc.new_type (TYPE_CODE_VOID, TARGET_CHAR_BIT, "void");
func_void_type = make_function_type (void_type, NULL);
tdep->pc_type = arch_pointer_type (gdbarch, 4 * TARGET_CHAR_BIT, NULL,
tdep->pc_type = init_pointer_type (alloc, 4 * TARGET_CHAR_BIT, NULL,
func_void_type);
tdep->pc_type->set_instance_flags (tdep->pc_type->instance_flags ()
| TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1);