Turn value_fetch_lazy into a method

This changes value_fetch_lazy to be a method of value.  A few helper
functions are converted as well, to avoid problems in later patches
when the data members are all made private.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-01-31 13:53:55 -07:00
parent bbe912ba88
commit 78259c365f
16 changed files with 98 additions and 88 deletions

View File

@@ -212,7 +212,7 @@ fetch_subexp_value (struct expression *exp,
try
{
value_fetch_lazy (result);
result->fetch_lazy ();
*valp = result;
}
catch (const gdb_exception_error &except)
@@ -2878,7 +2878,7 @@ var_msym_value_operation::evaluate_for_cast (struct type *to_type,
if (VALUE_LVAL (val) == lval_memory)
{
if (val->lazy ())
value_fetch_lazy (val);
val->fetch_lazy ();
VALUE_LVAL (val) = not_lval;
}
return val;
@@ -2899,7 +2899,7 @@ var_value_operation::evaluate_for_cast (struct type *to_type,
if (VALUE_LVAL (val) == lval_memory)
{
if (val->lazy ())
value_fetch_lazy (val);
val->fetch_lazy ();
VALUE_LVAL (val) = not_lval;
}
return val;