rjmccall added a comment.

In http://reviews.llvm.org/D14737#293967, @pete wrote:

> Added a couple of tests for retain returning types other than id.  Returning 
> a pointer should still be converted to a call, while returning a non-pointer 
> such as float will get a message instead.
>
> I walked through the code in the debugger to check on the return cast.  Turns 
> out it is handled at the very end of emitARCValueOperation as follows:
>
>  
>   // Cast the result back to the original type.
>   return CGF.Builder.CreateBitCast(call, origType);


Right, that'll cast back to the original type.  That will be the type of the 
receiver of the message, which is not necessarily the type of the result of the 
message.


http://reviews.llvm.org/D14737



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

Reply via email to