libiberty/
authorgary <gary@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Oct 2013 13:56:51 +0000 (13:56 +0000)
committergary <gary@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Oct 2013 13:56:51 +0000 (13:56 +0000)
commita5ec7a66b26e6f26ee0d468bee5f240a72210a70
treedf929d3e5b0a21e524d9bcdfeeb9f821b3b53b76
parent4e9e79c057fec18303bc1a1827ed16abe6569b8f
libiberty/
2013-10-25  Gary Benson  <gbenson@redhat.com>

* cp-demangle.c (struct d_saved_scope): New structure.
(struct d_print_info): New fields saved_scopes and
num_saved_scopes.
(d_print_init): Initialize the above.
(d_print_free): New function.
(cplus_demangle_print_callback): Call the above.
(d_copy_templates): New function.
(d_print_comp): New variables saved_templates and
need_template_restore.
[DEMANGLE_COMPONENT_REFERENCE,
DEMANGLE_COMPONENT_RVALUE_REFERENCE]: Capture scope the first
time the component is traversed, and use the captured scope for
subsequent traversals.
* testsuite/demangle-expected: Add regression test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204068 138bc75d-0d04-0410-961f-82ee72b054a4
libiberty/ChangeLog
libiberty/cp-demangle.c
libiberty/testsuite/demangle-expected