From 00eaaa505695d75765f570ec3e18680cc394a377 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 26 Sep 2014 15:57:37 -0400 Subject: mangle.c (is_std_substitution): Check for abi_tag. gcc/cp/ * mangle.c (is_std_substitution): Check for abi_tag. libiberty/ * cp-demangle.c (d_substitution): Handle abi tags on abbreviation. From-SVN: r215647 --- libiberty/ChangeLog | 4 ++++ libiberty/cp-demangle.c | 11 ++++++++++- libiberty/testsuite/demangle-expected | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'libiberty') diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 53d967e..829f684 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +2014-09-26 Jason Merrill + + * cp-demangle.c (d_substitution): Handle abi tags on abbreviation. + 2014-09-26 Max Ostapenko * pex-common.h (struct pex_funcs): Add new parameter for open_write field. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 4ecdb1e..77c2cee 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -3687,6 +3687,7 @@ d_substitution (struct d_info *di, int prefix) { const char *s; int len; + struct demangle_component *c; if (p->set_last_name != NULL) di->last_name = d_make_sub (di, p->set_last_name, @@ -3702,7 +3703,15 @@ d_substitution (struct d_info *di, int prefix) len = p->simple_len; } di->expansion += len; - return d_make_sub (di, s, len); + c = d_make_sub (di, s, len); + if (d_peek_char (di) == 'B') + { + /* If there are ABI tags on the abbreviation, it becomes + a substitution candidate. */ + c = d_abi_tags (di, c); + d_add_substitution (di, c); + } + return c; } } diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index f8420ef..a030685 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -4353,3 +4353,6 @@ xxx _QueueNotification_QueueController__$4PPPPPPPM_A_INotice___Z _QueueNotification_QueueController__$4PPPPPPPM_A_INotice___Z _QueueNotification_QueueController__$4PPPPPPPM_A_INotice___Z +--format=gnu-v3 +_Z1fSsB3fooS_ +f(std::string[abi:foo], std::string[abi:foo]) -- cgit v1.1