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.
This commit is contained in:
Simon Marchi
2020-05-14 13:46:38 -04:00
parent 67607e24d0
commit 7813437494
145 changed files with 1744 additions and 1746 deletions

View File

@ -48,7 +48,7 @@ static int amd64_windows_dummy_call_integer_regs[] =
static int
amd64_windows_passed_by_integer_register (struct type *type)
{
switch (TYPE_CODE (type))
switch (type->code ())
{
case TYPE_CODE_INT:
case TYPE_CODE_ENUM:
@ -76,8 +76,8 @@ amd64_windows_passed_by_integer_register (struct type *type)
static int
amd64_windows_passed_by_xmm_register (struct type *type)
{
return ((TYPE_CODE (type) == TYPE_CODE_FLT
|| TYPE_CODE (type) == TYPE_CODE_DECFLOAT)
return ((type->code () == TYPE_CODE_FLT
|| type->code () == TYPE_CODE_DECFLOAT)
&& (TYPE_LENGTH (type) == 4 || TYPE_LENGTH (type) == 8));
}
@ -296,7 +296,7 @@ amd64_windows_return_value (struct gdbarch *gdbarch, struct value *function,
/* See if our value is returned through a register. If it is, then
store the associated register number in REGNUM. */
switch (TYPE_CODE (type))
switch (type->code ())
{
case TYPE_CODE_FLT:
case TYPE_CODE_DECFLOAT: