cplus_demangle_fill_component: Handle DEMANGLE_COMPONENT_RVALUE_REFERENCE
authorPedro Alves <palves@redhat.com>
Mon, 27 Mar 2017 14:23:49 +0000 (14:23 +0000)
committerPedro Alves <palves@gcc.gnu.org>
Mon, 27 Mar 2017 14:23:49 +0000 (14:23 +0000)
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.

From-SVN: r246502

libiberty/ChangeLog
libiberty/cp-demint.c

index b513fcefe3ef2077010b2bdbb8e46bc65692b875..f6318e2acf214d15d1abbdac7b478fdacef82894 100644 (file)
@@ -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
index 13a71d96dec1eaf414695a6d8fb55be18f06cfee..158b90a1500325e0ee53143e0cde1706e67c556b 100644 (file)
@@ -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: