diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-14 13:46:38 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-14 13:46:38 -0400 |
commit | 7813437494ac39f3aef392d06ed5416e84fe386b (patch) | |
tree | 15290bf5b2bd9d23c59103a6a42b99adc0111d6d /gdb/gdbtypes.h | |
parent | 67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff) | |
download | binutils-gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.gz |
gdb: remove TYPE_CODE macro
Remove TYPE_CODE, changing all the call sites to use type::code
directly. This is quite a big diff, but this was mostly done using sed
and coccinelle. A few call sites were done by hand.
gdb/ChangeLog:
* gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
type::code instead.
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r-- | gdb/gdbtypes.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 9f4924e9404..a8cd44a75bf 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -335,7 +335,7 @@ DEF_ENUM_FLAGS_TYPE (enum type_instance_flag_value, type_instance_flags); /* * True if this type represents either an lvalue or lvalue reference type. */ #define TYPE_IS_REFERENCE(t) \ - (TYPE_CODE (t) == TYPE_CODE_REF || TYPE_CODE (t) == TYPE_CODE_RVALUE_REF) + ((t)->code () == TYPE_CODE_REF || (t)->code () == TYPE_CODE_RVALUE_REF) /* * True if this type is allocatable. */ #define TYPE_IS_ALLOCATABLE(t) \ @@ -1435,7 +1435,6 @@ extern unsigned type_align (struct type *); space in struct type. */ extern bool set_type_align (struct type *, ULONGEST); -#define TYPE_CODE(thistype) ((thistype)->code ()) #define TYPE_NFIELDS(thistype) TYPE_MAIN_TYPE(thistype)->nfields #define TYPE_FIELDS(thistype) TYPE_MAIN_TYPE(thistype)->flds_bnds.fields @@ -1681,8 +1680,8 @@ extern void set_type_vptr_basetype (struct type *, struct type *); TYPE_NESTED_TYPES_FIELD (thistype, n).is_private #define TYPE_IS_OPAQUE(thistype) \ - (((TYPE_CODE (thistype) == TYPE_CODE_STRUCT) \ - || (TYPE_CODE (thistype) == TYPE_CODE_UNION)) \ + ((((thistype)->code () == TYPE_CODE_STRUCT) \ + || ((thistype)->code () == TYPE_CODE_UNION)) \ && (TYPE_NFIELDS (thistype) == 0) \ && (!HAVE_CPLUS_STRUCT (thistype) \ || TYPE_NFN_FIELDS (thistype) == 0) \ |