aboutsummaryrefslogtreecommitdiff
path: root/gdb/d-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/d-lang.c
parent333859402c7968dc718dae73ca0fbddbe096fc51 (diff)
downloadbinutils-2d39ccd3d1773b26ed8178bcd77375175c48ee62.zip
binutils-2d39ccd3d1773b26ed8178bcd77375175c48ee62.tar.gz
binutils-2d39ccd3d1773b26ed8178bcd77375175c48ee62.tar.bz2
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/d-lang.c')
-rw-r--r--gdb/d-lang.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/gdb/d-lang.c b/gdb/d-lang.c
index 457e367..af9a81d 100644
--- a/gdb/d-lang.c
+++ b/gdb/d-lang.c
@@ -201,29 +201,30 @@ build_d_types (struct gdbarch *gdbarch)
struct builtin_d_type *builtin_d_type = new struct builtin_d_type;
/* Basic types. */
+ type_allocator alloc (gdbarch);
builtin_d_type->builtin_void = builtin_type (gdbarch)->builtin_void;
builtin_d_type->builtin_bool
= arch_boolean_type (gdbarch, 8, 1, "bool");
builtin_d_type->builtin_byte
- = arch_integer_type (gdbarch, 8, 0, "byte");
+ = init_integer_type (alloc, 8, 0, "byte");
builtin_d_type->builtin_ubyte
- = arch_integer_type (gdbarch, 8, 1, "ubyte");
+ = init_integer_type (alloc, 8, 1, "ubyte");
builtin_d_type->builtin_short
- = arch_integer_type (gdbarch, 16, 0, "short");
+ = init_integer_type (alloc, 16, 0, "short");
builtin_d_type->builtin_ushort
- = arch_integer_type (gdbarch, 16, 1, "ushort");
+ = init_integer_type (alloc, 16, 1, "ushort");
builtin_d_type->builtin_int
- = arch_integer_type (gdbarch, 32, 0, "int");
+ = init_integer_type (alloc, 32, 0, "int");
builtin_d_type->builtin_uint
- = arch_integer_type (gdbarch, 32, 1, "uint");
+ = init_integer_type (alloc, 32, 1, "uint");
builtin_d_type->builtin_long
- = arch_integer_type (gdbarch, 64, 0, "long");
+ = init_integer_type (alloc, 64, 0, "long");
builtin_d_type->builtin_ulong
- = arch_integer_type (gdbarch, 64, 1, "ulong");
+ = init_integer_type (alloc, 64, 1, "ulong");
builtin_d_type->builtin_cent
- = arch_integer_type (gdbarch, 128, 0, "cent");
+ = init_integer_type (alloc, 128, 0, "cent");
builtin_d_type->builtin_ucent
- = arch_integer_type (gdbarch, 128, 1, "ucent");
+ = init_integer_type (alloc, 128, 1, "ucent");
builtin_d_type->builtin_float
= arch_float_type (gdbarch, gdbarch_float_bit (gdbarch),
"float", gdbarch_float_format (gdbarch));