CommandLineInterface: Disallow --yul-dialect and --machine when not in assembly mode

This commit is contained in:
Kamil Śliwak
2020-06-15 17:12:51 +02:00
parent 8396002fe7
commit 0d7b3ae503
5 changed files with 17 additions and 0 deletions
+7
View File
@@ -1289,6 +1289,13 @@ bool CommandLineInterface::processInput()
return assemble(inputLanguage, targetMachine, optimize, yulOptimiserSteps);
}
else if (countEnabledOptions({g_strYulDialect, g_argMachine}) >= 1)
{
serr() << "--" << g_strYulDialect << " and --" << g_argMachine << " ";
serr() << "are only valid in assembly mode." << endl;
return false;
}
if (m_args.count(g_argLink))
{
// switch to linker mode
@@ -0,0 +1 @@
--yul-dialect evm --machine ewasm
@@ -0,0 +1 @@
--yul-dialect and --machine are only valid in assembly mode.
@@ -0,0 +1 @@
1
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C
{
function f() public pure {}
}