[clang] [CIR][CUDA][HIP] Skip alias emission when the aliasee is not emitted (PR #234627)
Steffen Larsen via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 23 03:52:46 PDT 2026
================
@@ -65,3 +65,7 @@ __device__ int get_oc(__attribute__((opencl_constant)) int *p) { return *p; }
// Function aliases point into the program address space 4.
extern "C" __device__ int alias_target() { return 1; }
[[gnu::alias("alias_target")]] __device__ int alias();
+
+// Host-only aliases are skipped on the device.
+extern "C" int host_target() { return 2; }
+[[gnu::alias("host_target")]] int host_alias();
----------------
steffenlarsen wrote:
What I meant is that `shouldSkipAliasEmission` has a bunch of other cases where aliases may be skipped, e.g. when there is no aliasee and for OpenMP. Could you also add tests for these cases?
https://github.com/llvm/llvm-project/pull/234627
More information about the cfe-commits
mailing list