aboutsummaryrefslogtreecommitdiff
path: root/gdb/expop.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 07:52:09 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:06 -0700
commitd0c9791728caa0d3b3270a997c7fd97919976c97 (patch)
tree1753b7232efa89e05696d4289d60ad019fc161e4 /gdb/expop.h
parent7cf57bc5be656c62cc6b80280a9eddad2b8ded3f (diff)
downloadgdb-d0c9791728caa0d3b3270a997c7fd97919976c97.zip
gdb-d0c9791728caa0d3b3270a997c7fd97919976c97.tar.gz
gdb-d0c9791728caa0d3b3270a997c7fd97919976c97.tar.bz2
Turn value_type into method
This changes value_type to be a method of value. Much of this patch was written by script. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/expop.h')
-rw-r--r--gdb/expop.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/expop.h b/gdb/expop.h
index bfe55e4..7460343 100644
--- a/gdb/expop.h
+++ b/gdb/expop.h
@@ -1330,7 +1330,7 @@ public:
value *lhs
= std::get<0> (this->m_storage)->evaluate (nullptr, exp, noside);
value *rhs
- = std::get<1> (this->m_storage)->evaluate (value_type (lhs), exp,
+ = std::get<1> (this->m_storage)->evaluate (lhs->type (), exp,
noside);
return FUNC (expect_type, exp, noside, OP, lhs, rhs);
}
@@ -1613,7 +1613,7 @@ public:
|| sub_op == STRUCTOP_PTR
|| sub_op == OP_SCOPE)
{
- struct type *type = value_type (result);
+ struct type *type = result->type ();
if (!TYPE_IS_REFERENCE (type))
{
@@ -1804,7 +1804,7 @@ public:
value *typeval
= std::get<0> (m_storage)->evaluate (expect_type, exp,
EVAL_AVOID_SIDE_EFFECTS);
- struct type *type = value_type (typeval);
+ struct type *type = typeval->type ();
value *val = std::get<1> (m_storage)->evaluate (expect_type, exp, noside);
return eval_op_memval (expect_type, exp, noside, val, type);
}
@@ -1891,7 +1891,7 @@ public:
many array elements". */
struct type *xtype = (VALUE_LVAL (lhs) == lval_internalvar
? nullptr
- : value_type (lhs));
+ : lhs->type ());
value *rhs = std::get<1> (m_storage)->evaluate (xtype, exp, noside);
if (noside == EVAL_AVOID_SIDE_EFFECTS)
@@ -2030,7 +2030,7 @@ public:
{
value *val = std::get<0> (m_storage)->evaluate (nullptr, exp,
EVAL_AVOID_SIDE_EFFECTS);
- return std::get<1> (m_storage)->evaluate_for_cast (value_type (val),
+ return std::get<1> (m_storage)->evaluate_for_cast (val->type (),
exp, noside);
}
@@ -2064,7 +2064,7 @@ public:
{
value *val = std::get<0> (m_storage)->evaluate (nullptr, exp,
EVAL_AVOID_SIDE_EFFECTS);
- struct type *type = value_type (val);
+ struct type *type = val->type ();
value *rhs = std::get<1> (m_storage)->evaluate (type, exp, noside);
return FUNC (type, rhs);
}