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:23 -0700 |
commit | 44b675c89b9d4e22ab60f51416b47634df2a3774 (patch) | |
tree | 724df2df3c2a5b6c35c8ae6dbd1f1c990e39b4b7 /gdb/expop.h | |
parent | f6b4232691d79a9e4b54934529f4b34081d79d94 (diff) | |
download | binutils-gdb-44b675c89b9d4e22ab60f51416b47634df2a3774.tar.gz |
Introduce type_instance_operation
This adds class type_instance_operation, which implements
TYPE_INSTANCE.
gdb/ChangeLog
2021-03-08 Tom Tromey <tom@tromey.com>
* expop.h (class type_instance_operation): New.
* eval.c (type_instance_operation::evaluate): New method.
Diffstat (limited to 'gdb/expop.h')
-rw-r--r-- | gdb/expop.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/expop.h b/gdb/expop.h index 7c0768ca6c1..b196de52d0b 100644 --- a/gdb/expop.h +++ b/gdb/expop.h @@ -1740,6 +1740,23 @@ protected: override; }; +/* Implement the "type instance" operation. */ +class type_instance_operation + : public tuple_holding_operation<type_instance_flags, std::vector<type *>, + 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 TYPE_INSTANCE; } +}; + } /* namespace expr */ #endif /* EXPOP_H */ |