aboutsummaryrefslogtreecommitdiff
path: root/gdb/or1k-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/or1k-tdep.c
parent67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff)
downloadgdb-7813437494ac39f3aef392d06ed5416e84fe386b.zip
gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.gz
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/or1k-tdep.c')
-rw-r--r--gdb/or1k-tdep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c
index 61901a7..37fb90c 100644
--- a/gdb/or1k-tdep.c
+++ b/gdb/or1k-tdep.c
@@ -245,7 +245,7 @@ or1k_return_value (struct gdbarch *gdbarch, struct value *functype,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- enum type_code rv_type = TYPE_CODE (valtype);
+ enum type_code rv_type = valtype->code ();
unsigned int rv_size = TYPE_LENGTH (valtype);
int bpw = (gdbarch_tdep (gdbarch))->bytes_per_word;
@@ -633,7 +633,7 @@ or1k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct value *arg = args[argnum];
struct type *arg_type = check_typedef (value_type (arg));
int len = TYPE_LENGTH (arg_type);
- enum type_code typecode = TYPE_CODE (arg_type);
+ enum type_code typecode = arg_type->code ();
if (TYPE_VARARGS (func_type) && argnum >= TYPE_NFIELDS (func_type))
break; /* end or regular args, varargs go to stack. */
@@ -723,7 +723,7 @@ or1k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct value *arg = args[argnum];
struct type *arg_type = check_typedef (value_type (arg));
int len = TYPE_LENGTH (arg_type);
- enum type_code typecode = TYPE_CODE (arg_type);
+ enum type_code typecode = arg_type->code ();
if ((TYPE_CODE_STRUCT == typecode) || (TYPE_CODE_UNION == typecode)
|| (len > bpw * 2))
@@ -755,7 +755,7 @@ or1k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct value *arg = args[argnum];
struct type *arg_type = check_typedef (value_type (arg));
int len = TYPE_LENGTH (arg_type);
- enum type_code typecode = TYPE_CODE (arg_type);
+ enum type_code typecode = arg_type->code ();
/* The EABI passes structures that do not fit in a register by
reference. In all other cases, pass the structure by value. */
if ((TYPE_CODE_STRUCT == typecode) || (TYPE_CODE_UNION == typecode)