================ @@ -280,3 +313,77 @@ mlir::LogicalResult CIRGenFunction::emitReturnStmt(const ReturnStmt &s) { return mlir::success(); } + +mlir::LogicalResult CIRGenFunction::emitForStmt(const ForStmt &s) { + cir::ForOp forOp; + + // TODO: pass in an array of attributes. + auto forStmtBuilder = [&]() -> mlir::LogicalResult { + mlir::LogicalResult loopRes = mlir::success(); + // Evaluate the first part before the loop. + if (s.getInit()) ---------------- andykaylor wrote:
We are creating a lexical scope. This lambda gets called from the `builder.create<ScopeOp>` call on line 377, which also creates the lexical scope and sets that as the insertion point. https://github.com/llvm/llvm-project/pull/132266 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits