diff options
author | Artemiy Volkov <artemiyv@acm.org> | 2017-03-20 13:47:48 -0700 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2017-03-20 13:47:48 -0700 |
commit | e1cb3213476485a01aa11ecedfa186e386cb4bdb (patch) | |
tree | b45d256a15b1a0216ba5edeb746954038955c756 /gdb/c-valprint.c | |
parent | e4347c89f3a14b480fc88581d1363835f7b99b68 (diff) | |
download | gdb-e1cb3213476485a01aa11ecedfa186e386cb4bdb.zip gdb-e1cb3213476485a01aa11ecedfa186e386cb4bdb.tar.gz gdb-e1cb3213476485a01aa11ecedfa186e386cb4bdb.tar.bz2 |
Implement printing of rvalue reference types and values
This patch provides the ability to print out names of rvalue reference types
and values of those types. This is done in full similarity to regular
references, and as with them, we don't print out "const" suffix because all
rvalue references are const.
gdb/ChangeLog
PR gdb/14441
* c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
(c_type_print_modifier, c_type_print_varspec_suffix)
(c_type_print_base): Support printing rvalue reference types.
* c-valprint.c (c_val_print, c_value_print): Support printing
rvalue reference values.
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r-- | gdb/c-valprint.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index d29b20e..ab1de5c 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -541,6 +541,7 @@ c_val_print (struct type *type, break; case TYPE_CODE_REF: + case TYPE_CODE_RVALUE_REF: case TYPE_CODE_ENUM: case TYPE_CODE_FLAGS: case TYPE_CODE_FUNC: @@ -587,8 +588,7 @@ c_value_print (struct value *val, struct ui_file *stream, val_type = value_type (val); type = check_typedef (val_type); - if (TYPE_CODE (type) == TYPE_CODE_PTR - || TYPE_CODE (type) == TYPE_CODE_REF) + if (TYPE_CODE (type) == TYPE_CODE_PTR || TYPE_IS_REFERENCE (type)) { /* Hack: remove (char *) for char strings. Their type is indicated by the quoted string anyway. |