Mark viaIR code generation as non-experimental.

This commit is contained in:
Daniel Kirchner
2022-03-14 14:48:00 +01:00
parent 3f6beaa0ad
commit e58c0b561d
48 changed files with 63 additions and 407 deletions
+3 -3
View File
@@ -339,7 +339,7 @@ function test_via_ir_equivalence()
)
asm_output_via_ir=$(
echo "$solidity_code" |
msg_on_error --no-stderr "$SOLC" - --experimental-via-ir --asm --debug-info location "${optimizer_flags[@]}" |
msg_on_error --no-stderr "$SOLC" - --via-ir --asm --debug-info location "${optimizer_flags[@]}" |
sed '/^======= <stdin>/d' |
sed '/^EVM assembly:$/d'
)
@@ -355,7 +355,7 @@ function test_via_ir_equivalence()
)
bin_output_via_ir=$(
echo "$solidity_code" |
msg_on_error --no-stderr "$SOLC" - --experimental-via-ir --bin "${optimizer_flags[@]}" |
msg_on_error --no-stderr "$SOLC" - --via-ir --bin "${optimizer_flags[@]}" |
sed '/^======= <stdin>/d' |
sed '/^Binary:$/d'
)
@@ -588,7 +588,7 @@ printTask "Testing assemble, yul, strict-assembly and optimize..."
test_solc_assembly_output "{ let x := 0 }" "{ { } }" "--strict-assembly --optimize"
)
printTask "Testing the eqivalence of --experimental-via-ir and a two-stage compilation..."
printTask "Testing the eqivalence of --via-ir and a two-stage compilation..."
(
printTask " - Smoke test"
test_via_ir_equivalence "contract C {}"
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"constant_optimizer_yul/input.sol"
object "C_12" {
code {
@@ -54,13 +54,6 @@ sub_0: assembly {
}
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_and_evm_asm_print_all/input.sol"
object "C_6" {
@@ -176,13 +169,6 @@ object "C_6" {
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_and_evm_asm_print_all/input.sol"
object "C_6" {
code {
@@ -54,13 +54,6 @@ sub_0: assembly {
}
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_and_evm_asm_print_location_only/input.sol"
object "C_6" {
@@ -175,13 +168,6 @@ object "C_6" {
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_and_evm_asm_print_location_only/input.sol"
object "C_6" {
code {
@@ -51,13 +51,6 @@ sub_0: assembly {
}
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_and_evm_asm_print_none/input.sol"
object "C_6" {
@@ -166,13 +159,6 @@ object "C_6" {
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_and_evm_asm_print_none/input.sol"
object "C_6" {
code {
@@ -1,11 +1,4 @@
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_snippet_escaping/input.sol"
object "C_2" {
@@ -70,13 +63,6 @@ object "C_2" {
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_snippet_escaping/input.sol"
object "C_2" {
code {
@@ -103,13 +89,6 @@ object "C_2" {
}
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_snippet_escaping/input.sol"
object "D_27" {
@@ -367,12 +346,6 @@ object "D_27" {
/// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..."
}
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_snippet_escaping/input.sol"
object "C_2" {
@@ -442,13 +415,6 @@ object "D_27" {
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_snippet_escaping/input.sol"
object "D_27" {
code {
@@ -1,11 +1,4 @@
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"exp_base_literal/input.sol"
object "C_81" {
@@ -1 +1 @@
--experimental-via-ir --optimize --combined-json function-debug,function-debug-runtime --pretty-json
--via-ir --optimize --combined-json function-debug,function-debug-runtime --pretty-json
@@ -1 +1 @@
--experimental-via-ir --combined-json function-debug-runtime --pretty-json --json-indent 4
--via-ir --combined-json function-debug-runtime --pretty-json --json-indent 4
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"ir_compiler_inheritance_nosubobjects/input.sol"
object "C_7" {
code {
@@ -32,13 +25,6 @@ object "C_7" {
}
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"ir_compiler_inheritance_nosubobjects/input.sol"
object "D_10" {
code {
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"ir_compiler_subobjects/input.sol"
object "C_3" {
code {
@@ -32,13 +25,6 @@ object "C_3" {
}
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"ir_compiler_subobjects/input.sol"
object "D_16" {
code {
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"ir_with_assembly_no_memoryguard_creation/input.sol"
object "D_12" {
code {
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"ir_with_assembly_no_memoryguard_runtime/input.sol"
object "D_8" {
code {
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"keccak_optimization_deploy_code/input.sol"
object "C_12" {
code {
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"keccak_optimization_low_runs/input.sol"
object "C_7" {
code {
-7
View File
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"name_simplifier/input.sol"
object "C_59" {
code {
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"optimizer_array_sload/input.sol"
object "Arraysum_34" {
code {
-7
View File
@@ -1,11 +1,4 @@
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"revert_strings/input.sol"
object "C_15" {
@@ -60,14 +60,7 @@ sub_0: assembly {
}
"
},
"ir": "/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
"ir": "
/// @use-src 0:\"C\"
object \"C_6\" {
code {
@@ -181,14 +174,7 @@ object \"C_6\" {
}
",
"irOptimized": "/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"C\"
"irOptimized": "/// @use-src 0:\"C\"
object \"C_6\" {
code {
{
@@ -60,14 +60,7 @@ sub_0: assembly {
}
"
},
"ir": "/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
"ir": "
/// @use-src 0:\"C\"
object \"C_6\" {
code {
@@ -180,14 +173,7 @@ object \"C_6\" {
}
",
"irOptimized": "/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"C\"
"irOptimized": "/// @use-src 0:\"C\"
object \"C_6\" {
code {
{
@@ -57,14 +57,7 @@ sub_0: assembly {
}
"
},
"ir": "/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
"ir": "
/// @use-src 0:\"C\"
object \"C_6\" {
code {
@@ -171,14 +164,7 @@ object \"C_6\" {
}
",
"irOptimized": "/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"C\"
"irOptimized": "/// @use-src 0:\"C\"
object \"C_6\" {
code {
{
@@ -1,11 +1,4 @@
{"contracts":{"C":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"C":{"C":{"ir":"
/// @use-src 0:\"C\"
object \"C_54\" {
code {
@@ -609,14 +602,7 @@ object \"C_54\" {
}
","irOptimized":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"C\"
","irOptimized":"/// @use-src 0:\"C\"
object \"C_54\" {
code {
{
@@ -776,14 +762,7 @@ object \"C_54\" {
data \".metadata\" hex\"<BYTECODE REMOVED>\"
}
}
"}},"D":{"D":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
"}},"D":{"D":{"ir":"
/// @use-src 0:\"C\", 1:\"D\"
object \"D_72\" {
code {
@@ -1455,14 +1434,7 @@ object \"D_72\" {
}
","irOptimized":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"C\", 1:\"D\"
","irOptimized":"/// @use-src 0:\"C\", 1:\"D\"
object \"D_72\" {
code {
{
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"irOptimized":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"A\"
{"contracts":{"A":{"C":{"irOptimized":"/// @use-src 0:\"A\"
object \"C_7\" {
code {
/// @src 0:79:121 \"contract C { function f() public pure {} }\"
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"ir":"
/// @use-src 0:\"A\"
object \"C_7\" {
code {
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"evm":{"bytecode":{"generatedSources":[],"object":"<BYTECODE REMOVED>"},"deployedBytecode":{"object":"<BYTECODE REMOVED>"}},"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"evm":{"bytecode":{"generatedSources":[],"object":"<BYTECODE REMOVED>"},"deployedBytecode":{"object":"<BYTECODE REMOVED>"}},"ir":"
/// @use-src 0:\"A\"
object \"C_3\" {
code {
@@ -67,14 +60,7 @@ object \"C_3\" {
}
"},"D":{"evm":{"bytecode":{"generatedSources":[],"object":"<BYTECODE REMOVED>"},"deployedBytecode":{"object":"<BYTECODE REMOVED>"}},"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
"},"D":{"evm":{"bytecode":{"generatedSources":[],"object":"<BYTECODE REMOVED>"},"deployedBytecode":{"object":"<BYTECODE REMOVED>"}},"ir":"
/// @use-src 0:\"A\"
object \"D_16\" {
code {
@@ -207,12 +193,6 @@ object \"D_16\" {
/// @src 0:93:146 \"contract D { function f() public { C c = new C(); } }\"
}
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"A\"
object \"C_3\" {
@@ -1,11 +1,4 @@
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"viair_abicoder_v1/input.sol"
object "test_11" {
+1 -1
View File
@@ -1 +1 @@
--ir-optimized --experimental-via-ir --optimize --bin --bin-runtime
--ir-optimized --via-ir --optimize --bin --bin-runtime
-14
View File
@@ -5,13 +5,6 @@ Binary:
Binary of the runtime part:
<BYTECODE REMOVED>
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"viair_subobjects/input.sol"
object "C_3" {
code {
@@ -44,13 +37,6 @@ Binary:
Binary of the runtime part:
<BYTECODE REMOVED>
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"viair_subobjects/input.sol"
object "D_16" {
code {
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"yul_optimizer_steps/input.sol"
object "C_7" {
code {
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"yul_optimizer_steps_nested_brackets/input.sol"
object "C_6" {
code {
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"ir":"
/// @use-src 0:\"A\"
object \"C_11\" {
code {
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"ir":"
/// @use-src 0:\"A\"
object \"C_11\" {
code {
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"ir":"
/// @use-src 0:\"A\"
object \"C_11\" {
code {
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"ir":"
/// @use-src 0:\"A\"
object \"C_11\" {
code {
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"ir":"
/// @use-src 0:\"A\"
object \"C_11\" {
code {
+1 -7
View File
@@ -373,13 +373,7 @@ BOOST_AUTO_TEST_CASE(metadata_viair)
CompilerStack::MetadataFormat::WithReleaseVersionTag
);
if (_viaIR)
{
BOOST_CHECK(parsedCBORMetadata.count("experimental") == 1);
BOOST_CHECK(parsedCBORMetadata.at("experimental") == "true");
}
else
BOOST_CHECK(parsedCBORMetadata.count("experimental") == 0);
BOOST_CHECK(parsedCBORMetadata.count("experimental") == 0);
};
check(sourceCode, true);
+11 -2
View File
@@ -120,6 +120,7 @@ BOOST_AUTO_TEST_CASE(cli_mode_options)
"--output-dir=/tmp/out",
"--overwrite",
"--evm-version=spuriousDragon",
"--via-ir",
"--experimental-via-ir",
"--revert-strings=strip",
"--debug-info=location",
@@ -175,7 +176,7 @@ BOOST_AUTO_TEST_CASE(cli_mode_options)
expectedOptions.output.dir = "/tmp/out";
expectedOptions.output.overwriteFiles = true;
expectedOptions.output.evmVersion = EVMVersion::spuriousDragon();
expectedOptions.output.experimentalViaIR = true;
expectedOptions.output.viaIR = true;
expectedOptions.output.revertStrings = RevertStrings::Strip;
expectedOptions.output.debugInfoSelection = DebugInfoSelection::fromString("location");
expectedOptions.formatting.json = JsonFormat{JsonFormat::Pretty, 7};
@@ -223,6 +224,13 @@ BOOST_AUTO_TEST_CASE(cli_mode_options)
}
}
BOOST_AUTO_TEST_CASE(via_ir_options)
{
BOOST_TEST(!parseCommandLine({"solc", "contract.sol"}).output.viaIR);
for (string viaIrOption: {"--via-ir", "--experimental-via-ir"})
BOOST_TEST(parseCommandLine({"solc", viaIrOption, "contract.sol"}).output.viaIR);
}
BOOST_AUTO_TEST_CASE(assembly_mode_options)
{
static vector<tuple<vector<string>, AssemblyStack::Machine, AssemblyStack::Language>> const allowedCombinations = {
@@ -415,7 +423,8 @@ BOOST_AUTO_TEST_CASE(invalid_options_input_modes_combinations)
map<string, vector<string>> invalidOptionInputModeCombinations = {
// TODO: This should eventually contain all options.
{"--error-recovery", {"--assemble", "--yul", "--strict-assembly", "--standard-json", "--link"}},
{"--experimental-via-ir", {"--assemble", "--yul", "--strict-assembly", "--standard-json", "--link"}}
{"--experimental-via-ir", {"--assemble", "--yul", "--strict-assembly", "--standard-json", "--link"}},
{"--via-ir", {"--assemble", "--yul", "--strict-assembly", "--standard-json", "--link"}}
};
for (auto const& [optionName, inputModes]: invalidOptionInputModeCombinations)