forked from Imagelibrary/binutils-gdb
gdb: add type::length / type::set_length
Add the `length` and `set_length` methods on `struct type`, in order to remove the `TYPE_LENGTH` macro. In this patch, the macro is changed to use the getter, so all the call sites of the macro that are used as a setter are changed to use the setter method directly. The next patch will remove the macro completely. Change-Id: Id1090244f15c9856969b9be5006aefe8d8897ca4
This commit is contained in:
@@ -91,10 +91,8 @@ f77_get_dynamic_length_of_aggregate (struct type *type)
|
||||
upper_bound = f77_get_upperbound (type);
|
||||
|
||||
/* Patch in a valid length value. */
|
||||
|
||||
TYPE_LENGTH (type) =
|
||||
(upper_bound - lower_bound + 1)
|
||||
* TYPE_LENGTH (check_typedef (type->target_type ()));
|
||||
type->set_length ((upper_bound - lower_bound + 1)
|
||||
* TYPE_LENGTH (check_typedef (type->target_type ())));
|
||||
}
|
||||
|
||||
/* Per-dimension statistics. */
|
||||
|
||||
Reference in New Issue
Block a user