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/rx-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/rx-tdep.c')
-rw-r--r-- | gdb/rx-tdep.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c index c14ce20..9963bc3 100644 --- a/gdb/rx-tdep.c +++ b/gdb/rx-tdep.c @@ -668,12 +668,12 @@ rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct type *func_type = value_type (function); /* Dereference function pointer types. */ - while (TYPE_CODE (func_type) == TYPE_CODE_PTR) + while (func_type->code () == TYPE_CODE_PTR) func_type = TYPE_TARGET_TYPE (func_type); /* The end result had better be a function or a method. */ - gdb_assert (TYPE_CODE (func_type) == TYPE_CODE_FUNC - || TYPE_CODE (func_type) == TYPE_CODE_METHOD); + gdb_assert (func_type->code () == TYPE_CODE_FUNC + || func_type->code () == TYPE_CODE_METHOD); /* Functions with a variable number of arguments have all of their variable arguments and the last non-variable argument passed @@ -706,8 +706,8 @@ rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function, { struct type *return_type = TYPE_TARGET_TYPE (func_type); - gdb_assert (TYPE_CODE (return_type) == TYPE_CODE_STRUCT - || TYPE_CODE (func_type) == TYPE_CODE_UNION); + gdb_assert (return_type->code () == TYPE_CODE_STRUCT + || func_type->code () == TYPE_CODE_UNION); if (TYPE_LENGTH (return_type) > 16 || TYPE_LENGTH (return_type) % 4 != 0) @@ -728,7 +728,7 @@ rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (i == 0 && struct_addr != 0 && return_method != return_method_struct - && TYPE_CODE (arg_type) == TYPE_CODE_PTR + && arg_type->code () == TYPE_CODE_PTR && extract_unsigned_integer (arg_bits, 4, byte_order) == struct_addr) { @@ -739,8 +739,8 @@ rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function, regcache_cooked_write_unsigned (regcache, RX_R15_REGNUM, struct_addr); } - else if (TYPE_CODE (arg_type) != TYPE_CODE_STRUCT - && TYPE_CODE (arg_type) != TYPE_CODE_UNION + else if (arg_type->code () != TYPE_CODE_STRUCT + && arg_type->code () != TYPE_CODE_UNION && arg_size <= 8) { /* Argument is a scalar. */ @@ -874,8 +874,8 @@ rx_return_value (struct gdbarch *gdbarch, ULONGEST valtype_len = TYPE_LENGTH (valtype); if (TYPE_LENGTH (valtype) > 16 - || ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT - || TYPE_CODE (valtype) == TYPE_CODE_UNION) + || ((valtype->code () == TYPE_CODE_STRUCT + || valtype->code () == TYPE_CODE_UNION) && TYPE_LENGTH (valtype) % 4 != 0)) return RETURN_VALUE_STRUCT_CONVENTION; |