[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


================
@@ -576,21 +576,27 @@ class ParsedAttr final
     }
   }
 
-  /// If this is an OpenCL address space attribute, returns its SYCL
-  /// representation in LangAS, otherwise returns default address space.
+  /// If this is a SYCL address space attribute, returns its SYCL
+  /// representation in LangAS.
   LangAS asSYCLLangAS() const {
-    switch (getKind()) {
-    case ParsedAttr::AT_OpenCLGlobalAddressSpace:
+    switch (getParsedKind()) {
+    case ParsedAttr::AT_SYCLGlobalAddressSpace:
       return LangAS::sycl_global;
+    // TODO: OpenCLGlobalDeviceAddressSpace and OpenCLGlobalHostAddressSpace
+    // will be removed after deprecation.
+    // https://discourse.llvm.org/t/rfc-remove-opencl-global-device-and-opencl-global-host-address-space-attributes/90677
----------------
tahonermann wrote:

```suggestion
    // TODO: OpenCLGlobalDeviceAddressSpace, OpenCLGlobalHostAddressSpace,
    // sycl_global_device, and sycl_global_host will be removed after deprecation.
    // https://discourse.llvm.org/t/rfc-remove-opencl-global-device-and-opencl-global-host-address-space-attributes/90677
```

https://github.com/llvm/llvm-project/pull/200849


More information about the cfe-commits mailing list