Having looked at this I believe it's doing the right thing in the OpenCL 
cases, and I'd support it going in on those grounds. However, address spaces 
are also intended to be usable for security, and I don't have any really 
understanding of that area.


================
Comment at: lib/CodeGen/CGExprScalar.cpp:1299
@@ -1299,2 +1299,2 @@
   case CK_AnyPointerToBlockPointerCast:
   case CK_BitCast: {
----------------
One of the things I'm not sure about is that the two case labels above here are 
CK_CPointerToObjCPointerCast and CK_BlockPointerToObjCPointerCast; ought those 
to be split off into a separate switch-case and just use the old code? If 
nothing else it would minimise the amount of code that has to be security 
audited wrt address space casting. (As mentioned above, while this looks OK 
from the point of view of an OpenCL type situation, I'm not really competent to 
think about  the security uses of addrspace cast.)


http://llvm-reviews.chandlerc.com/D2241
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to