Skip to content

Commit cf8c730

Browse files
committed
Fix LinalgOps build error on older clang versions
As reported in the PR llvm#123618, 0d4efa2 included a construction of a `FailureOr` object with a `nullptr`, which didn't work in at least clang-10. This patch changes it into a constructor call instead of a brace-init call so that it is unambiguous.
1 parent 1a314b2 commit cf8c730

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3533,7 +3533,8 @@ bool MatmulOp::isValidLhsRhsBroadcastMap(AffineMap bcastMap) {
35333533

35343534
FailureOr<ArrayAttr> parseIndexingMapsAttr(OpAsmParser &parser) {
35353535
if (parser.parseOptionalKeyword("indexing_maps"))
3536-
return {nullptr}; // Success in case indexing_maps was not provided.
3536+
return ArrayAttr{
3537+
nullptr}; // Success in case indexing_maps was not provided.
35373538

35383539
ArrayAttr arrayAttr;
35393540
if (parser.parseEqual() || parser.parseAttribute(arrayAttr))

0 commit comments

Comments
 (0)