From 317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 31 Jan 2023 13:25:17 -0700 Subject: Turn allocate_value into a static "constructor" This changes allocate_value to be a static "constructor" of value. Approved-By: Simon Marchi --- gdb/dwarf2/expr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/dwarf2/expr.c') diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c index d6ad0f1..fc92de8 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -968,7 +968,7 @@ dwarf_expr_context::fetch_result (struct type *type, struct type *subobj_type, inspecting a register ($pc, $sp, etc.), return a generic optimized out value instead, so that we show instead of . */ - value *tmp = allocate_value (subobj_type); + value *tmp = value::allocate (subobj_type); value_contents_copy (tmp, 0, retval, 0, subobj_type->length ()); retval = tmp; @@ -1019,7 +1019,7 @@ dwarf_expr_context::fetch_result (struct type *type, struct type *subobj_type, if (subobj_offset + len > max) invalid_synthetic_pointer (); - retval = allocate_value (subobj_type); + retval = value::allocate (subobj_type); /* The given offset is relative to the actual object. */ if (gdbarch_byte_order (arch) == BFD_ENDIAN_BIG) @@ -1037,7 +1037,7 @@ dwarf_expr_context::fetch_result (struct type *type, struct type *subobj_type, if (subobj_offset + n > this->m_len) invalid_synthetic_pointer (); - retval = allocate_value (subobj_type); + retval = value::allocate (subobj_type); bfd_byte *contents = value_contents_raw (retval).data (); memcpy (contents, this->m_data + subobj_offset, n); } -- cgit v1.1