gdb: remove FIELD_TYPE macro

Remove the `FIELD_TYPE` macro, changing all the call sites to use
`field::type` directly.

gdb/ChangeLog:

	* gdbtypes.h (FIELD_TYPE): Remove.  Change all call sites
	to use field::type instead.

Change-Id: I7673fedaa276e485189c87991a9043495da22ef5
This commit is contained in:
Simon Marchi
2020-06-08 15:26:06 -04:00
parent 5d14b6e5d6
commit b6cdac4b80
8 changed files with 21 additions and 18 deletions

View File

@ -1802,7 +1802,7 @@ lookup_struct_elt_type (struct type *type, const char *name, int noerr)
{
struct_elt elt = lookup_struct_elt (type, name, noerr);
if (elt.field != NULL)
return FIELD_TYPE (*elt.field);
return elt.field->type ();
else
return NULL;
}
@ -4085,7 +4085,7 @@ check_types_equal (struct type *type1, struct type *type2,
FIELD_LOC_KIND (*field1));
}
worklist->emplace_back (FIELD_TYPE (*field1), FIELD_TYPE (*field2));
worklist->emplace_back (field1->type (), field2->type ());
}
}
@ -5673,7 +5673,7 @@ append_composite_type_field_aligned (struct type *t, const char *name,
{
SET_FIELD_BITPOS (f[0],
(FIELD_BITPOS (f[-1])
+ (TYPE_LENGTH (FIELD_TYPE (f[-1]))
+ (TYPE_LENGTH (f[-1].type ())
* TARGET_CHAR_BIT)));
if (alignment)