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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to