[clang] [CIR][CUDA] Global emission for fatbin symbols (PR #187636)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 25 13:50:45 PDT 2026


================
@@ -1634,11 +1645,151 @@ void LoweringPreparePass::runOnOp(mlir::Operation *op) {
       globalCtorList.emplace_back(fnOp.getName(), globalCtor.value());
     else if (auto globalDtor = fnOp.getGlobalDtorPriority())
       globalDtorList.emplace_back(fnOp.getName(), globalDtor.value());
+
+    if (auto attr = fnOp->getAttr(cir::CUDAKernelNameAttr::getMnemonic())) {
----------------
andykaylor wrote:

```suggestion
    if (mlir::Attribute attr = fnOp->getAttr(cir::CUDAKernelNameAttr::getMnemonic())) {
```
`auto` gives the impression that this returns `cir::CUDAKernelNameAttr` but based on the line below I assume that it doesn't.

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


More information about the cfe-commits mailing list