From: Iain Buclaw Date: Mon, 1 May 2017 10:39:52 +0000 (+0000) Subject: d-demangle.c (dlang_attributes): Handle scope attributes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec89d258a04492c4b664850b5679dfe7cf247ceb;p=gcc.git d-demangle.c (dlang_attributes): Handle scope attributes. libiberty/ChangeLog: * d-demangle.c (dlang_attributes): Handle scope attributes. * testsuite/d-demangle-expected: Add tests. From-SVN: r247432 --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 1e7a6c6daca..d4c054ffe83 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2017-05-01 Iain Buclaw + + * d-demangle.c (dlang_attributes): Handle scope attributes. + * testsuite/d-demangle-expected: Add tests. + 2017-04-27 Jonathan Wakely PR demangler/80513 diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c index 12457f003b1..af7c63d1086 100644 --- a/libiberty/d-demangle.c +++ b/libiberty/d-demangle.c @@ -327,6 +327,10 @@ dlang_attributes (string *decl, const char *mangled) mangled++; string_append (decl, "return "); continue; + case 'l': /* scope */ + mangled++; + string_append (decl, "scope "); + continue; default: /* unknown attribute */ return NULL; diff --git a/libiberty/testsuite/d-demangle-expected b/libiberty/testsuite/d-demangle-expected index 04d39f41015..57f7c52331b 100644 --- a/libiberty/testsuite/d-demangle-expected +++ b/libiberty/testsuite/d-demangle-expected @@ -330,6 +330,10 @@ _D8demangle4testFNkaZv demangle.test(return char) # --format=dlang +_D8demangle4testFNlaZv +demangle.test(char) +# +--format=dlang _D8demangle4testFaXv demangle.test(char...) # @@ -478,6 +482,26 @@ _D8demangle4testFNjNkDFNjZaZv demangle.test(return char() return delegate) # --format=dlang +_D8demangle4testFNlDFZaZv +demangle.test(char() delegate) +# +--format=dlang +_D8demangle4testFMDFZaZv +demangle.test(scope char() delegate) +# +--format=dlang +_D8demangle4testFDFNlZaZv +demangle.test(char() scope delegate) +# +--format=dlang +_D8demangle4testFMDFNlZaZv +demangle.test(scope char() scope delegate) +# +--format=dlang +_D8demangle4testFNlMDFNlZaZv +demangle.test(scope char() scope delegate) +# +--format=dlang _D8demangle4testFPFNaZaZv demangle.test(char() pure function) # @@ -534,6 +558,26 @@ _D8demangle4testFNjNkPFNjZaZv demangle.test(return char() return function) # --format=dlang +_D8demangle4testFNlPFZaZv +demangle.test(char() function) +# +--format=dlang +_D8demangle4testFMPFZaZv +demangle.test(scope char() function) +# +--format=dlang +_D8demangle4testFPFNlZaZv +demangle.test(char() scope function) +# +--format=dlang +_D8demangle4testFMPFNlZaZv +demangle.test(scope char() scope function) +# +--format=dlang +_D8demangle4testFNlMPFNlZaZv +demangle.test(scope char() scope function) +# +--format=dlang _D8demangle4test6__initZ demangle.test.init$ #