summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/AsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/IR/AsmPrinter.cpp')
-rw-r--r--mlir/lib/IR/AsmPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp
index b798e3890a0..58f34af60f5 100644
--- a/mlir/lib/IR/AsmPrinter.cpp
+++ b/mlir/lib/IR/AsmPrinter.cpp
@@ -206,7 +206,7 @@ void ModuleState::visitForStmt(const ForStmt *forStmt) {
if (!hasShorthandForm(ubMap))
recordAffineMapReference(ubMap);
- for (auto &childStmt : *forStmt)
+ for (auto &childStmt : *forStmt->getBody())
visitStatement(&childStmt);
}
@@ -1447,7 +1447,7 @@ void MLFunctionPrinter::print(const ForStmt *stmt) {
os << " step " << stmt->getStep();
os << " {\n";
- print(static_cast<const StmtBlock *>(stmt));
+ print(stmt->getBody());
os.indent(numSpaces) << "}";
}
OpenPOWER on IntegriCloud