Skip to content

Commit

Permalink
[Command] Fix command -S
Browse files Browse the repository at this point in the history
  • Loading branch information
XChy committed Jun 27, 2024
1 parent 4d59669 commit 8e6f257
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions nnvm/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@ static int optimizationLevel;

void parseArgs(int argc, char **argv) {
static struct option options[] = {
{"dump-ir" , no_argument , nullptr , 'i'},
{"dump-opt-ir" , no_argument , nullptr , 'I'},
{"dump-asm" , no_argument , nullptr , 'a'},
{"O" , required_argument , nullptr , 'O'},
{"backend" , required_argument , nullptr , 'b'},
{nullptr , no_argument , nullptr , 'o'},
{nullptr , no_argument , nullptr , '\0'}};
{"dump-ir", no_argument, nullptr, 'i'},
{"dump-opt-ir", no_argument, nullptr, 'I'},
{"dump-asm", no_argument, nullptr, 'a'},
{"O", required_argument, nullptr, 'O'},
{"backend", required_argument, nullptr, 'b'},
{nullptr, no_argument, nullptr, 'o'},
{nullptr, no_argument, nullptr, '\0'}};
int opt;
while ((opt = getopt_long_only(argc, argv, "b:o:O:", options, nullptr)) != -1) {
while ((opt = getopt_long_only(argc, argv, "Sb:o:O:", options, nullptr)) !=
-1) {
switch (opt) {
case 'i':
dumpIR = true;
Expand All @@ -53,6 +54,8 @@ void parseArgs(int argc, char **argv) {
case 'a':
dumpAssembly = true;
break;
case 'S':
break;
case 'O':
optimizationLevel = std::stoi(optarg);
break;
Expand Down

0 comments on commit 8e6f257

Please sign in to comment.