From 152dbbb1328c1dce8265a42317152d22cdf3459e Mon Sep 17 00:00:00 2001 From: jason Date: Thu, 22 Mar 2012 18:34:16 +0000 Subject: [PATCH] * cp-demangle.c (cplus_demangle_operators): Add li. (d_unqualified_name): Handle it specially. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@185704 138bc75d-0d04-0410-961f-82ee72b054a4 --- libiberty/ChangeLog | 5 +++++ libiberty/cp-demangle.c | 8 +++++++- libiberty/testsuite/demangle-expected | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index ec86269b1c1..25174167e39 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2012-03-22 Jason Merrill + + * cp-demangle.c (cplus_demangle_operators): Add li. + (d_unqualified_name): Handle it specially. + 2012-03-22 Release Manager * GCC 4.7.0 released. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index ce9a857c545..d95b56c71a9 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -1419,7 +1419,12 @@ d_unqualified_name (struct d_info *di) ret = d_operator_name (di); if (ret != NULL && ret->type == DEMANGLE_COMPONENT_OPERATOR) - di->expansion += sizeof "operator" + ret->u.s_operator.op->len - 2; + { + di->expansion += sizeof "operator" + ret->u.s_operator.op->len - 2; + if (!strcmp (ret->u.s_operator.op->code, "li")) + ret = d_make_comp (di, DEMANGLE_COMPONENT_UNARY, ret, + d_source_name (di)); + } return ret; } else if (peek == 'C' || peek == 'D') @@ -1596,6 +1601,7 @@ const struct demangle_operator_info cplus_demangle_operators[] = { "ix", NL ("[]"), 2 }, { "lS", NL ("<<="), 2 }, { "le", NL ("<="), 2 }, + { "li", NL ("operator\"\" "), 1 }, { "ls", NL ("<<"), 2 }, { "lt", NL ("<"), 2 }, { "mI", NL ("-="), 2 }, diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index 4e7172fa4ee..616a1271c7b 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -4073,6 +4073,8 @@ decltype (g({parm#1}, {})) f1(int) _Z2f1IiEDTnw_T_ilEES0_ decltype (new int{}) f1(int) --format=gnu-v3 +_Zli2_wPKc +operator"" _w(char const*) _Z1fIiEDTnw_Dapifp_EET_ decltype (new auto({parm#1})) f(int) --format=gnu-v3 -- 2.11.0