Turn value_incref and value_decref into methods

This changes value_incref and value_decref to be methods of value.
Much of this patch was written by script.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-01-31 14:25:29 -07:00
parent d3824ae14a
commit cdf3de175d
7 changed files with 27 additions and 39 deletions

View File

@@ -128,7 +128,7 @@ allocate_piece_closure (dwarf2_per_cu_data *per_cu,
for (dwarf_expr_piece &piece : c->pieces)
if (piece.location == DWARF_VALUE_STACK)
value_incref (piece.v.value);
piece.v.value->incref ();
return c;
}
@@ -620,7 +620,7 @@ free_pieced_value_closure (value *v)
{
for (dwarf_expr_piece &p : c->pieces)
if (p.location == DWARF_VALUE_STACK)
value_decref (p.v.value);
p.v.value->decref ();
delete c;
}