aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-03-08 07:27:57 -0700
committerTom Tromey <tom@tromey.com>2021-03-08 07:28:31 -0700
commit33b79214629c2b1b219e82bb34aed5fb03913634 (patch)
tree940b3b0318b22aa9f19eaf1b5f3da9de3dacc368 /gdb/c-exp.h
parent2492ba36f690fa6ce584132dce3e2f26fbb89f87 (diff)
downloadbinutils-33b79214629c2b1b219e82bb34aed5fb03913634.zip
binutils-33b79214629c2b1b219e82bb34aed5fb03913634.tar.gz
binutils-33b79214629c2b1b219e82bb34aed5fb03913634.tar.bz2
Introduce opencl_structop_operation
This adds class opencl_structop_operation, which implements STRUCTOP_STRUCT for OpenCL. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * opencl-lang.c (opencl_structop_operation::evaluate): New method. * c-exp.h (class opencl_structop_operation): New.
Diffstat (limited to 'gdb/c-exp.h')
-rw-r--r--gdb/c-exp.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/c-exp.h b/gdb/c-exp.h
index 1afe2d2..58a16d5 100644
--- a/gdb/c-exp.h
+++ b/gdb/c-exp.h
@@ -170,6 +170,22 @@ using opencl_leq_operation = opencl_binop_operation<BINOP_LEQ,
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; }
+};
+
}/* namespace expr */
#endif /* C_EXP_H */