gdb: remove TYPE_FIELD_ARTIFICIAL

Replace with type::field + field::is_artificial.

Change-Id: Ie3bacae49d9bd02e83e504c1ce01470aba56a081
Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
Simon Marchi
2023-08-31 11:46:24 -04:00
committed by Simon Marchi
parent 6c0f749351
commit 454977cdc4
11 changed files with 19 additions and 20 deletions

View File

@@ -93,7 +93,7 @@ rust_enum_variant (struct type *type)
{
/* The active variant is simply the first non-artificial field. */
for (int i = 0; i < type->num_fields (); ++i)
if (!TYPE_FIELD_ARTIFICIAL (type, i))
if (!type->field (i).is_artificial ())
return i;
/* Perhaps we could get here by trying to print an Ada variant
@@ -724,7 +724,7 @@ rust_print_struct_def (struct type *type, const char *varstring,
{
if (type->field (i).is_static ())
continue;
if (is_enum && TYPE_FIELD_ARTIFICIAL (type, i))
if (is_enum && type->field (i).is_artificial ())
continue;
fields.push_back (i);
}
@@ -741,7 +741,7 @@ rust_print_struct_def (struct type *type, const char *varstring,
QUIT;
gdb_assert (!type->field (i).is_static ());
gdb_assert (! (is_enum && TYPE_FIELD_ARTIFICIAL (type, i)));
gdb_assert (! (is_enum && type->field (i).is_artificial ()));
if (flags->print_offsets)
podata->update (type, i, stream);