From d0c9791728caa0d3b3270a997c7fd97919976c97 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 31 Jan 2023 07:52:09 -0700 Subject: 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 --- gdb/expop.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gdb/expop.h') 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); } -- cgit v1.1