aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cp-demangle.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2001-08-09 00:05:37 +0000
committerDJ Delorie <dj@redhat.com>2001-08-09 00:05:37 +0000
commite7e9b069361c646b807af955a8a074dff5aed808 (patch)
tree6cfca2e7d0c736b4322ee1a54aadc90f6e88b645 /libiberty/cp-demangle.c
parentf45d83bbaabdeaa3104360a13d95d80c0f61c2d4 (diff)
downloadgdb-e7e9b069361c646b807af955a8a074dff5aed808.zip
gdb-e7e9b069361c646b807af955a8a074dff5aed808.tar.gz
gdb-e7e9b069361c646b807af955a8a074dff5aed808.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r--libiberty/cp-demangle.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index a6a2c1e..5ee8a2b 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -1842,11 +1842,27 @@ demangle_special_name (dm)
if (peek == 'G')
{
- /* A guard variable name. Consume the G. */
+ /* Consume the G. */
advance_char (dm);
- RETURN_IF_ERROR (demangle_char (dm, 'V'));
- RETURN_IF_ERROR (result_add (dm, "guard variable for "));
- RETURN_IF_ERROR (demangle_name (dm, &unused));
+ switch (peek_char (dm))
+ {
+ case 'V':
+ /* A guard variable name. */
+ advance_char (dm);
+ RETURN_IF_ERROR (result_add (dm, "guard variable for "));
+ RETURN_IF_ERROR (demangle_name (dm, &unused));
+ break;
+
+ case 'R':
+ /* A reference temporary. */
+ advance_char (dm);
+ RETURN_IF_ERROR (result_add (dm, "reference temporary for "));
+ RETURN_IF_ERROR (demangle_name (dm, &unused));
+ break;
+
+ default:
+ return "Unrecognized <special-name>.";
+ }
}
else if (peek == 'T')
{