Turn allocate_optimized_out_value into static "constructor"

This turns allocate_optimized_out_value into a static "constructor" of
value.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-01-31 13:30:54 -07:00
parent b64e260290
commit b27556e3c1
11 changed files with 21 additions and 20 deletions

View File

@@ -2855,7 +2855,7 @@ var_value_operation::evaluate_for_sizeof (struct expression *exp,
return value_zero (size_type, not_lval);
else if (is_dynamic_type (type->index_type ())
&& type->bounds ()->high.kind () == PROP_UNDEFINED)
return allocate_optimized_out_value (size_type);
return value::allocate_optimized_out (size_type);
}
}
return evaluate_subexp_for_sizeof_base (exp, type);