aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-13 11:30:08 -0600
committerTom Tromey <tom@tromey.com>2023-03-18 11:12:38 -0600
commit77c5f49648cc39d9e4b1bd0411998ec42375654b (patch)
tree3408ebafaa9c105fddb231e71005171f4be8df26 /gdb/stabsread.c
parent46c04ea32f7f259432a68b002a13cdea86f9f902 (diff)
downloadgdb-77c5f49648cc39d9e4b1bd0411998ec42375654b.zip
gdb-77c5f49648cc39d9e4b1bd0411998ec42375654b.tar.gz
gdb-77c5f49648cc39d9e4b1bd0411998ec42375654b.tar.bz2
Unify arch_float_type and init_float_type
This unifies arch_float_type and init_float_type by using a type allocator. Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index fc02c98..7ed0ebf 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -374,7 +374,7 @@ dbx_init_float_type (struct objfile *objfile, int bits)
format = gdbarch_floatformat_for_type (gdbarch, NULL, bits);
type_allocator alloc (objfile);
if (format)
- type = init_float_type (objfile, bits, NULL, format);
+ type = init_float_type (alloc, bits, NULL, format);
else
type = alloc.new_type (TYPE_CODE_ERROR, bits, NULL);
@@ -2125,19 +2125,19 @@ rs6000_builtin_type (int typenum, struct objfile *objfile)
break;
case 12:
/* IEEE single precision (32 bit). */
- rettype = init_float_type (objfile, 32, "float",
+ rettype = init_float_type (alloc, 32, "float",
floatformats_ieee_single);
break;
case 13:
/* IEEE double precision (64 bit). */
- rettype = init_float_type (objfile, 64, "double",
+ rettype = init_float_type (alloc, 64, "double",
floatformats_ieee_double);
break;
case 14:
/* This is an IEEE double on the RS/6000, and different machines with
different sizes for "long double" should use different negative
type numbers. See stabs.texinfo. */
- rettype = init_float_type (objfile, 64, "long double",
+ rettype = init_float_type (alloc, 64, "long double",
floatformats_ieee_double);
break;
case 15:
@@ -2147,11 +2147,11 @@ rs6000_builtin_type (int typenum, struct objfile *objfile)
rettype = init_boolean_type (alloc, 32, 1, "boolean");
break;
case 17:
- rettype = init_float_type (objfile, 32, "short real",
+ rettype = init_float_type (alloc, 32, "short real",
floatformats_ieee_single);
break;
case 18:
- rettype = init_float_type (objfile, 64, "real",
+ rettype = init_float_type (alloc, 64, "real",
floatformats_ieee_double);
break;
case 19: