[PATCH] D demangle: Add support for Nj and Nk symbols in mangled string

Iain Buclaw ibuclaw@gdcproject.org
Sun May 10 13:43:00 GMT 2015


The next version of D introduces two new mangle conventions.

- Nj to represent methods whose 'this' parameter is also the function
return value
- Nk to represent a 'ref' parameter that is also the function return value

This patch introduces support for these two symbols.

---
libiberty/ChangeLog:

2015-05-10 Iain Buclaw  <ibuclaw@gdcproject.org>

    * d-demangle.c (dlang_attributes): Handle Nj and ignore Nk symbol in
    mangled string.  Return NULL if have encountered an unknown attribute.
    (dlang_function_args): Handle Nk symbol in mangled string.
    * testsuite/d-demangle-expected: Add coverage tests for functions with
    return parameters and return attributes.
---
-------------- next part --------------
A non-text attachment was scrubbed...
Name: d-return-attribute.patch
Type: text/x-diff
Size: 2683 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150510/eabba399/attachment.bin>


More information about the Gcc-patches mailing list