diff options
author | Tom Tromey <tom@tromey.com> | 2023-04-22 12:41:43 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-05-01 09:20:37 -0600 |
commit | c819a3380fc1b110b88bc6ab5ef9323dbe7d4753 (patch) | |
tree | 05450117dff9b07e36d3ddb7bddf2fd88651c543 /gdb/cp-valprint.c | |
parent | 077a1f08485e88f3b234af1dbb8b907b16045e6a (diff) | |
download | gdb-c819a3380fc1b110b88bc6ab5ef9323dbe7d4753.zip gdb-c819a3380fc1b110b88bc6ab5ef9323dbe7d4753.tar.gz gdb-c819a3380fc1b110b88bc6ab5ef9323dbe7d4753.tar.bz2 |
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.
Diffstat (limited to 'gdb/cp-valprint.c')
-rw-r--r-- | gdb/cp-valprint.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 167cf03..8fad952 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -193,7 +193,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream, /* If requested, skip printing of static fields. */ if (!options->static_field_print - && field_is_static (&type->field (i))) + && type->field (i).is_static ()) continue; if (fields_seen) @@ -227,7 +227,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream, annotate_field_begin (type->field (i).type ()); - if (field_is_static (&type->field (i))) + if (type->field (i).is_static ()) { gdb_puts ("static ", stream); fprintf_symbol (stream, @@ -258,7 +258,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream, } annotate_field_value (); - if (!field_is_static (&type->field (i)) + if (!type->field (i).is_static () && TYPE_FIELD_PACKED (type, i)) { struct value *v; @@ -295,7 +295,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream, fputs_styled ("<optimized out or zero length>", metadata_style.style (), stream); } - else if (field_is_static (&type->field (i))) + else if (type->field (i).is_static ()) { try { @@ -637,7 +637,7 @@ cp_find_class_member (struct type **self_p, int *fieldno, for (i = TYPE_N_BASECLASSES (self); i < len; i++) { field &f = self->field (i); - if (field_is_static (&f)) + if (f.is_static ()) continue; LONGEST bitpos = f.loc_bitpos (); |