diff options
author | Tom Tromey <tom@tromey.com> | 2023-03-13 12:53:48 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-03-18 11:12:38 -0600 |
commit | e727c536c6e7334484b8dcbf369fe425bd5b892a (patch) | |
tree | e3a36d9571d8b5f0173d0c5c02c3712371ae00e0 /gdb/ctfread.c | |
parent | 9c794d2d46f0605ee033107418aac2ca20f659f8 (diff) | |
download | gdb-e727c536c6e7334484b8dcbf369fe425bd5b892a.zip gdb-e727c536c6e7334484b8dcbf369fe425bd5b892a.tar.gz gdb-e727c536c6e7334484b8dcbf369fe425bd5b892a.tar.bz2 |
Use type allocator for range types
This changes the range 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
underlying type of the range, which is what this patch implements.
Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/ctfread.c')
-rw-r--r-- | gdb/ctfread.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/ctfread.c b/gdb/ctfread.c index ea55719..3453800 100644 --- a/gdb/ctfread.c +++ b/gdb/ctfread.c @@ -831,7 +831,8 @@ read_array_type (struct ctf_context *ccp, ctf_id_t tid) if (idx_type == nullptr) idx_type = objfile_type (objfile)->builtin_int; - range_type = create_static_range_type (NULL, idx_type, 0, ar.ctr_nelems - 1); + 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); if (ar.ctr_nelems <= 1) /* Check if undefined upper bound. */ { |