[PATCH] D28136: [OpenCL] Implement as_type operator as alias of __builtin_astype.

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 3 12:17:19 PST 2017


Anastasia added a comment.

This has been discussed during the initial review for the header:
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160425/157187.html

The main issue is after preprocessing the header the original function name is no longer available in diagnostics reported. The spec defines as_type as a builtin function and not a macro. Additionally your patch would allow as_type to be used with extra type (not only those defined in spec). Also I don't see the problem to implement as_type with just simply calling a builtin. It should be inlined later anyways.


https://reviews.llvm.org/D28136





More information about the cfe-commits mailing list