forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user