aboutsummaryrefslogtreecommitdiff
path: root/gdb/s390-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-14 13:46:38 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-14 13:46:38 -0400
commit7813437494ac39f3aef392d06ed5416e84fe386b (patch)
tree15290bf5b2bd9d23c59103a6a42b99adc0111d6d /gdb/s390-tdep.c
parent67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff)
downloadfsf-binutils-gdb-7813437494ac39f3aef392d06ed5416e84fe386b.zip
fsf-binutils-gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.gz
fsf-binutils-gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.bz2
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/s390-tdep.c')
-rw-r--r--gdb/s390-tdep.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index d8c28c7..e94bf59 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -63,7 +63,7 @@ s390_type_align (gdbarch *gdbarch, struct type *t)
if (TYPE_LENGTH (t) > 8)
{
- switch (TYPE_CODE (t))
+ switch (t->code ())
{
case TYPE_CODE_INT:
case TYPE_CODE_RANGE:
@@ -1638,7 +1638,7 @@ s390_address_class_name_to_type_flags (struct gdbarch *gdbarch,
static struct type *
s390_effective_inner_type (struct type *type, unsigned int min_size)
{
- while (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+ while (type->code () == TYPE_CODE_STRUCT)
{
struct type *inner = NULL;
@@ -1681,8 +1681,8 @@ s390_function_arg_float (struct type *type)
or double. */
type = s390_effective_inner_type (type, 0);
- return (TYPE_CODE (type) == TYPE_CODE_FLT
- || TYPE_CODE (type) == TYPE_CODE_DECFLOAT);
+ return (type->code () == TYPE_CODE_FLT
+ || type->code () == TYPE_CODE_DECFLOAT);
}
/* Return non-zero if TYPE should be passed like a vector. */
@@ -1696,7 +1696,7 @@ s390_function_arg_vector (struct type *type)
/* Structs containing just a vector are passed like a vector. */
type = s390_effective_inner_type (type, TYPE_LENGTH (type));
- return TYPE_CODE (type) == TYPE_CODE_ARRAY && TYPE_VECTOR (type);
+ return type->code () == TYPE_CODE_ARRAY && TYPE_VECTOR (type);
}
/* Determine whether N is a power of two. */
@@ -1714,7 +1714,7 @@ is_power_of_two (unsigned int n)
static int
s390_function_arg_integer (struct type *type)
{
- enum type_code code = TYPE_CODE (type);
+ enum type_code code = type->code ();
if (TYPE_LENGTH (type) > 8)
return 0;
@@ -1921,7 +1921,7 @@ s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
CORE_ADDR param_area_start, new_sp;
struct type *ftype = check_typedef (value_type (function));
- if (TYPE_CODE (ftype) == TYPE_CODE_PTR)
+ if (ftype->code () == TYPE_CODE_PTR)
ftype = check_typedef (TYPE_TARGET_TYPE (ftype));
arg_prep.copy = sp;
@@ -2021,7 +2021,7 @@ s390_register_return_value (struct gdbarch *gdbarch, struct type *type,
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
int length = TYPE_LENGTH (type);
- int code = TYPE_CODE (type);
+ int code = type->code ();
if (code == TYPE_CODE_FLT || code == TYPE_CODE_DECFLOAT)
{
@@ -2083,7 +2083,7 @@ s390_return_value (struct gdbarch *gdbarch, struct value *function,
type = check_typedef (type);
- switch (TYPE_CODE (type))
+ switch (type->code ())
{
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION: