diff options
author | chriseth <chris@ethereum.org> | 2016-10-25 22:26:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-25 22:26:47 +0800 |
commit | 4f1b5d26f7942117b44f199b0e73ce648b90bafb (patch) | |
tree | 76dc6b55cf7c5ff4efc6cd5edf46cec40393a6da | |
parent | f99a418bf8828dc170b40ca9d0061b6a32488c48 (diff) | |
parent | 0da309d460c77277135cffcaa8b2bf75976d3869 (diff) | |
download | dexon-solidity-4f1b5d26f7942117b44f199b0e73ce648b90bafb.tar dexon-solidity-4f1b5d26f7942117b44f199b0e73ce648b90bafb.tar.gz dexon-solidity-4f1b5d26f7942117b44f199b0e73ce648b90bafb.tar.bz2 dexon-solidity-4f1b5d26f7942117b44f199b0e73ce648b90bafb.tar.lz dexon-solidity-4f1b5d26f7942117b44f199b0e73ce648b90bafb.tar.xz dexon-solidity-4f1b5d26f7942117b44f199b0e73ce648b90bafb.tar.zst dexon-solidity-4f1b5d26f7942117b44f199b0e73ce648b90bafb.zip |
Merge pull request #1276 from ethereum/lll-optimise
LLL: clean up the handling of the optimise flag
-rw-r--r-- | lllc/main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lllc/main.cpp b/lllc/main.cpp index 06611af0..f8677be0 100644 --- a/lllc/main.cpp +++ b/lllc/main.cpp @@ -41,6 +41,7 @@ void help() << " -x,--hex Parse, compile and assemble; output byte code in hex." << endl << " -a,--assembly Only parse and compile; show assembly." << 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 << " -V,--version Show the version and exit." << endl; exit(0); @@ -81,7 +82,7 @@ enum Mode { Binary, Hex, Assembly, ParseTree, Disassemble }; int main(int argc, char** argv) { setDefaultOrCLocale(); - unsigned optimise = 1; + unsigned optimise = 0; string infile; Mode mode = Hex; @@ -98,8 +99,8 @@ int main(int argc, char** argv) mode = Assembly; else if (arg == "-t" || arg == "--parse-tree") mode = ParseTree; - else if ((arg == "-o" || arg == "--optimise") && argc > i + 1) - optimise = atoi(argv[++i]); + else if (arg == "-o" || arg == "--optimise") + optimise = 1; else if (arg == "-d" || arg == "--disassemble") mode = Disassemble; else if (arg == "-V" || arg == "--version") |