aboutsummaryrefslogtreecommitdiff
path: root/gdb/msp430-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/msp430-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/msp430-tdep.c')
-rw-r--r--gdb/msp430-tdep.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c
index 8859766..9119b5f 100644
--- a/gdb/msp430-tdep.c
+++ b/gdb/msp430-tdep.c
@@ -570,8 +570,8 @@ msp430_return_value (struct gdbarch *gdbarch,
int code_model = gdbarch_tdep (gdbarch)->code_model;
if (TYPE_LENGTH (valtype) > 8
- || TYPE_CODE (valtype) == TYPE_CODE_STRUCT
- || TYPE_CODE (valtype) == TYPE_CODE_UNION)
+ || valtype->code () == TYPE_CODE_STRUCT
+ || valtype->code () == TYPE_CODE_UNION)
return RETURN_VALUE_STRUCT_CONVENTION;
if (readbuf)
@@ -585,7 +585,7 @@ msp430_return_value (struct gdbarch *gdbarch,
int size = 2;
if (code_model == MSP_LARGE_CODE_MODEL
- && TYPE_CODE (valtype) == TYPE_CODE_PTR)
+ && valtype->code () == TYPE_CODE_PTR)
{
size = 4;
}
@@ -609,7 +609,7 @@ msp430_return_value (struct gdbarch *gdbarch,
int size = 2;
if (code_model == MSP_LARGE_CODE_MODEL
- && TYPE_CODE (valtype) == TYPE_CODE_PTR)
+ && valtype->code () == TYPE_CODE_PTR)
{
size = 4;
}
@@ -652,12 +652,12 @@ msp430_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);
/* We make two passes; the first does the stack allocation,
the second actually stores the arguments. */
@@ -691,8 +691,8 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
current_arg_on_stack = 0;
- if (TYPE_CODE (arg_type) == TYPE_CODE_STRUCT
- || TYPE_CODE (arg_type) == TYPE_CODE_UNION)
+ if (arg_type->code () == TYPE_CODE_STRUCT
+ || arg_type->code () == TYPE_CODE_UNION)
{
/* Aggregates of any size are passed by reference. */
store_unsigned_integer (struct_addr_buf, 4, byte_order,
@@ -723,10 +723,10 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
int size = 2;
if (code_model == MSP_LARGE_CODE_MODEL
- && (TYPE_CODE (arg_type) == TYPE_CODE_PTR
+ && (arg_type->code () == TYPE_CODE_PTR
|| TYPE_IS_REFERENCE (arg_type)
- || TYPE_CODE (arg_type) == TYPE_CODE_STRUCT
- || TYPE_CODE (arg_type) == TYPE_CODE_UNION))
+ || arg_type->code () == TYPE_CODE_STRUCT
+ || arg_type->code () == TYPE_CODE_UNION))
{
/* When using the large memory model, pointer,
reference, struct, and union arguments are