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/frv-tdep.c | |
parent | 67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff) | |
download | gdb-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/frv-tdep.c')
-rw-r--r-- | gdb/frv-tdep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index ae383e7..fd76e52 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -1240,7 +1240,7 @@ frv_push_dummy_call (struct gdbarch *gdbarch, struct value *function, arg = args[argnum]; arg_type = check_typedef (value_type (arg)); len = TYPE_LENGTH (arg_type); - typecode = TYPE_CODE (arg_type); + typecode = arg_type->code (); if (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION) { @@ -1253,7 +1253,7 @@ frv_push_dummy_call (struct gdbarch *gdbarch, struct value *function, else if (abi == FRV_ABI_FDPIC && len == 4 && typecode == TYPE_CODE_PTR - && TYPE_CODE (TYPE_TARGET_TYPE (arg_type)) == TYPE_CODE_FUNC) + && TYPE_TARGET_TYPE (arg_type)->code () == TYPE_CODE_FUNC) { /* The FDPIC ABI requires function descriptors to be passed instead of entry points. */ @@ -1345,9 +1345,9 @@ frv_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) { - int struct_return = TYPE_CODE (valtype) == TYPE_CODE_STRUCT - || TYPE_CODE (valtype) == TYPE_CODE_UNION - || TYPE_CODE (valtype) == TYPE_CODE_ARRAY; + int struct_return = valtype->code () == TYPE_CODE_STRUCT + || valtype->code () == TYPE_CODE_UNION + || valtype->code () == TYPE_CODE_ARRAY; if (writebuf != NULL) { |