[clang] [CIR] Upstream support for array new with empty initializer list (PR #178806)

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 30 15:48:44 PST 2026


================
@@ -197,6 +197,12 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
                              mlir::Value src, mlir::Value len) {
     return cir::MemCpyOp::create(*this, loc, dst, src, len);
   }
+
+  cir::MemSetOp createMemSet(mlir::Location loc, mlir::Value dst,
+                             mlir::Value val, mlir::Value len) {
+    val = createIntCast(val, cir::IntType::get(getContext(), 32, true));
----------------
bcardosolopes wrote:

> It seems to me that we should model memset to be its semantics, not its signature.

+1

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


More information about the cfe-commits mailing list