mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1276 from ethereum/lll-optimise
LLL: clean up the handling of the optimise flag
This commit is contained in:
commit
4f1b5d26f7
@ -41,6 +41,7 @@ void help()
|
|||||||
<< " -x,--hex Parse, compile and assemble; output byte code in hex." << endl
|
<< " -x,--hex Parse, compile and assemble; output byte code in hex." << endl
|
||||||
<< " -a,--assembly Only parse and compile; show assembly." << endl
|
<< " -a,--assembly Only parse and compile; show assembly." << endl
|
||||||
<< " -t,--parse-tree Only parse; show parse tree." << endl
|
<< " -t,--parse-tree Only parse; show parse tree." << endl
|
||||||
|
<< " -o,--optimise Turn on/off the optimiser; off by default." << endl
|
||||||
<< " -h,--help Show this help message and exit." << endl
|
<< " -h,--help Show this help message and exit." << endl
|
||||||
<< " -V,--version Show the version and exit." << endl;
|
<< " -V,--version Show the version and exit." << endl;
|
||||||
exit(0);
|
exit(0);
|
||||||
@ -81,7 +82,7 @@ enum Mode { Binary, Hex, Assembly, ParseTree, Disassemble };
|
|||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
setDefaultOrCLocale();
|
setDefaultOrCLocale();
|
||||||
unsigned optimise = 1;
|
unsigned optimise = 0;
|
||||||
string infile;
|
string infile;
|
||||||
Mode mode = Hex;
|
Mode mode = Hex;
|
||||||
|
|
||||||
@ -98,8 +99,8 @@ int main(int argc, char** argv)
|
|||||||
mode = Assembly;
|
mode = Assembly;
|
||||||
else if (arg == "-t" || arg == "--parse-tree")
|
else if (arg == "-t" || arg == "--parse-tree")
|
||||||
mode = ParseTree;
|
mode = ParseTree;
|
||||||
else if ((arg == "-o" || arg == "--optimise") && argc > i + 1)
|
else if (arg == "-o" || arg == "--optimise")
|
||||||
optimise = atoi(argv[++i]);
|
optimise = 1;
|
||||||
else if (arg == "-d" || arg == "--disassemble")
|
else if (arg == "-d" || arg == "--disassemble")
|
||||||
mode = Disassemble;
|
mode = Disassemble;
|
||||||
else if (arg == "-V" || arg == "--version")
|
else if (arg == "-V" || arg == "--version")
|
||||||
|
Loading…
Reference in New Issue
Block a user