From c819a3380fc1b110b88bc6ab5ef9323dbe7d4753 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 22 Apr 2023 12:41:43 -0600 Subject: 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. --- gdb/rust-lang.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/rust-lang.c') diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index 3ef8fca..a060720 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -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 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) -- cgit v1.1