[clang] [clang][SYCL] Add SYCL spelling for AS attributes (PR #200849)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 12 18:11:18 PDT 2026
================
@@ -26,14 +26,16 @@
#define __SPIRV_convergent __attribute__((convergent))
#define __SPIRV_inline __attribute__((always_inline))
-#define __global __attribute__((opencl_global))
-#define __local __attribute__((opencl_local))
-#define __private __attribute__((opencl_private))
-#define __constant __attribute__((opencl_constant))
#ifdef __SYCL_DEVICE_ONLY__
-#define __generic
+#define __GLOBALAS [[clang::sycl_global]]
+#define __LOCALAS [[clang::sycl_local]]
+#define __PRIVATEAS [[clang::sycl_private]]
+#define __GENERICAS [[clang::sycl_generic]]
----------------
tahonermann wrote:
The other macros that are defined and undefined in this header file use a `__SPIRV_` prefix; I think these should too.
```suggestion
#define __SPIRV_GLOBALAS [[clang::sycl_global]]
#define __SPIRV_LOCALAS [[clang::sycl_local]]
#define __SPIRV_PRIVATEAS [[clang::sycl_private]]
#define __SPIRV_GENERICAS [[clang::sycl_generic]]
```
https://github.com/llvm/llvm-project/pull/200849
More information about the cfe-commits
mailing list