piece_closure *c
= allocate_piece_closure (this->m_per_cu, this->m_per_objfile,
std::move (this->m_pieces), this->m_frame);
- retval = allocate_computed_value (subobj_type,
+ retval = value::allocate_computed (subobj_type,
&pieced_value_funcs, c);
retval->set_offset (subobj_offset);
}
caller_per_cu,
caller_per_objfile);
- val = allocate_computed_value (type, &entry_data_value_funcs,
+ val = value::allocate_computed (type, &entry_data_value_funcs,
release_value (target_val).release ());
/* Copy the referencing pointer to the new computed value. */
{
struct type *type = gdbarch_get_siginfo_type (gdbarch);
- return allocate_computed_value (type, &siginfo_value_funcs, nullptr);
+ return value::allocate_computed (type, &siginfo_value_funcs, nullptr);
}
return value::allocate (builtin_type (gdbarch)->builtin_void);
if (VALUE_LVAL (val) != not_lval && !array_has_dups (indices, n))
{
struct lval_closure *c = allocate_lval_closure (indices, n, val);
- ret = allocate_computed_value (dst_type, &opencl_value_funcs, c);
+ ret = value::allocate_computed (dst_type, &opencl_value_funcs, c);
}
else
{
}
struct value *
-allocate_computed_value (struct type *type,
- const struct lval_funcs *funcs,
- void *closure)
+value::allocate_computed (struct type *type,
+ const struct lval_funcs *funcs,
+ void *closure)
{
struct value *v = value::allocate_lazy (type);
/* Allocate a value and its contents for type TYPE. */
static struct value *allocate (struct type *type);
+ /* Create a computed lvalue, with type TYPE, function pointers
+ FUNCS, and closure CLOSURE. */
+ static struct value *allocate_computed (struct type *type,
+ const struct lval_funcs *funcs,
+ void *closure);
+
~value ();
DISABLE_COPY_AND_ASSIGN (value);
void (*free_closure) (struct value *v);
};
-/* Create a computed lvalue, with type TYPE, function pointers FUNCS,
- and closure CLOSURE. */
-
-extern struct value *allocate_computed_value (struct type *type,
- const struct lval_funcs *funcs,
- void *closure);
-
extern struct value *allocate_optimized_out_value (struct type *type);
/* Throw an error complaining that the value has been optimized
if (target_has_stack () && inferior_ptid != null_ptid)
{
struct type *type = windows_get_tlb_type (gdbarch);
- return allocate_computed_value (type, &tlb_value_funcs, NULL);
+ return value::allocate_computed (type, &tlb_value_funcs, NULL);
}
return value::allocate (builtin_type (gdbarch)->builtin_void);