mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 15:15:42 +00:00
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>
This commit is contained in:
@@ -833,7 +833,7 @@ read_array_type (struct ctf_context *ccp, ctf_id_t tid)
|
||||
|
||||
type_allocator alloc (objfile);
|
||||
range_type = create_static_range_type (alloc, idx_type, 0, ar.ctr_nelems - 1);
|
||||
type = create_array_type (NULL, element_type, range_type);
|
||||
type = create_array_type (alloc, element_type, range_type);
|
||||
if (ar.ctr_nelems <= 1) /* Check if undefined upper bound. */
|
||||
{
|
||||
range_type->bounds ()->high.set_undefined ();
|
||||
|
||||
Reference in New Issue
Block a user