projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f09d220
)
[NFC] Make assertion more informative.
author
Sean Silva
<silvasean@google.com>
Thu, 21 May 2020 20:10:38 +0000
(13:10 -0700)
committer
Sean Silva
<silvasean@google.com>
Thu, 21 May 2020 20:36:21 +0000
(13:36 -0700)
This assert just caught me, and this improved message would have saved
me some time.
mlir/include/mlir/IR/Matchers.h
patch
|
blob
|
history
diff --git
a/mlir/include/mlir/IR/Matchers.h
b/mlir/include/mlir/IR/Matchers.h
index
7866206
..
0f74f1b
100644
(file)
--- 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)