diff options
author | Tom Tromey <tom@tromey.com> | 2021-03-08 07:27:57 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-03-08 07:28:31 -0700 |
commit | 2492ba36f690fa6ce584132dce3e2f26fbb89f87 (patch) | |
tree | ebf6afe6ac641daa89c1954937eb70decb63428a /gdb/opencl-lang.c | |
parent | a88c3c8dd36424c40074b0dd6f3cc124f9aded3c (diff) | |
download | binutils-2492ba36f690fa6ce584132dce3e2f26fbb89f87.zip binutils-2492ba36f690fa6ce584132dce3e2f26fbb89f87.tar.gz binutils-2492ba36f690fa6ce584132dce3e2f26fbb89f87.tar.bz2 |
Introduce opencl_notequal_operation
This adds the opencl_notequal_operation typedef, implementing "!=" for
OpenCL.
gdb/ChangeLog
2021-03-08 Tom Tromey <tom@tromey.com>
* opencl-lang.c (opencl_logical_not): No longer static. Change
parameters.
(evaluate_subexp_opencl): Update.
* c-exp.h (opencl_notequal_operation): New typedef.
Diffstat (limited to 'gdb/opencl-lang.c')
-rw-r--r-- | gdb/opencl-lang.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c index 0145605..8ddcd76 100644 --- a/gdb/opencl-lang.c +++ b/gdb/opencl-lang.c @@ -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: |