diff options
author | Nick Clifton <nickc@redhat.com> | 2017-03-01 15:09:29 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-03-01 15:09:29 +0000 |
commit | 134e805d3e18cf700a5046912b8dca9301fe6f2e (patch) | |
tree | 9f9dc03abc5e5d840195b9acb51701403957ac84 /libiberty | |
parent | [AArch64] Document +rcpc weak release consistency extension (diff) | |
download | binutils-gdb-134e805d3e18cf700a5046912b8dca9301fe6f2e.tar.gz binutils-gdb-134e805d3e18cf700a5046912b8dca9301fe6f2e.tar.bz2 binutils-gdb-134e805d3e18cf700a5046912b8dca9301fe6f2e.zip |
Sync libiberty sources with GCC mainline.
Brings in:
2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
PR PR c++/70182
* cp-demangle.c (d_unqualified_name): Handle "on" for
operator names.
* testsuite/demangle-expected: Add tests.
2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
PR c++/77489
* cp-demangle.c (d_discriminator): Handle discriminator >= 10.
* testsuite/demangle-expected: Add tests for discriminator.
2016-12-13 Jakub Jelinek <jakub@redhat.com>
PR c++/78761
* cp-demangle.c (cplus_demangle_type): Demangle Dc as decltype(auto).
* testsuite/demangle-expected: Add test for decltype(auto).
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 64 | ||||
-rw-r--r-- | libiberty/cp-demangle.c | 24 | ||||
-rw-r--r-- | libiberty/testsuite/demangle-expected | 23 |
3 files changed, 87 insertions, 24 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index de41f89d5e9..0c5972a1844 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,6 +1,30 @@ +2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de> + + PR PR c++/70182 + * cp-demangle.c (d_unqualified_name): Handle "on" for + operator names. + * testsuite/demangle-expected: Add tests. + +2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de> + + PR c++/77489 + * cp-demangle.c (d_discriminator): Handle discriminator >= 10. + * testsuite/demangle-expected: Add tests for discriminator. + +2017-01-04 Jakub Jelinek <jakub@redhat.com> + + Update copyright years. + 2017-01-04 Alan Modra <amodra@gmail.com> - Sync with gcc. + * Makefile.in (configure_deps): Update. + * configure: Regenerate. + +2016-12-13 Jakub Jelinek <jakub@redhat.com> + + PR c++/78761 + * cp-demangle.c (cplus_demangle_type): Demangle Dc as decltype(auto). + * testsuite/demangle-expected: Add test for decltype(auto). 2016-12-12 Nathan Sidwell <nathan@acm.org> @@ -14,16 +38,24 @@ is_lambda_arg. <DEMANGLE_COMPONENT_LAMBDA>: Increment is_lambda_arg around arg printing. - * testsuite/demangle-expected: Add lambda auto mangling cases. - -2016-12-08 Alan Modra <amodra@gmail.com> - - * configure: Regenerate. + * testsuite/demangle-expected: Add lambda auto mangling cases. 2016-12-06 DJ Delorie <dj@redhat.com> * argv.c (expandargv): Check for directories passed as @-files. +2016-11-30 David Malcolm <dmalcolm@redhat.com> + + PR c/78498 + * strndup.c (strlen): Delete decl. + (strnlen): Add decl. + (strndup): Call strnlen rather than strlen. + * xstrndup.c (xstrndup): Likewise. + +2016-11-29 Nathan Sidwell <nathan@acm.org> + + * cp-demangle.c (d_print_comp_inner): Fix parameter indentation. + 2016-11-03 David Tolnay <dtolnay@gmail.com> Mark Wielaard <mark@klomp.org> @@ -90,10 +122,6 @@ * cplus-dem.c (ada_demangle): Initialize demangled to NULL and XDELETEVEC demangled when unknown. -2016-10-17 Nick Clifton <nickc@redhat.com> - - * Sync with gcc. - 2016-09-19 Andrew Stubbs <ams@codesourcery.com> * pex-win32.c (argv_to_cmdline): Quote zero-length parameters. @@ -349,11 +377,7 @@ (d_print_mod_list, d_print_mod, d_print_function_type) (is_ctor_or_dtor): Handle DEMANGLE_COMPONENT_TRANSACTION_SAFE. -2015-09-30 Nick Clifton <nickc@redhat.com> - - Import the following patches from the GCC mainline: - - 2015-08-15 Ian Lance Taylor <iant@google.com> +2015-08-15 Ian Lance Taylor <iant@google.com> * cp-demangle.c (d_abi_tags): Preserve di->last_name across any ABI tags. @@ -365,10 +389,6 @@ * testsuite/d-demangle-expected: Update float and complex literal tests to check correct hexadecimal demangling. -2015-07-14 H.J. Lu <hongjiu.lu@intel.com> - - * configure: Regenerated. - 2015-07-13 Mikhail Maltsev <maltsevm@gmail.com> * cp-demangle.c (d_dump): Fix syntax error. @@ -510,8 +530,8 @@ * functions.texi: Regenerate. 2014-12-11 Uros Bizjak <ubizjak@gmail.com> - Ben Elliston <bje@au.ibm.com> - Manuel Lopez-Ibanez <manu@gcc.gnu.org> + Ben Elliston <bje@au.ibm.com> + Manuel Lopez-Ibanez <manu@gcc.gnu.org> * xvasprintf.c: New file. * vprintf-support.h: Likewise. @@ -736,7 +756,7 @@ (d_ctor_dtor_name): Handle unified ctor/dtor. 2013-11-22 Cary Coutant <ccoutant@google.com> - + PR other/59195 * cp-demangle.c (struct d_info_checkpoint): New struct. (struct d_print_info): Add current_template field. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 15ef3b48785..f0dbf9381c6 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -1594,6 +1594,8 @@ d_unqualified_name (struct d_info *di) ret = d_source_name (di); else if (IS_LOWER (peek)) { + if (peek == 'o' && d_peek_next_char (di) == 'n') + d_advance (di, 2); ret = d_operator_name (di); if (ret != NULL && ret->type == DEMANGLE_COMPONENT_OPERATOR) { @@ -3609,7 +3611,11 @@ d_local_name (struct d_info *di) } } -/* <discriminator> ::= _ <(non-negative) number> +/* <discriminator> ::= _ <number> # when number < 10 + ::= __ <number> _ # when number >= 10 + + <discriminator> ::= _ <number> # when number >=10 + is also accepted to support gcc versions that wrongly mangled that way. We demangle the discriminator, but we don't print it out. FIXME: We should print it out in verbose mode. */ @@ -3617,14 +3623,28 @@ d_local_name (struct d_info *di) static int d_discriminator (struct d_info *di) { - int discrim; + int discrim, num_underscores = 1; if (d_peek_char (di) != '_') return 1; d_advance (di, 1); + if (d_peek_char (di) == '_') + { + ++num_underscores; + d_advance (di, 1); + } + discrim = d_number (di); if (discrim < 0) return 0; + if (num_underscores > 1 && discrim >= 10) + { + if (d_peek_char (di) == '_') + d_advance (di, 1); + else + return 0; + } + return 1; } diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index b65dcd3450e..c1cfa1545ec 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -4666,3 +4666,26 @@ void eat<int*, Foo()::{lambda(auto:1*, auto:2*)#6}>(int*&, Foo()::{lambda(auto:1 _Z3eatIPiZ3BarIsEvvEUlPsPT_PT0_E0_EvRS3_RS5_ void eat<int*, void Bar<short>()::{lambda(short*, auto:1*, auto:2*)#2}>(int*&, void Bar<short>()::{lambda(short*, auto:1*, auto:2*)#2}&) + +# PR 77489 +_ZZ3foovE8localVar_9 +foo()::localVar + +_ZZ3foovE8localVar_10 +foo()::localVar + +_ZZ3foovE8localVar__10_ +foo()::localVar + +_ZZ3foovE8localVar__9_ +_ZZ3foovE8localVar__9_ + +_ZZ3foovE8localVar__12 +_ZZ3foovE8localVar__12 + +# PR 70182 +_Z1gI1AEv1SIXadsrT_onplEE +void g<A>(S<&A::operator+>) + +_Z1gI1AEv1SIXadsrT_plEE +void g<A>(S<&A::operator+>) |