aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 10:52:04 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:07 -0700
commit3ee3b2700d59ec1048989a3bf190882740d2ea8b (patch)
treebd46219093e5e0118256d9f47d3a7cc694de1702 /gdb/f-lang.c
parent391f86284f6fff1011ace7136f4bd2bb438de3c6 (diff)
downloadgdb-3ee3b2700d59ec1048989a3bf190882740d2ea8b.zip
gdb-3ee3b2700d59ec1048989a3bf190882740d2ea8b.tar.gz
gdb-3ee3b2700d59ec1048989a3bf190882740d2ea8b.tar.bz2
Turn value_lazy and set_value_lazy functions into methods
This changes the value_lazy and set_value_lazy functions to be methods of value. Much of this patch was written by script. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/f-lang.c')
-rw-r--r--gdb/f-lang.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index bf2471a..d88e81c 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -356,7 +356,7 @@ public:
m_base_offset (base_offset),
m_val (val)
{
- gdb_assert (!value_lazy (val));
+ gdb_assert (!val->lazy ());
}
/* Extract an element of ELT_TYPE at offset (M_BASE_OFFSET + ELT_OFF)
@@ -1441,7 +1441,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);
- if (value_lazy (array)
+ if (array->lazy ()
|| (total_offset + array_slice_type->length ()
> check_typedef (array->type ())->length ()))
{
@@ -1466,7 +1466,7 @@ fortran_undetermined::value_subarray (value *array,
the requested slice is outside the values content range then
just create a new lazy value pointing at the memory where the
contents we're looking for exist. */
- if (value_lazy (array)
+ if (array->lazy ()
|| (total_offset + array_slice_type->length ()
> check_typedef (array->type ())->length ()))
array = value_at_lazy (array_slice_type,
@@ -1476,7 +1476,7 @@ fortran_undetermined::value_subarray (value *array,
(array_slice_type, value_contents (array).data () + total_offset,
value_address (array) + total_offset);
}
- else if (!value_lazy (array))
+ else if (!array->lazy ())
array = value_from_component (array, array_slice_type, total_offset);
else
error (_("cannot subscript arrays that are not in memory"));