libiberty: Add support for demangling D function literals as template value parameters
commit34f3e0657a1fa976d989b22d18b3b2adf6ddd59b
authorIain Buclaw <ibuclaw@gdcproject.org>
Sun, 29 Aug 2021 18:04:24 +0000 (29 20:04 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 29 Aug 2021 23:14:18 +0000 (30 01:14 +0200)
treef42ebab871e2504b77aa9d328bb4b63abd7957be
parent0e32a5aa8bc967bc183142a596d0a6460be27438
libiberty: Add support for demangling D function literals as template value parameters

The D language now allows instantiating templates using struct literals
that have function literal fields as a value argument.

libiberty/ChangeLog:

* d-demangle.c (dlang_parse_arrayliteral): Add 'info' parameter.
(dlang_parse_assocarray): Likewise.
(dlang_parse_structlit): Likewise.
(dlang_value): Likewise.  Handle function literal symbols.
(dlang_template_args): Pass 'info' to dlang_value.
* testsuite/d-demangle-expected: Add new test.
libiberty/d-demangle.c
libiberty/testsuite/d-demangle-expected