wenju-he wrote:

The regression is because [ROCm 
opencl-c.h](https://github.com/ROCm/llvm-project/blob/amd-staging/clang/lib/Headers/opencl-c.h)
 has inlined opencl-c-base.h
Following diff inlines the change in opencl-c-base.h into 
https://github.com/ROCm/llvm-project/blob/amd-staging/clang/lib/Headers/opencl-c.h
 and can fix the build fail:
```
diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h
index 03ccba26ac34..98e358633132 100644
--- a/clang/lib/Headers/opencl-c.h
+++ b/clang/lib/Headers/opencl-c.h
@@ -51,6 +51,14 @@
  // Internal feature macro to provide subgroup builtins.
  #define __opencl_subgroup_builtins 1
  #endif
+
+#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)
+
 // built-in scalar data types:

 /**
```
Therefore, the issue should be fixed in RoCm repo.

https://github.com/llvm/llvm-project/pull/175993
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to