summaryrefslogtreecommitdiff
path: root/gdb/m2-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-13 10:31:06 -0600
committerTom Tromey <tom@tromey.com>2023-03-18 11:12:37 -0600
commit2d39ccd3d1773b26ed8178bcd77375175c48ee62 (patch)
treee4634ee4c847ad5e71d092188c6f38ab21ae2444 /gdb/m2-lang.c
parent333859402c7968dc718dae73ca0fbddbe096fc51 (diff)
downloadbinutils-gdb-2d39ccd3d1773b26ed8178bcd77375175c48ee62.tar.gz
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 <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/m2-lang.c')
-rw-r--r--gdb/m2-lang.c6
1 files changed, 4 insertions, 2 deletions
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));