[PATCH] D20113: Fix mangled name of method with ns_consumed parameters.

John McCall via cfe-commits cfe-commits at lists.llvm.org
Tue May 10 10:15:35 PDT 2016


rjmccall added a comment.

This is a good catch, thanks!

As a slight adjustment, It's probably better to just ignore this attribute when mangling the function type of an entity, the same way that we generally don't mangle return types because they don't affect overloading.  That will require an extra flag to be passed down in a few places, but that's pretty reasonable.  This will generally allow NS_CONSUMED and NS_RETURNS_RETAINED to be placed on existing APIs without changing their mangling unless the attribute is used in a secondary position (such as the type of an argument).

Finally, you should give ns_returns_retained the same treatment, as well as the parameter-ABI attributes.


http://reviews.llvm.org/D20113





More information about the cfe-commits mailing list