[clang] [CIR] Mark globals as constants (PR #168463)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 18 09:20:38 PST 2025


================
@@ -675,7 +675,9 @@ CIRGenModule::getOrCreateCIRGlobal(StringRef mangledName, mlir::Type ty,
       errorNYI(d->getSourceRange(), "OpenMP target global variable");
 
     gv.setAlignmentAttr(getSize(astContext.getDeclAlign(d)));
-    assert(!cir::MissingFeatures::opGlobalConstant());
+    // FIXME: This code is overly simple and should be merged with other global
----------------
andykaylor wrote:

Yes. Should we start marking those explicitly too? Maybe `FIXME(ogcg)`?

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


More information about the cfe-commits mailing list