[clang] [clang][SYCL] Implement address space attributes for SYCL (PR #200849)

Tom Honermann via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 15 15:55:22 PDT 2026


================
@@ -2817,7 +2817,8 @@ void CXXNameMangler::mangleQualifiers(Qualifiers Quals, const DependentAddressSp
         ASString = "CLgeneric";
         break;
       //  <SYCL-addrspace> ::= "SY" [ "global" | "local" | "private" |
-      //                              "device" | "host" ]
+      //                              "generic" | "constant" | "device" | "host"
+      //                              ]
----------------
tahonermann wrote:

`MicrosoftCXXNameMangler::mangleAddressSpaceType()` should also be updated; note that it currently handles address spaces for CUDA and OpenCL. These attributes are enabled for host compilation and may therefore be used in overload resolution. I can't claim to know what it would mean to emit a function that uses one of these address space attributed types on the host (hopefully we would issue an error of some kind), but they may be used in metaprogramming scenarios that result in mangled names being generated even if the associated entity isn't emitted.

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


More information about the cfe-commits mailing list