forked from Imagelibrary/binutils-gdb
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>
This commit is contained in:
@@ -1780,8 +1780,9 @@ decode_type (struct coff_symbol *cs, unsigned int c_type,
|
||||
|
||||
base_type = decode_type (cs, new_c_type, aux, objfile);
|
||||
index_type = objfile_type (objfile)->builtin_int;
|
||||
type_allocator alloc (objfile);
|
||||
range_type
|
||||
= create_static_range_type (NULL, index_type, 0, n - 1);
|
||||
= create_static_range_type (alloc, index_type, 0, n - 1);
|
||||
type =
|
||||
create_array_type (NULL, base_type, range_type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user