diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 13:25:17 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:21:07 -0700 |
commit | 317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced (patch) | |
tree | 20bca3a06c842e4eed5101debd1f672539e87714 /gdb/f-lang.c | |
parent | cbe793af8831a7244de326d6b07c60c197f096a2 (diff) | |
download | gdb-317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced.zip gdb-317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced.tar.gz gdb-317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced.tar.bz2 |
Turn allocate_value into a static "constructor"
This changes allocate_value to be a static "constructor" of value.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/f-lang.c')
-rw-r--r-- | gdb/f-lang.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 ())) |