aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cp-demangle.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2011-10-10 21:02:57 +0000
committerDJ Delorie <dj@redhat.com>2011-10-10 21:02:57 +0000
commitf9fb0b2d9f19b8c8a54584a3c98994127262b2c8 (patch)
tree492268da6cb2c9d5a387131c0d21bfa7c8703479 /libiberty/cp-demangle.c
parent623bd5b7fdbfaa96315e4cf5cc4f81501ac28e9e (diff)
downloadgdb-f9fb0b2d9f19b8c8a54584a3c98994127262b2c8.zip
gdb-f9fb0b2d9f19b8c8a54584a3c98994127262b2c8.tar.gz
gdb-f9fb0b2d9f19b8c8a54584a3c98994127262b2c8.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r--libiberty/cp-demangle.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 32318e8..c7afef0 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -2294,8 +2294,10 @@ static struct demangle_component **
d_cv_qualifiers (struct d_info *di,
struct demangle_component **pret, int member_fn)
{
+ struct demangle_component **pstart;
char peek;
+ pstart = pret;
peek = d_peek_char (di);
while (peek == 'r' || peek == 'V' || peek == 'K')
{
@@ -2332,6 +2334,28 @@ d_cv_qualifiers (struct d_info *di,
peek = d_peek_char (di);
}
+ if (!member_fn && peek == 'F')
+ {
+ while (pstart != pret)
+ {
+ switch ((*pstart)->type)
+ {
+ case DEMANGLE_COMPONENT_RESTRICT:
+ (*pstart)->type = DEMANGLE_COMPONENT_RESTRICT_THIS;
+ break;
+ case DEMANGLE_COMPONENT_VOLATILE:
+ (*pstart)->type = DEMANGLE_COMPONENT_VOLATILE_THIS;
+ break;
+ case DEMANGLE_COMPONENT_CONST:
+ (*pstart)->type = DEMANGLE_COMPONENT_CONST_THIS;
+ break;
+ default:
+ break;
+ }
+ pstart = &d_left (*pstart);
+ }
+ }
+
return pret;
}