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:24 -0700 |
commit | 292382f47ef08c5ec3292c612f737fe4b312c9f1 (patch) | |
tree | f2d9e9490ac38fb8609578b84036bfc7955574fa /gdb/ax-gdb.c | |
parent | 165a813a3abaa1f5993d754765bff2cfa9755995 (diff) | |
download | fsf-binutils-gdb-292382f47ef08c5ec3292c612f737fe4b312c9f1.zip fsf-binutils-gdb-292382f47ef08c5ec3292c612f737fe4b312c9f1.tar.gz fsf-binutils-gdb-292382f47ef08c5ec3292c612f737fe4b312c9f1.tar.bz2 |
Introduce unop_cast_type_operation
This adds class unop_cast_type_operation, which implements
UNOP_CAST_TYPE.
gdb/ChangeLog
2021-03-08 Tom Tromey <tom@tromey.com>
* expop.h (class unop_cast_type_operation): New.
* ax-gdb.c (unop_cast_type_operation::do_generate_ax): New
method.
Diffstat (limited to 'gdb/ax-gdb.c')
-rw-r--r-- | gdb/ax-gdb.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index 84887da..e0970e8 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -2661,6 +2661,18 @@ assign_modify_operation::do_generate_ax (struct expression *exp, "may not assign to it"), name); } +void +unop_cast_type_operation::do_generate_ax (struct expression *exp, + struct agent_expr *ax, + struct axs_value *value, + struct type *cast_type) +{ + struct value *val + = std::get<0> (m_storage)->evaluate (nullptr, exp, + EVAL_AVOID_SIDE_EFFECTS); + std::get<1> (m_storage)->generate_ax (exp, ax, value, value_type (val)); +} + } /* This handles the middle-to-right-side of code generation for binary |