[Mlir-commits] [mlir] be88ba0 - [NFC] Make assertion more informative.
Sean Silva
llvmlistbot at llvm.org
Thu May 21 13:36:44 PDT 2020
Author: Sean Silva
Date: 2020-05-21T13:36:21-07:00
New Revision: be88ba09d59112b2df25a35f906e55026fa93128
URL: https://github.com/llvm/llvm-project/commit/be88ba09d59112b2df25a35f906e55026fa93128
DIFF: https://github.com/llvm/llvm-project/commit/be88ba09d59112b2df25a35f906e55026fa93128.diff
LOG: [NFC] Make assertion more informative.
This assert just caught me, and this improved message would have saved
me some time.
Added:
Modified:
mlir/include/mlir/IR/Matchers.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/IR/Matchers.h b/mlir/include/mlir/IR/Matchers.h
index 78662068f158..0f74f1b9cd43 100644
--- a/mlir/include/mlir/IR/Matchers.h
+++ b/mlir/include/mlir/IR/Matchers.h
@@ -72,7 +72,7 @@ template <typename AttrT> struct constant_op_binder {
SmallVector<OpFoldResult, 1> foldedOp;
LogicalResult result = op->fold(/*operands=*/llvm::None, foldedOp);
(void)result;
- assert(succeeded(result) && "expected constant to be foldable");
+ assert(succeeded(result) && "expected ConstantLike op to be foldable");
if (auto attr = foldedOp.front().get<Attribute>().dyn_cast<AttrT>()) {
if (bind_value)
More information about the Mlir-commits
mailing list