aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 16:13:08 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:22:17 -0700
commitd00664dbba2802bacfed2335b6f249fc418182a0 (patch)
treed926f7656d767617427844def6d80e8e72817207 /gdb/f-valprint.c
parentcda0334434412d888443e9a98386255f2e0c2eab (diff)
downloadgdb-d00664dbba2802bacfed2335b6f249fc418182a0.zip
gdb-d00664dbba2802bacfed2335b6f249fc418182a0.tar.gz
gdb-d00664dbba2802bacfed2335b6f249fc418182a0.tar.bz2
Turn many optimized-out value functions into methods
This turns many functions that are related to optimized-out or availability-checking to be methods of value. The static function value_entirely_covered_by_range_vector is also converted to be a private method. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/f-valprint.c')
-rw-r--r--gdb/f-valprint.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 824a303..e968929 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -269,11 +269,11 @@ public:
struct value *e_val = value_from_component (m_val, elt_type, elt_off);
struct value *e_prev = value_from_component (m_val, elt_type,
elt_off_prev);
- repeated = ((value_entirely_available (e_prev)
- && value_entirely_available (e_val)
+ repeated = ((e_prev->entirely_available ()
+ && e_val->entirely_available ()
&& e_prev->contents_eq (e_val))
- || (value_entirely_unavailable (e_prev)
- && value_entirely_unavailable (e_val)));
+ || (e_prev->entirely_unavailable ()
+ && e_val->entirely_unavailable ()));
}
if (repeated)
@@ -376,11 +376,11 @@ private:
struct value *e_val1 = value_from_component (val, type, offset1);
struct value *e_val2 = value_from_component (val, type, offset2);
- return ((value_entirely_available (e_val1)
- && value_entirely_available (e_val2)
+ return ((e_val1->entirely_available ()
+ && e_val2->entirely_available ()
&& e_val1->contents_eq (e_val2))
- || (value_entirely_unavailable (e_val1)
- && value_entirely_unavailable (e_val2)));
+ || (e_val1->entirely_unavailable ()
+ && e_val2->entirely_unavailable ()));
}
}