From 2d39ccd3d1773b26ed8178bcd77375175c48ee62 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 13 Mar 2023 10:31:06 -0600 Subject: Unify arch_integer_type and init_integer_type This unifies arch_integer_type and init_integer_type by using a type allocator. Reviewed-By: Simon Marchi --- gdb/m2-lang.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/m2-lang.c') diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c index 72d0b58d675..218867d408e 100644 --- a/gdb/m2-lang.c +++ b/gdb/m2-lang.c @@ -281,11 +281,13 @@ build_m2_types (struct gdbarch *gdbarch) { struct builtin_m2_type *builtin_m2_type = new struct builtin_m2_type; + type_allocator alloc (gdbarch); + /* Modula-2 "pervasive" types. NOTE: these can be redefined!!! */ builtin_m2_type->builtin_int - = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch), 0, "INTEGER"); + = init_integer_type (alloc, gdbarch_int_bit (gdbarch), 0, "INTEGER"); builtin_m2_type->builtin_card - = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch), 1, "CARDINAL"); + = init_integer_type (alloc, gdbarch_int_bit (gdbarch), 1, "CARDINAL"); builtin_m2_type->builtin_real = arch_float_type (gdbarch, gdbarch_float_bit (gdbarch), "REAL", gdbarch_float_format (gdbarch)); -- cgit v1.2.1