Do not remove custom errors in IR codegen when strip revert strings is requested#16466
Conversation
revert-strings strip is requestedrevert-strings strip is requested
revert-strings strip is requestedrevert-strings=strip is requested
|
We need to also adjust documentation as a part of this issue. And consider changing the option or value names to make it more intuitive. |
nikola-matic
left a comment
There was a problem hiding this comment.
The asm output test is definitely necessary, but please add more semantic test coverage; there's the // revertStrings: strip option for this.
4913b7d to
8450ab7
Compare
revert-strings=strip is requestedf3491de to
1de843a
Compare
rodiazet
left a comment
There was a problem hiding this comment.
LGTM in general. I found a couple of small issues mainly with test coverage. There is also one question I have regarding the way how the old version worked.
| { | ||
| auto const& errorConstructorCall = dynamic_cast<FunctionCall const&>(*arguments[1]); | ||
| appendCode() << m_utils.requireWithErrorFunction(errorConstructorCall) << "(" <<IRVariable(*arguments[0]).name(); | ||
| for (auto argument: errorConstructorCall.arguments()) |
There was a problem hiding this comment.
Does it make sense to add test case where there is zero custom error arguments to make sure that this corner case (zero for loop iterations) also works properly?
error MyError(); require(false, MyError()) and probably error MyError(); require(true, MyError())
1de843a to
f761ded
Compare
5efedf8 to
2da7710
Compare
|
I think I addressed all corrections and suggestions. |
clonker
left a comment
There was a problem hiding this comment.
It looks good to me and as far as I can tell, all reviewer comments have been addressed. Two tiny suggestions, feel free to ignore. I guess @nikola-matic and/or @rodiazet might want to check that for their own comments, too. Not sure if @cameel wants to have a look before this goes in.
Yes, I was planning to take a look. |
8815e6f to
bd6acbd
Compare
bd6acbd to
5fc923f
Compare
7d54e84 to
bf021b3
Compare
2c60489 to
03486ef
Compare
Fix #16465.