diff options
author | Markus Böck <markus.boeck02@gmail.com> | 2024-12-04 09:36:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-04 09:36:05 +0100 |
commit | 2a30bfcef368667247ebbe30be84f73b92dbe800 (patch) | |
tree | dea529a88769e748ab54e21664018e0c33edbbe7 /llvm/lib/CodeGen/CodeGen.cpp | |
parent | 455b4fd01ae9b2a78be98bcd26db2b700709c545 (diff) | |
download | llvm-2a30bfcef368667247ebbe30be84f73b92dbe800.zip llvm-2a30bfcef368667247ebbe30be84f73b92dbe800.tar.gz llvm-2a30bfcef368667247ebbe30be84f73b92dbe800.tar.bz2 |
[mlir] Improve error message when number of operands and types differ (#118488)
If using a variadic operand, the error message given if the number of
types and operands do not match would be along the lines of:
```
3 operands present, but expected 2
```
This error message is confusing for multiple reasons, particular for
beginners:
* If the intention is to have 3 operands, it does not point out why it
expects 2. The user may actually just want to add a type to the type
list
* It reads as if a verifier error rather than a parser error, giving the
impression the Op only supports 2 operands.
This PR attempts to improve the error message by first noting the issue
("number of operands and types mismatch") and mentioning how many
operands and types it received.
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions