aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2014-09-26 15:57:37 -0400
committerJason Merrill <jason@gcc.gnu.org>2014-09-26 15:57:37 -0400
commit00eaaa505695d75765f570ec3e18680cc394a377 (patch)
treef0ac17ea8372dfc4024ad89e42ad2b268f33402f /libiberty
parent20ee26901f9bd834fa221f751c7baa5bf07137b5 (diff)
downloadgcc-00eaaa505695d75765f570ec3e18680cc394a377.zip
gcc-00eaaa505695d75765f570ec3e18680cc394a377.tar.gz
gcc-00eaaa505695d75765f570ec3e18680cc394a377.tar.bz2
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
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog4
-rw-r--r--libiberty/cp-demangle.c11
-rw-r--r--libiberty/testsuite/demangle-expected3
3 files changed, 17 insertions, 1 deletions
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 <jason@redhat.com>
+
+ * cp-demangle.c (d_substitution): Handle abi tags on abbreviation.
+
2014-09-26 Max Ostapenko <m.ostapenko@partner.samsung.com>
* 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])