[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


================
@@ -664,10 +664,16 @@ void CIRGenModule::setCommonAttributes(GlobalDecl gd, mlir::Operation *gv) {
 void CIRGenModule::setNonAliasAttributes(GlobalDecl gd, mlir::Operation *op) {
   setCommonAttributes(gd, op);
 
+  const Decl *d = gd.getDecl();
+  if (d) {
+    if (auto gvi = mlir::dyn_cast<cir::CIRGlobalValueInterface>(op)) {
----------------
andykaylor wrote:

There is still some section-related handling missing here for PragmaClangBSSSectionAttr and similar attributes.

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


More information about the cfe-commits mailing list