================
@@ -374,6 +374,202 @@ mlir::Attribute buildRecord(ConstantEmitter &emitter, 
const APValue &val,
 }
 } // namespace ConstRecordBuilder
 
+//===----------------------------------------------------------------------===//
+//                         DesignatedInitUpdateExpr
+//===----------------------------------------------------------------------===//
+
+// Forward declaration.
+static bool emitDesignatedInitUpdater(ConstantEmitter &emitter,
+                                      CIRGenModule &cgm, QualType type,
+                                      mlir::Attribute &base,
+                                      const InitListExpr *updater);
+
+/// Apply a DesignatedInitUpdateExpr's updater InitListExpr to an existing
+/// record constant. The record's fields are decomposed, modified according to
+/// the updater, and reassembled.
+static bool updateRecord(ConstantEmitter &emitter, CIRGenModule &cgm,
----------------
andykaylor wrote:

Does this handle unions correctly? If so, can you add a test for that? If not, 
can you add an NYI?

https://github.com/llvm/llvm-project/pull/194238
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to