Clang cc1 currently sets the -finclude-default-header flag by default, including the opencl-c.h header file. This patch adds a -fgenerate-opencl-builtin flag to generate OpenCL builtin functions with Tablegen. This flag overrides the -finclude-default-header flag.
This patch follows https://reviews.llvm.org/D60763
I feel may be it should be -fadd-opencl-builtins just to hide implementation details from the clang users.
Also the description should be something like:
"Add OpenCL builtin function definitions automatically..."