[Mlir-commits] [mlir] 72619d1 - [mlir][ods] NFC fix tblgen crash with empty assembly format
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Feb 8 13:14:08 PST 2022
Author: Mogball
Date: 2022-02-08T21:13:58Z
New Revision: 72619d101fda15a98b8f406e6009c5da06e3f835
URL: https://github.com/llvm/llvm-project/commit/72619d101fda15a98b8f406e6009c5da06e3f835
DIFF: https://github.com/llvm/llvm-project/commit/72619d101fda15a98b8f406e6009c5da06e3f835.diff
LOG: [mlir][ods] NFC fix tblgen crash with empty assembly format
Added:
Modified:
mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
index d697ad2b4ea4..2a1fcf936237 100644
--- a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
+++ b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
@@ -812,6 +812,8 @@ LogicalResult DefFormatParser::verify(SMLoc loc,
it.value().getName());
}
}
+ if (elements.empty())
+ return success();
// A `struct` directive that contains optional parameters cannot be followed
// by a comma literal, which is ambiguous.
for (auto it : llvm::zip(elements.drop_back(), elements.drop_front())) {
More information about the Mlir-commits
mailing list