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/f-lang.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/f-lang.c') diff --git a/gdb/f-lang.c b/gdb/f-lang.c index 68d4516..ccaf4fd 100644 --- a/gdb/f-lang.c +++ b/gdb/f-lang.c @@ -137,7 +137,7 @@ fortran_bounds_all_dims (bool lbound_p, 1, ndimensions); struct type *elm_type = builtin_f_type (gdbarch)->builtin_integer; struct type *result_type = create_array_type (nullptr, elm_type, range); - struct value *result = allocate_value (result_type); + struct value *result = value::allocate (result_type); /* Walk the array dimensions backwards due to the way the array will be laid out in memory, the first dimension will be the most inner. */ @@ -720,7 +720,7 @@ fortran_array_shape (struct gdbarch *gdbarch, const language_defn *lang, 1, ndimensions); struct type *elm_type = builtin_f_type (gdbarch)->builtin_integer; struct type *result_type = create_array_type (nullptr, elm_type, range); - struct value *result = allocate_value (result_type); + struct value *result = value::allocate (result_type); LONGEST elm_len = elm_type->length (); /* Walk the array dimensions backwards due to the way the array will be @@ -1440,7 +1440,7 @@ fortran_undetermined::value_subarray (value *array, /* Now copy the elements from the original ARRAY into the packed array value DEST. */ - struct value *dest = allocate_value (repacked_array_type); + struct value *dest = value::allocate (repacked_array_type); if (array->lazy () || (total_offset + array_slice_type->length () > check_typedef (array->type ())->length ())) -- cgit v1.1