[libclc] 806d59e - [libclc] Fix unguarded use of image types (#136871)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 23 07:54:51 PDT 2025
Author: Fraser Cormack
Date: 2025-04-23T15:54:48+01:00
New Revision: 806d59eecd16dc35473638fd73ea0be8e59c6275
URL: https://github.com/llvm/llvm-project/commit/806d59eecd16dc35473638fd73ea0be8e59c6275
DIFF: https://github.com/llvm/llvm-project/commit/806d59eecd16dc35473638fd73ea0be8e59c6275.diff
LOG: [libclc] Fix unguarded use of image types (#136871)
Commit 8292e05 which switched the OpenCL C version to 3.0 exposed this
issue, which wasn't caught in pre-commit CI.
Added:
Modified:
libclc/generic/include/clc/image/image.h
Removed:
################################################################################
diff --git a/libclc/generic/include/clc/image/image.h b/libclc/generic/include/clc/image/image.h
index 8a7f7a38aa3e7..555ec3904c1f8 100644
--- a/libclc/generic/include/clc/image/image.h
+++ b/libclc/generic/include/clc/image/image.h
@@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
+#if defined(__opencl_c_images)
+
_CLC_OVERLOAD _CLC_DECL int get_image_width (image2d_t image);
_CLC_OVERLOAD _CLC_DECL int get_image_width (image3d_t image);
@@ -42,3 +44,5 @@ _CLC_OVERLOAD _CLC_DECL uint4
read_imageui(image2d_t image, sampler_t sampler, int2 coord);
_CLC_OVERLOAD _CLC_DECL uint4
read_imageui(image2d_t image, sampler_t sampler, float2 coord);
+
+#endif
More information about the cfe-commits
mailing list