mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
Replace field_is_static with a method
This changes field_is_static to be a method on struct field, and updates all the callers. Most of this patch was written by script. Regression tested on x86-64 Fedora 36.
This commit is contained in:
@@ -130,7 +130,7 @@ rust_underscore_fields (struct type *type)
|
||||
return false;
|
||||
for (i = 0; i < type->num_fields (); ++i)
|
||||
{
|
||||
if (!field_is_static (&type->field (i)))
|
||||
if (!type->field (i).is_static ())
|
||||
{
|
||||
char buf[20];
|
||||
|
||||
@@ -403,7 +403,7 @@ rust_language::val_print_struct
|
||||
first_field = 1;
|
||||
for (i = 0; i < type->num_fields (); ++i)
|
||||
{
|
||||
if (field_is_static (&type->field (i)))
|
||||
if (type->field (i).is_static ())
|
||||
continue;
|
||||
|
||||
if (!first_field)
|
||||
@@ -723,7 +723,7 @@ rust_print_struct_def (struct type *type, const char *varstring,
|
||||
std::vector<int> fields;
|
||||
for (int i = 0; i < type->num_fields (); ++i)
|
||||
{
|
||||
if (field_is_static (&type->field (i)))
|
||||
if (type->field (i).is_static ())
|
||||
continue;
|
||||
if (is_enum && TYPE_FIELD_ARTIFICIAL (type, i))
|
||||
continue;
|
||||
@@ -741,7 +741,7 @@ rust_print_struct_def (struct type *type, const char *varstring,
|
||||
{
|
||||
QUIT;
|
||||
|
||||
gdb_assert (!field_is_static (&type->field (i)));
|
||||
gdb_assert (!type->field (i).is_static ());
|
||||
gdb_assert (! (is_enum && TYPE_FIELD_ARTIFICIAL (type, i)));
|
||||
|
||||
if (flags->print_offsets)
|
||||
|
||||
Reference in New Issue
Block a user