diff options
author | Tom Tromey <tom@tromey.com> | 2023-03-13 13:20:22 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-03-18 11:12:38 -0600 |
commit | 9e76b17aa5a62d866d9446bcc397e35748596193 (patch) | |
tree | 297925e36b11f64e126906d08e528e643544ea33 /gdb/coffread.c | |
parent | e727c536c6e7334484b8dcbf369fe425bd5b892a (diff) | |
download | binutils-9e76b17aa5a62d866d9446bcc397e35748596193.zip binutils-9e76b17aa5a62d866d9446bcc397e35748596193.tar.gz binutils-9e76b17aa5a62d866d9446bcc397e35748596193.tar.bz2 |
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/coffread.c')
-rw-r--r-- | gdb/coffread.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c index ef92ffd..be31144 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -1783,8 +1783,7 @@ decode_type (struct coff_symbol *cs, unsigned int c_type, type_allocator alloc (objfile); range_type = create_static_range_type (alloc, index_type, 0, n - 1); - type = - create_array_type (NULL, base_type, range_type); + type = create_array_type (alloc, base_type, range_type); } return type; } |