diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-09-21 11:05:21 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-09-21 11:05:21 -0400 |
commit | df86565b31bf12aab6fdceade49169bc6f378b13 (patch) | |
tree | 76d5944661919552ce4ea01ac49188e151d72fa7 /gdb/gdbtypes.h | |
parent | b6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02 (diff) | |
download | fsf-binutils-gdb-df86565b31bf12aab6fdceade49169bc6f378b13.zip fsf-binutils-gdb-df86565b31bf12aab6fdceade49169bc6f378b13.tar.gz fsf-binutils-gdb-df86565b31bf12aab6fdceade49169bc6f378b13.tar.bz2 |
gdb: remove TYPE_LENGTH
Remove the macro, replace all uses with calls to type::length.
Change-Id: Ib9bdc954576860b21190886534c99103d6a47afb
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r-- | gdb/gdbtypes.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 6d12a48..94d4b66 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -1045,6 +1045,10 @@ struct type this->main_type->name = name; } + /* Note that if thistype is a TYPEDEF type, you have to call check_typedef. + But check_typedef does set the TYPE_LENGTH of the TYPEDEF type, + so you only have to call check_typedef once. Since allocate_value + calls check_typedef, VALUE_TYPE (X)->length () is safe. */ ULONGEST length () const { return this->m_length; @@ -2111,11 +2115,6 @@ extern void allocate_gnat_aux_type (struct type *); #define TYPE_REFERENCE_TYPE(thistype) (thistype)->reference_type #define TYPE_RVALUE_REFERENCE_TYPE(thistype) (thistype)->rvalue_reference_type #define TYPE_CHAIN(thistype) (thistype)->chain -/* * Note that if thistype is a TYPEDEF type, you have to call check_typedef. - But check_typedef does set the TYPE_LENGTH of the TYPEDEF type, - so you only have to call check_typedef once. Since allocate_value - calls check_typedef, TYPE_LENGTH (VALUE_TYPE (X)) is safe. */ -#define TYPE_LENGTH(thistype) ((thistype)->length ()) /* * Return the alignment of the type in target addressable memory units, or 0 if no alignment was specified. */ |