gdb: remove TYPE_FIELD_NAME and FIELD_NAME macros

Remove the `TYPE_FIELD_NAME` and `FIELD_NAME` macros, changing all the
call sites to use field::name directly.

Change-Id: I6900ae4e1ffab1396e24fb3298e94bf123826ca6
This commit is contained in:
Simon Marchi
2021-08-30 11:49:49 -04:00
parent d3fd12dfc5
commit 33d16dd987
34 changed files with 155 additions and 158 deletions

View File

@ -1973,7 +1973,7 @@ check_field (struct type *type, const char *name,
for (i = type->num_fields () - 1; i >= TYPE_N_BASECLASSES (type); i--)
{
const char *t_field_name = TYPE_FIELD_NAME (type, i);
const char *t_field_name = type->field (i).name ();
if (t_field_name && (strcmp_iw (t_field_name, name) == 0))
{
@ -5609,9 +5609,9 @@ completion_list_add_fields (completion_tracker &tracker,
if (c == TYPE_CODE_UNION || c == TYPE_CODE_STRUCT)
for (j = TYPE_N_BASECLASSES (t); j < t->num_fields (); j++)
if (TYPE_FIELD_NAME (t, j))
if (t->field (j).name ())
completion_list_add_name (tracker, sym->language (),
TYPE_FIELD_NAME (t, j),
t->field (j).name (),
lookup_name, text, word);
}
}