diff options
Diffstat (limited to 'mlir/lib/IR/Statement.cpp')
| -rw-r--r-- | mlir/lib/IR/Statement.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mlir/lib/IR/Statement.cpp b/mlir/lib/IR/Statement.cpp index 69afc5c1e98..f63c76605de 100644 --- a/mlir/lib/IR/Statement.cpp +++ b/mlir/lib/IR/Statement.cpp @@ -338,7 +338,7 @@ ForStmt::ForStmt(Location location, unsigned numOperands, AffineMap lbMap, : Statement(Kind::For, location), MLValue(MLValueKind::ForStmt, Type::getIndex(lbMap.getResult(0).getContext())), - StmtBlock(StmtBlockKind::For), lbMap(lbMap), ubMap(ubMap), step(step) { + body(this), lbMap(lbMap), ubMap(ubMap), step(step) { operands.reserve(numOperands); } @@ -544,8 +544,8 @@ Statement *Statement::clone(DenseMap<const MLValue *, MLValue *> &operandMap, operandMap[forStmt] = newFor; // Recursively clone the body of the for loop. - for (auto &subStmt : *forStmt) - newFor->push_back(subStmt.clone(operandMap, context)); + for (auto &subStmt : *forStmt->getBody()) + newFor->getBody()->push_back(subStmt.clone(operandMap, context)); return newFor; } |

