gdb: remove TYPE_NFIELDS macro

Remove `TYPE_NFIELDS`, changing all the call sites to use
`type::num_fields` 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_NFIELDS): Remove.  Change all cal sites to use
	type::num_fields instead.

Change-Id: Ib73be4c36f9e770e0f729bac3b5257d7cb2f9591
This commit is contained in:
Simon Marchi
2020-05-22 16:55:15 -04:00
parent 5e33d5f4e1
commit 1f704f761b
68 changed files with 322 additions and 318 deletions

View File

@@ -149,7 +149,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream,
}
fprintf_filtered (stream, "{");
len = TYPE_NFIELDS (type);
len = type->num_fields ();
n_baseclasses = TYPE_N_BASECLASSES (type);
/* First, print out baseclasses such that we don't print
@@ -638,7 +638,7 @@ cp_find_class_member (struct type **self_p, int *fieldno,
*self_p = check_typedef (*self_p);
self = *self_p;
len = TYPE_NFIELDS (self);
len = self->num_fields ();
for (i = TYPE_N_BASECLASSES (self); i < len; i++)
{