Skip to content

Commit

Permalink
Fix LinalgOps build error on older clang versions
Browse files Browse the repository at this point in the history
As reported in the PR #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.
  • Loading branch information
erichkeane committed Jan 31, 2025
1 parent 1a314b2 commit cf8c730
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3533,7 +3533,8 @@ bool MatmulOp::isValidLhsRhsBroadcastMap(AffineMap bcastMap) {

FailureOr<ArrayAttr> parseIndexingMapsAttr(OpAsmParser &parser) {
if (parser.parseOptionalKeyword("indexing_maps"))
return {nullptr}; // Success in case indexing_maps was not provided.
return ArrayAttr{
nullptr}; // Success in case indexing_maps was not provided.

ArrayAttr arrayAttr;
if (parser.parseEqual() || parser.parseAttribute(arrayAttr))
Expand Down

0 comments on commit cf8c730

Please sign in to comment.