sidorovd created this revision. sidorovd added reviewers: yaxunl, Anastasia. Herald added a subscriber: cfe-commits.
Just adding a preprocessor #define for the extension. Patch by Alexey Sotkin Repository: rC Clang https://reviews.llvm.org/D51402 Files: include/clang/Basic/OpenCLExtensions.def test/SemaOpenCL/extension-version.cl Index: test/SemaOpenCL/extension-version.cl =================================================================== --- test/SemaOpenCL/extension-version.cl +++ test/SemaOpenCL/extension-version.cl @@ -300,3 +300,11 @@ #endif #pragma OPENCL EXTENSION cl_intel_subgroups_short : enable +#if (__OPENCL_C_VERSION__ >= 120) +#ifndef cl_intel_planar_yuv +#error "Missing cl_intel_planar_yuv define" +#endif +#else +// expected-warning@+2{{unsupported OpenCL extension 'cl_intel_planar_yuv' - ignoring}} +#endif +#pragma OPENCL EXTENSION cl_intel_planar_yuv : enable Index: include/clang/Basic/OpenCLExtensions.def =================================================================== --- include/clang/Basic/OpenCLExtensions.def +++ include/clang/Basic/OpenCLExtensions.def @@ -85,6 +85,7 @@ // Intel OpenCL extensions OPENCLEXT_INTERNAL(cl_intel_subgroups, 120, ~0U) OPENCLEXT_INTERNAL(cl_intel_subgroups_short, 120, ~0U) +OPENCLEXT_INTERNAL(cl_intel_planar_yuv, 120, ~0U) #undef OPENCLEXT_INTERNAL
Index: test/SemaOpenCL/extension-version.cl =================================================================== --- test/SemaOpenCL/extension-version.cl +++ test/SemaOpenCL/extension-version.cl @@ -300,3 +300,11 @@ #endif #pragma OPENCL EXTENSION cl_intel_subgroups_short : enable +#if (__OPENCL_C_VERSION__ >= 120) +#ifndef cl_intel_planar_yuv +#error "Missing cl_intel_planar_yuv define" +#endif +#else +// expected-warning@+2{{unsupported OpenCL extension 'cl_intel_planar_yuv' - ignoring}} +#endif +#pragma OPENCL EXTENSION cl_intel_planar_yuv : enable Index: include/clang/Basic/OpenCLExtensions.def =================================================================== --- include/clang/Basic/OpenCLExtensions.def +++ include/clang/Basic/OpenCLExtensions.def @@ -85,6 +85,7 @@ // Intel OpenCL extensions OPENCLEXT_INTERNAL(cl_intel_subgroups, 120, ~0U) OPENCLEXT_INTERNAL(cl_intel_subgroups_short, 120, ~0U) +OPENCLEXT_INTERNAL(cl_intel_planar_yuv, 120, ~0U) #undef OPENCLEXT_INTERNAL
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits