Skip to content

Commit 07665e7

Browse files
committed
[mlir] Fix forward the fix for incorrect Optional<ArrayAttr> usage.
1 parent b1e9c43 commit 07665e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Dialect/SCF/IR/SCF.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,8 +1114,8 @@ LogicalResult ForeachThreadOp::verify() {
11141114
if (body->getArgument(i + getRank()).getType() != getOutputs()[i].getType())
11151115
return emitOpError("type mismatch between ")
11161116
<< i << "-th output and corresponding block argument";
1117-
if (getMapping()->getValue())
1118-
for (auto map : getMapping().value()) {
1117+
if (getMapping().has_value())
1118+
for (auto map : getMapping()->getValue()) {
11191119
if (!isa<DeviceMappingAttrInterface>(map))
11201120
return emitOpError()
11211121
<< getMappingAttrName() << " is not device mapping attribute";

0 commit comments

Comments
 (0)