@@ -38,6 +38,11 @@ extern struct value *opencl_relop (struct type *expect_type,
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
{
@@ -162,6 +167,9 @@ using opencl_geq_operation = opencl_binop_operation<BINOP_GEQ,
using opencl_leq_operation = opencl_binop_operation<BINOP_LEQ,
opencl_relop>;
+using opencl_not_operation = unop_operation<UNOP_LOGICAL_NOT,
+ opencl_logical_not>;
+
}/* namespace expr */
#endif /* C_EXP_H */
@@ -441,8 +441,10 @@ opencl_component_ref (struct expression *exp, struct value *val,
/* Perform the unary logical not (!) operation. */
-static struct value *
-opencl_logical_not (struct expression *exp, struct value *arg)
+struct value *
+opencl_logical_not (struct type *expect_type, struct expression *exp,
+ enum noside noside, enum exp_opcode op,
+ struct value *arg)
{
struct type *type = check_typedef (value_type (arg));
struct type *rettype;
@@ -765,7 +767,7 @@ evaluate_subexp_opencl (struct type *expect_type, struct expression *exp,
return value_from_longest (builtin_type (exp->gdbarch)->
builtin_int, 1);
- return opencl_logical_not (exp, arg1);
+ return opencl_logical_not (expect_type, exp, noside, op, arg1);
/* Handle the logical operator and(&&) and or(||). */
case BINOP_LOGICAL_AND: