diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2017-05-01 10:50:58 +0000 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2017-05-01 10:50:58 +0000 |
commit | 98bb7ee2da460526effb6cdfcdd242ebe247d7b5 (patch) | |
tree | a0a0869b7b011d578a33366cc4cf289bc2834e5a /libiberty | |
parent | c6f44bae7e0a338b533e541c8e369b920ffe83f0 (diff) | |
download | gcc-98bb7ee2da460526effb6cdfcdd242ebe247d7b5.tar.gz |
d-demangle.c (dlang_parse_symbol): Skip over anonymous symbols.
libiberty/ChangeLog:
* d-demangle.c (dlang_parse_symbol): Skip over anonymous symbols.
* testsuite/d-demangle-expected: Add tests.
From-SVN: r247434
Diffstat (limited to 'libiberty')
-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, 18 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 7aa4821d610..c5c566d83bc 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,4 +1,9 @@ -2017-04-15 Iain Buclaw <ibuclaw@gdcproject.org> +2017-05-01 Iain Buclaw <ibuclaw@gdcproject.org> + + * d-demangle.c (dlang_parse_symbol): Skip over anonymous symbols. + * testsuite/d-demangle-expected: Add tests. + +2017-05-01 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_identifier): Handle template constraint symbols. (dlang_parse_template): Only advance if template symbol prefix is diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c index 74dde9d9b0c..533653fde2f 100644 --- a/libiberty/d-demangle.c +++ b/libiberty/d-demangle.c @@ -1362,6 +1362,10 @@ dlang_parse_symbol (string *decl, const char *mangled, if (n++) string_append (decl, "."); + /* Skip over anonymous symbols. */ + while (*mangled == '0') + mangled++; + mangled = dlang_identifier (decl, mangled, kind); if (mangled && dlang_call_convention_p (mangled)) diff --git a/libiberty/testsuite/d-demangle-expected b/libiberty/testsuite/d-demangle-expected index 6725684ff33..530e0e62bff 100644 --- a/libiberty/testsuite/d-demangle-expected +++ b/libiberty/testsuite/d-demangle-expected @@ -929,6 +929,14 @@ demangle.test(char() delegate shared inout) _D8demangle4testFDONgxFZaZv demangle.test(char() delegate shared inout const) # +--format=dlang +_D8demangle004testFaZv +demangle.test(char) +# +--format=dlang +_D8demangle000000004testFaZv +demangle.test(char) +# # Unittests # --format=dlang |