mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00: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:
@@ -210,7 +210,7 @@ gen_trace_static_fields (struct agent_expr *ax,
|
||||
|
||||
for (i = type->num_fields () - 1; i >= nbases; i--)
|
||||
{
|
||||
if (field_is_static (&type->field (i)))
|
||||
if (type->field (i).is_static ())
|
||||
{
|
||||
gen_static_field (ax, &value, type, i);
|
||||
if (value.optimized_out)
|
||||
@@ -1359,7 +1359,7 @@ gen_struct_ref_recursive (struct agent_expr *ax, struct axs_value *value,
|
||||
"this") will have been generated already, which will
|
||||
be unnecessary but not harmful if the static field is
|
||||
being handled as a global. */
|
||||
if (field_is_static (&type->field (i)))
|
||||
if (type->field (i).is_static ())
|
||||
{
|
||||
gen_static_field (ax, value, type, i);
|
||||
if (value->optimized_out)
|
||||
@@ -1495,7 +1495,7 @@ gen_struct_elt_for_reference (struct agent_expr *ax, struct axs_value *value,
|
||||
|
||||
if (t_field_name && strcmp (t_field_name, fieldname) == 0)
|
||||
{
|
||||
if (field_is_static (&t->field (i)))
|
||||
if (t->field (i).is_static ())
|
||||
{
|
||||
gen_static_field (ax, value, t, i);
|
||||
if (value->optimized_out)
|
||||
|
||||
Reference in New Issue
Block a user