libiberty: Add support for demangling local D template declarations
commit392e141079a198c93b19bfcd1fe2bd5df456c999
authorIain Buclaw <ibuclaw@gdcproject.org>
Sun, 29 Aug 2021 18:26:06 +0000 (29 20:26 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 29 Aug 2021 23:14:18 +0000 (30 01:14 +0200)
tree7a7790433e9748898047357b4ea5c74fbf680e2a
parent34f3e0657a1fa976d989b22d18b3b2adf6ddd59b
libiberty: Add support for demangling local D template declarations

The D language now allows multiple different template declarations in
the same function that have the same mangled name.  To make the mangled
names unique, a fake parent in the form `__Sddd' is added to the symbol.
This information is not important for the user, so the demangler now
handles and ignores it.

libiberty/ChangeLog:

* d-demangle.c (dlang_identifier): Skip over fake parent manglings.
* testsuite/d-demangle-expected: Add tests.
libiberty/d-demangle.c
libiberty/testsuite/d-demangle-expected