[Mlir-commits] [mlir] 07665e7 - [mlir] Fix forward the fix for incorrect Optional<ArrayAttr> usage.
Alexander Belyaev
llvmlistbot at llvm.org
Fri Nov 11 01:53:29 PST 2022
Author: Alexander Belyaev
Date: 2022-11-11T10:53:04+01:00
New Revision: 07665e78cb6008537e1ce6f5606d9838612d32fe
URL: https://github.com/llvm/llvm-project/commit/07665e78cb6008537e1ce6f5606d9838612d32fe
DIFF: https://github.com/llvm/llvm-project/commit/07665e78cb6008537e1ce6f5606d9838612d32fe.diff
LOG: [mlir] Fix forward the fix for incorrect Optional<ArrayAttr> usage.
Added:
Modified:
mlir/lib/Dialect/SCF/IR/SCF.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SCF/IR/SCF.cpp b/mlir/lib/Dialect/SCF/IR/SCF.cpp
index 0cca4bcbb0ec..6a85fb64d3d0 100644
--- a/mlir/lib/Dialect/SCF/IR/SCF.cpp
+++ b/mlir/lib/Dialect/SCF/IR/SCF.cpp
@@ -1114,8 +1114,8 @@ LogicalResult ForeachThreadOp::verify() {
if (body->getArgument(i + getRank()).getType() != getOutputs()[i].getType())
return emitOpError("type mismatch between ")
<< i << "-th output and corresponding block argument";
- if (getMapping()->getValue())
- for (auto map : getMapping().value()) {
+ if (getMapping().has_value())
+ for (auto map : getMapping()->getValue()) {
if (!isa<DeviceMappingAttrInterface>(map))
return emitOpError()
<< getMappingAttrName() << " is not device mapping attribute";
More information about the Mlir-commits
mailing list