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/xtensa-tdep.c | |
parent | 67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff) | |
download | fsf-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/xtensa-tdep.c')
-rw-r--r-- | gdb/xtensa-tdep.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index 2ea1121..97486de 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -1651,9 +1651,9 @@ xtensa_return_value (struct gdbarch *gdbarch, { /* Structures up to 16 bytes are returned in registers. */ - 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) && TYPE_LENGTH (valtype) > 16); if (struct_return) @@ -1726,7 +1726,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, fprintf_unfiltered (gdb_stdlog, "%2d: %s %3s ", i, host_address_to_string (arg), pulongest (TYPE_LENGTH (arg_type))); - switch (TYPE_CODE (arg_type)) + switch (arg_type->code ()) { case TYPE_CODE_INT: fprintf_unfiltered (gdb_stdlog, "int"); @@ -1735,7 +1735,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, fprintf_unfiltered (gdb_stdlog, "struct"); break; default: - fprintf_unfiltered (gdb_stdlog, "%3d", TYPE_CODE (arg_type)); + fprintf_unfiltered (gdb_stdlog, "%3d", arg_type->code ()); break; } fprintf_unfiltered (gdb_stdlog, " %s\n", @@ -1760,7 +1760,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, struct value *arg = args[i]; struct type *arg_type = check_typedef (value_type (arg)); - switch (TYPE_CODE (arg_type)) + switch (arg_type->code ()) { case TYPE_CODE_INT: case TYPE_CODE_BOOL: |