[clang] [OpenCL] Set KHR extensions minimum version to OpenCL 1.0 (PR #175120)
Sven van Haastregt via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 12 08:29:04 PST 2026
================
@@ -17,6 +17,13 @@
#endif //cl_khr_depth_images
#endif //defined(__opencl_c_images)
+#if defined(cl_khr_depth_images) || defined(__OPENCL_CPP_VERSION__) || \
+ (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
+// Internal feature macro to provide depth image builtins.
+#define __opencl_depth_image_builtins 1
+#endif // defined(cl_khr_depth_images) || defined(__OPENCL_CPP_VERSION__) ||
+ // (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
+
----------------
svenvh wrote:
I wonder if we should move this to `clang/lib/Headers/opencl-c-base.h` and whether any guards in `clang/lib/Sema/OpenCLBuiltins.td` will need updating? To avoid `opencl-c.h` and `OpenCLBuiltins.td` going out of sync.
https://github.com/llvm/llvm-project/pull/175120
More information about the cfe-commits
mailing list