forked from OSchip/llvm-project
[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:
parent
f09d220c71
commit
be88ba09d5
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue