aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cp-demangle.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2011-08-06 18:40:27 +0000
committerDJ Delorie <dj@redhat.com>2011-08-06 18:40:27 +0000
commit6b6bd65aa5c27687304cd4add13ff1910ef349f7 (patch)
tree71292ff48728b04fd86c7f59eca7651c23be9847 /libiberty/cp-demangle.c
parent2f7fb8e4c8d23a52f0ca284beeebc248aa63baaf (diff)
downloadgdb-6b6bd65aa5c27687304cd4add13ff1910ef349f7.zip
gdb-6b6bd65aa5c27687304cd4add13ff1910ef349f7.tar.gz
gdb-6b6bd65aa5c27687304cd4add13ff1910ef349f7.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r--libiberty/cp-demangle.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index f41856b..d67a9e7 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -1280,6 +1280,7 @@ d_nested_name (struct d_info *di)
/* <prefix> ::= <prefix> <unqualified-name>
::= <template-prefix> <template-args>
::= <template-param>
+ ::= <decltype>
::=
::= <substitution>
@@ -1308,10 +1309,19 @@ d_prefix (struct d_info *di)
<template-param> here. */
comb_type = DEMANGLE_COMPONENT_QUAL_NAME;
- if (IS_DIGIT (peek)
+ if (peek == 'D')
+ {
+ char peek2 = d_peek_next_char (di);
+ if (peek2 == 'T' || peek2 == 't')
+ /* Decltype. */
+ dc = cplus_demangle_type (di);
+ else
+ /* Destructor name. */
+ dc = d_unqualified_name (di);
+ }
+ else if (IS_DIGIT (peek)
|| IS_LOWER (peek)
|| peek == 'C'
- || peek == 'D'
|| peek == 'U'
|| peek == 'L')
dc = d_unqualified_name (di);