Remove deprecated_lval_hack

This removes deprecated_lval_hack and the VALUE_LVAL macro, replacing
all uses with a call to value::lval.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-02-09 06:55:48 -07:00
parent 6f9c9d71c2
commit 736355f2e1
28 changed files with 112 additions and 122 deletions

View File

@ -300,7 +300,7 @@ create_value (struct gdbarch *gdbarch, struct value *val, enum noside noside,
else
{
/* Check whether to create a lvalue or not. */
if (VALUE_LVAL (val) != not_lval && !array_has_dups (indices, n))
if (val->lval () != not_lval && !array_has_dups (indices, n))
{
struct lval_closure *c = allocate_lval_closure (indices, n, val);
ret = value::allocate_computed (dst_type, &opencl_value_funcs, c);
@ -687,7 +687,7 @@ eval_opencl_assign (struct type *expect_type, struct expression *exp,
struct type *type1 = arg1->type ();
if (arg1->deprecated_modifiable ()
&& VALUE_LVAL (arg1) != lval_internalvar)
&& arg1->lval () != lval_internalvar)
arg2 = opencl_value_cast (type1, arg2);
return value_assign (arg1, arg2);
@ -714,7 +714,7 @@ opencl_structop_operation::evaluate (struct type *expect_type,
NULL, "structure");
if (noside == EVAL_AVOID_SIDE_EFFECTS)
v = value::zero (v->type (), VALUE_LVAL (v));
v = value::zero (v->type (), v->lval ());
return v;
}
}