[NFC] Make assertion more informative.

This assert just caught me, and this improved message would have saved
me some time.
This commit is contained in:
Sean Silva 2020-05-21 13:10:38 -07:00
parent f09d220c71
commit be88ba09d5
1 changed files with 1 additions and 1 deletions

View File

@ -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)