[clang] [CIR][CIRGen] Support for section atttribute on cir.global (PR #188200)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 30 11:54:09 PDT 2026
================
@@ -2566,6 +2566,26 @@ mlir::LogicalResult CIRToLLVMGetGlobalOpLowering::matchAndRewrite(
return mlir::success();
}
+llvm::SmallVector<mlir::NamedAttribute>
+CIRToLLVMGlobalOpLowering::lowerGlobalAttributes(
+ cir::GlobalOp op, mlir::ConversionPatternRewriter &rewriter) const {
+ SmallVector<mlir::NamedAttribute> attributes;
+
+ if (auto sectionAttr = op.getSectionAttr())
----------------
andykaylor wrote:
```suggestion
if (mlir::StringAttr sectionAttr = op.getSectionAttr())
```
https://github.com/llvm/llvm-project/pull/188200
More information about the cfe-commits
mailing list