struct expression *exp,
enum noside noside, enum exp_opcode op,
struct value *arg1, struct value *arg2);
+extern struct value *opencl_logical_not (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside,
+ enum exp_opcode op,
+ struct value *arg);
namespace expr
{
struct expression *exp,
enum noside noside) override
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
const std::string &str = std::get<0> (m_storage);
return value_nsstring (exp->gdbarch, str.c_str (), str.size () + 1);
}
struct expression *exp,
enum noside noside) override
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
return eval_op_objc_selector (expect_type, exp, noside,
std::get<0> (m_storage).c_str ());
}
using opencl_leq_operation = opencl_binop_operation<BINOP_LEQ,
opencl_relop>;
+using opencl_not_operation = unop_operation<UNOP_LOGICAL_NOT,
+ opencl_logical_not>;
+
+/* STRUCTOP_STRUCT implementation for OpenCL. */
+class opencl_structop_operation
+ : public structop_base_operation
+{
+public:
+
+ using structop_base_operation::structop_base_operation;
+
+ value *evaluate (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside) override;
+
+ enum exp_opcode opcode () const override
+ { return STRUCTOP_STRUCT; }
+};
+
+/* This handles the "&&" and "||" operations for OpenCL. */
+class opencl_logical_binop_operation
+ : public tuple_holding_operation<enum exp_opcode,
+ operation_up, operation_up>
+{
+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 std::get<0> (m_storage); }
+};
+
+/* The ?: ternary operator for OpenCL. */
+class opencl_ternop_cond_operation
+ : public tuple_holding_operation<operation_up, operation_up, operation_up>
+{
+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 TERNOP_COND; }
+};
+
}/* namespace expr */
#endif /* C_EXP_H */