aboutsummaryrefslogtreecommitdiff
path: root/gdb/m32c-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/m32c-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/m32c-tdep.c')
-rw-r--r--gdb/m32c-tdep.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 585fa33..a49937a 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -1986,7 +1986,7 @@ static const struct frame_unwind m32c_unwind = {
static int
m32c_reg_arg_type (struct type *type)
{
- enum type_code code = TYPE_CODE (type);
+ enum type_code code = type->code ();
return (code == TYPE_CODE_INT
|| code == TYPE_CODE_ENUM
@@ -2021,11 +2021,11 @@ m32c_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct type *func_type = value_type (function);
/* Dereference function pointer types. */
- if (TYPE_CODE (func_type) == TYPE_CODE_PTR)
+ if (func_type->code () == TYPE_CODE_PTR)
func_type = TYPE_TARGET_TYPE (func_type);
- 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);
#if 0
/* The ABI description in gcc/config/m32c/m32c.abi says that
@@ -2153,7 +2153,7 @@ m32c_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
static int
m32c_return_by_passed_buf (struct type *type)
{
- enum type_code code = TYPE_CODE (type);
+ enum type_code code = type->code ();
return (code == TYPE_CODE_STRUCT
|| code == TYPE_CODE_UNION);
@@ -2399,9 +2399,9 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
enum type_code target_code;
- gdb_assert (TYPE_CODE (type) == TYPE_CODE_PTR || TYPE_IS_REFERENCE (type));
+ gdb_assert (type->code () == TYPE_CODE_PTR || TYPE_IS_REFERENCE (type));
- target_code = TYPE_CODE (TYPE_TARGET_TYPE (type));
+ target_code = TYPE_TARGET_TYPE (type)->code ();
if (target_code == TYPE_CODE_FUNC || target_code == TYPE_CODE_METHOD)
{
@@ -2478,11 +2478,11 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
CORE_ADDR ptr;
enum type_code target_code;
- gdb_assert (TYPE_CODE (type) == TYPE_CODE_PTR || TYPE_IS_REFERENCE (type));
+ gdb_assert (type->code () == TYPE_CODE_PTR || TYPE_IS_REFERENCE (type));
ptr = extract_unsigned_integer (buf, TYPE_LENGTH (type), byte_order);
- target_code = TYPE_CODE (TYPE_TARGET_TYPE (type));
+ target_code = TYPE_TARGET_TYPE (type)->code ();
if (target_code == TYPE_CODE_FUNC || target_code == TYPE_CODE_METHOD)
{