================
@@ -357,6 +357,13 @@ void CIRGenNVCUDARuntime::emitDeviceStub(CIRGenFunction
&cgf, cir::FuncOp fn,
globalOp->removeAttr("sym_visibility");
globalOp->setAttr("alignment", builder.getI64IntegerAttr(
cgm.getPointerAlign().getQuantity()));
+
+ // The stub's linkage is only final once it is defined, so the handle
+ // takes it over here.
+ globalOp.setLinkage(fn.getLinkage());
+ mlir::SymbolTable::setSymbolVisibility(
+ globalOp, cgm.getMLIRVisibilityFromCIRLinkage(fn.getLinkage()));
+ cgm.setDSOLocal(static_cast<mlir::Operation *>(globalOp));
----------------
Fznamznon wrote:
Should we only set DSO local if fn has it?
https://github.com/llvm/llvm-project/pull/227267
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits