summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-26 19:57:37 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-26 19:57:37 +0000
commit7cd4e87d553460a308894f5a7e7b140e487d9ad0 (patch)
treef0ac17ea8372dfc4024ad89e42ad2b268f33402f /libiberty
parent619759798544b4f06a6d3c3592e7275efa03f0ab (diff)
downloadgcc-7cd4e87d553460a308894f5a7e7b140e487d9ad0.tar.gz
gcc/cp/
* mangle.c (is_std_substitution): Check for abi_tag. libiberty/ * cp-demangle.c (d_substitution): Handle abi tags on abbreviation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215647 138bc75d-0d04-0410-961f-82ee72b054a4
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 53d967e6d70..829f684d393 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 4ecdb1ee439..77c2cee9d17 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 f8420efac90..a030685de08 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])