Turn deprecated_value_modifiable into method

This changes deprecated_value_modifiable to be a method of value.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-01-31 10:17:10 -07:00
parent 76675c4d0b
commit 4b53ca8883
7 changed files with 12 additions and 17 deletions

View File

@ -2888,7 +2888,7 @@ ada_value_assign (struct value *toval, struct value *fromval)
if (ada_is_direct_array_type (fromval->type ()))
fromval = ada_coerce_to_simple_array (fromval);
if (!deprecated_value_modifiable (toval))
if (!toval->deprecated_modifiable ())
error (_("Left operand of assignment is not a modifiable lvalue."));
if (VALUE_LVAL (toval) == lval_memory
@ -9531,7 +9531,7 @@ ada_aggregate_operation::assign_aggregate (struct value *container,
if (ada_is_direct_array_type (container->type ()))
container = ada_coerce_to_simple_array (container);
lhs = ada_coerce_ref (lhs);
if (!deprecated_value_modifiable (lhs))
if (!lhs->deprecated_modifiable ())
error (_("Left operand of assignment is not a modifiable lvalue."));
lhs_type = check_typedef (lhs->type ());