This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] cplus_demangle_fill_component: Handle DEMANGLE_COMPONENT_RVALUE_REFERENCE
- From: Pedro Alves <palves at sourceware dot org>
- To: bfd-cvs at sourceware dot org, gdb-cvs at sourceware dot org
- Date: 27 Mar 2017 14:27:09 -0000
- Subject: [binutils-gdb] cplus_demangle_fill_component: Handle DEMANGLE_COMPONENT_RVALUE_REFERENCE
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b1a42fdfa31937d7e05df34afee970ac0ad239e1
commit b1a42fdfa31937d7e05df34afee970ac0ad239e1
Author: Pedro Alves <palves@redhat.com>
Date: Mon Mar 27 13:56:49 2017 +0100
cplus_demangle_fill_component: Handle DEMANGLE_COMPONENT_RVALUE_REFERENCE
This patch almost a decade ago:
...
2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
* cp-demangle.c (d_dump): Handle
DEMANGLE_COMPONENT_RVALUE_REFERENCE.
(d_make_comp): Ditto.
...
... missed doing the same change to cplus_demangle_fill_component that
was done to d_make_comp. I.e., teach it to only validate that we're
not passing in a "right" subtree. GDB has recently (finally) learned
about rvalue references, and a change to make it use
cplus_demangle_fill_component more ran into an assertion because of
this.
(GDB is the only user of cplus_demangle_fill_component in both the gcc
and binutils-gdb trees.)
libiberty/ChangeLog:
2017-03-27 Pedro Alves <palves@redhat.com>
* cp-demint.c (cplus_demangle_fill_component): Handle
DEMANGLE_COMPONENT_RVALUE_REFERENCE.
Diff:
---
libiberty/ChangeLog | 5 +++++
libiberty/cp-demint.c | 1 +
2 files changed, 6 insertions(+)
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index b513fce..f6318e2 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-27 Pedro Alves <palves@redhat.com>
+
+ * cp-demint.c (cplus_demangle_fill_component): Handle
+ DEMANGLE_COMPONENT_RVALUE_REFERENCE.
+
2017-03-12 Mark Wielaard <mark@klomp.org>
* cp-demangle.c (cplus_demangle_fill_name): Initialize
diff --git a/libiberty/cp-demint.c b/libiberty/cp-demint.c
index 13a71d9..158b90a 100644
--- a/libiberty/cp-demint.c
+++ b/libiberty/cp-demint.c
@@ -106,6 +106,7 @@ cplus_demangle_fill_component (struct demangle_component *p,
case DEMANGLE_COMPONENT_CONST_THIS:
case DEMANGLE_COMPONENT_POINTER:
case DEMANGLE_COMPONENT_REFERENCE:
+ case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
case DEMANGLE_COMPONENT_COMPLEX:
case DEMANGLE_COMPONENT_IMAGINARY:
case DEMANGLE_COMPONENT_VENDOR_TYPE: