This adds class ada_qual_operation, which implements UNOP_QUAL.
gdb/ChangeLog
2021-03-08 Tom Tromey <tom@tromey.com>
* ada-lang.c (ada_qual_operation::evaluate): New method.
* ada-exp.h (class ada_qual_operation): New.
+2021-03-08 Tom Tromey <tom@tromey.com>
+
+ * ada-lang.c (ada_qual_operation::evaluate): New method.
+ * ada-exp.h (class ada_qual_operation): New.
+
2021-03-08 Tom Tromey <tom@tromey.com>
* ada-lang.c (ada_string_operation::evaluate): New method.
enum noside noside) override;
};
+/* The Ada TYPE'(EXP) construct. */
+class ada_qual_operation
+ : public tuple_holding_operation<operation_up, struct type *>
+{
+public:
+
+ using tuple_holding_operation::tuple_holding_operation;
+
+ value *evaluate (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside) override;
+
+ enum exp_opcode opcode () const override
+ { return UNOP_QUAL; }
+};
+
} /* namespace expr */
#endif /* ADA_EXP_H */
return result;
}
+value *
+ada_qual_operation::evaluate (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside)
+{
+ struct type *type = std::get<1> (m_storage);
+ return std::get<0> (m_storage)->evaluate (type, exp, noside);
+}
+
}
/* Implement the evaluate_exp routine in the exp_descriptor structure