================
@@ -357,6 +357,18 @@ void CIRGenNVCUDARuntime::emitDeviceStub(CIRGenFunction
&cgf, cir::FuncOp fn,
globalOp->removeAttr("sym_visibility");
globalOp->setAttr("alignment", builder.getI64IntegerAttr(
cgm.getPointerAlign().getQuantity()));
+
+ // The handle must track the kernel stub's linkage/visibility, not the
+ // global-op default (external).
+ globalOp.setLinkage(fn.getLinkage());
----------------
Fznamznon wrote:
Could you please elaborate a bit more on why? OGCG is able to set linkage in
`getKernelHandle ` .
https://github.com/llvm/llvm-project/pull/227267
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits