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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 18 09:22:14 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
----------------
erichkeane wrote:

I dont think so... perhaps the opposite?  When we ADD a FIXME, we make sure it has sufficient comment to explain why it needs to change for CIR?  Though we don't really do those, we leave a NYI or assert instead, so probably nothing todo .

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


More information about the cfe-commits mailing list