summaryrefslogtreecommitdiff
path: root/gdb/f-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-13 13:20:22 -0600
committerTom Tromey <tom@tromey.com>2023-03-18 11:12:38 -0600
commit9e76b17aa5a62d866d9446bcc397e35748596193 (patch)
tree297925e36b11f64e126906d08e528e643544ea33 /gdb/f-exp.y
parente727c536c6e7334484b8dcbf369fe425bd5b892a (diff)
downloadbinutils-gdb-9e76b17aa5a62d866d9446bcc397e35748596193.tar.gz
Use type allocator for array types
This changes the array type creation functions to accept a type allocator, and updates all the callers. Note that symbol readers should generally allocate on the relevant objfile, regardless of the placement of the index type of the array, which is what this patch implements. Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/f-exp.y')
-rw-r--r--gdb/f-exp.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 9ff8e1988fc..0b4ee48ce01 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -675,9 +675,9 @@ ptype : typebase
range_type =
create_static_range_type (alloc, idx_type,
0, array_size - 1);
- follow_type =
- create_array_type ((struct type *) NULL,
- follow_type, range_type);
+ follow_type = create_array_type (alloc,
+ follow_type,
+ range_type);
}
else
follow_type = lookup_pointer_type (follow_type);