summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/Module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/IR/Module.cpp')
-rw-r--r--mlir/lib/IR/Module.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/IR/Module.cpp b/mlir/lib/IR/Module.cpp
index 9f3bdaa854c..f55f960ffa2 100644
--- a/mlir/lib/IR/Module.cpp
+++ b/mlir/lib/IR/Module.cpp
@@ -87,7 +87,7 @@ LogicalResult ModuleOp::verify() {
auto &bodyRegion = getOperation()->getRegion(0);
// The body must contain a single basic block.
- if (bodyRegion.empty() || std::next(bodyRegion.begin()) != bodyRegion.end())
+ if (!has_single_element(bodyRegion))
return emitOpError("expected body region to have a single block");
// Check that the body has no block arguments.
OpenPOWER on IntegriCloud