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:
parent
e727c536c6
commit
9e76b17aa5
11 changed files with 82 additions and 82 deletions
|
@ -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 ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue