[clang] [CUDA][HIP] Mangle language address spaces by name on the device (PR #245364)
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 27 18:51:42 PST 2026
================
@@ -60,7 +60,7 @@ __device__ int get_shared() {
}
// An explicit opencl_constant qualifier keeps UniformConstant.
-// LLVM-LABEL: define{{.*}} i32 @_Z6get_ocPU3AS2i(ptr addrspace(2)
+// LLVM-LABEL: define{{.*}} i32 @_Z6get_ocPU10CLconstanti(ptr addrspace(2)
----------------
Artem-B wrote:
As this test illustrates, this changes C++ mangling for ordinary `__device__` functions and variables taking language-AS-qualified pointers (`PU3AS<N>` -> named qualifiers). That can break linking against precompiled `-fgpu-rdc` device objects or HIP code declaring `__attribute__((overloadable))` functions to link against OpenCL/SPIR-V bitcode. Could you add a note to `clang/docs/ReleaseNotes.rst` (mentioning `__attribute__((address_space(N)))`, `asm(...)`, or `-Xclang -faddress-space-map-mangling=yes` as escape hatches for interop)?
https://github.com/llvm/llvm-project/pull/245364
More information about the cfe-commits
mailing list