diff options
author | ibuclaw <ibuclaw@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-16 16:50:19 +0000 |
---|---|---|
committer | ibuclaw <ibuclaw@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-16 16:50:19 +0000 |
commit | 593809ab76b6c89e77b341cc3f829dccd1b06085 (patch) | |
tree | cdf27977324253b7d838b2af786b7030e3e4e58e | |
parent | 4aa78f7c0d44f2665cffc0419e17ec5bbc854ba6 (diff) | |
download | gcc-593809ab76b6c89e77b341cc3f829dccd1b06085.tar.gz |
libiberty/ChangeLog:
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_template_args): Skip over specialized template
parameters in mangled symbol.
* testsuite/d-demangle-expected: Add coverage and unittest for specialized
template parameters.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223246 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libiberty/ChangeLog | 7 | ||||
-rw-r--r-- | libiberty/d-demangle.c | 4 | ||||
-rw-r--r-- | libiberty/testsuite/d-demangle-expected | 8 |
3 files changed, 19 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 110745df894..945551eb3a9 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,5 +1,12 @@ 2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org> + * d-demangle.c (dlang_template_args): Skip over specialized template + parameters in mangled symbol. + * testsuite/d-demangle-expected: Add coverage and unittest for specialized + template parameters. + +2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org> + * d-demangle.c (dlang_type): Handle cent and ucent types. * testsuite/d-demangle-expected: Add coverage tests for cent and ucent. diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c index 05f3a5e4b30..76051054dbc 100644 --- a/libiberty/d-demangle.c +++ b/libiberty/d-demangle.c @@ -1383,6 +1383,10 @@ dlang_template_args (string *decl, const char *mangled) if (n++) string_append (decl, ", "); + /* Skip over specialised template prefix. */ + if (*mangled == 'H') + mangled++; + switch (*mangled) { case 'S': /* Symbol parameter. */ diff --git a/libiberty/testsuite/d-demangle-expected b/libiberty/testsuite/d-demangle-expected index e3fd850862e..3182dc77bfb 100644 --- a/libiberty/testsuite/d-demangle-expected +++ b/libiberty/testsuite/d-demangle-expected @@ -630,6 +630,10 @@ _D8demangle19__T4testS6symbolTaZv demangle.test!(symbol, char) # --format=dlang +_D8demangle12__T4testHTaZv +demangle.test!(char) +# +--format=dlang _D8demangle13__T4testVPinZv demangle.test!(null) # @@ -1050,3 +1054,7 @@ test.main().local() --format=dlang _D3std6socket12InternetHost221__T13getHostNoSyncVAyaa96_0a09202020206175746f2078203d2068746f6e6c28706172616d293b0a09202020206175746f206865203d20676574686f73746279616464722826782c20342c206361737428696e74294164647265737346616d696c792e494e4554293b0a09TkZ13getHostNoSyncMFkZb std.socket.InternetHost.getHostNoSync!("\n\t auto x = htonl(param);\n\t auto he = gethostbyaddr(&x, 4, cast(int)AddressFamily.INET);\n\t", uint).getHostNoSync(uint) +# +--format=dlang +_D2gc6config13__T5parseHTfZ5parseFNbNiAxaKAxaKfZb +gc.config.parse!(float).parse(const(char)[], ref const(char)[], ref float) |