[clang] [CIR][CodeGen] Support DesignatedInitUpdateExpr in constant emission (PR #194238)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 5 09:55:56 PDT 2026


================
@@ -399,9 +472,43 @@ ConstantAggregateBuilder::buildFrom(CIRGenModule &cgm, ArrayRef<Element> elems,
 
   // If we want an array type, see if all the elements are the same type and
   // appropriately spaced.
-  if (mlir::isa<cir::ArrayType>(desiredTy)) {
-    cgm.errorNYI("array aggregate constants");
-    return {};
+  if (auto arrTy = mlir::dyn_cast<cir::ArrayType>(desiredTy)) {
+    mlir::Type eltTy = arrTy.getElementType();
----------------
AbdallahRashed wrote:

done

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


More information about the cfe-commits mailing list