Add --asm-json option in assembler mode
Extracted from https://github.com/ethereum/solidity/pull/13673 based on this comment https://github.com/ethereum/solidity/pull/13673#discussion_r1349334677
Only took a cursory look, but I think you're missing tests in test/solc/CommandLineParser.cpp and test/solc/CommandLineInterface.cpp.
edit: Actually, perhaps not CommandLineParser since the option is already there.
Only took a cursory look, but I think you're missing tests in
test/solc/CommandLineParser.cppandtest/solc/CommandLineInterface.cpp.edit: Actually, perhaps not CommandLineParser since the option is already there.
Good point. The option is there in the CommandLineParser tests, but not for the assembler mode. I will add it ;)
About the CommandLineInterface tests, I guess it is not needed, is it? There is already command-line tests to check the output. Or do you mean to add a unit test for the collectYulSourceIndices?
@r0qs fix the changelog, and I'll approve.
@cameel I think I addressed now everything except https://github.com/ethereum/solidity/pull/14612#discussion_r1483457495 - lets really just do it in a separate PR. So lets do a final review! I will squash the commits after that.
Sorry, I just saw now that the the tests where failing here. Will fix that.
Ok, I guess there is still one thing: I just noticed that the assembly json is always generated, even if it was not requested. I guess this need to be changed and then this PR should be ready.