Give error that options are exclusive
authorMiodrag Milanovic <mmicko@gmail.com>
Mon, 29 Jun 2020 12:45:49 +0000 (14:45 +0200)
committerMiodrag Milanovic <mmicko@gmail.com>
Mon, 29 Jun 2020 12:45:49 +0000 (14:45 +0200)
passes/sat/expose.cc

index 20b8536fc183c3d02459c15a01cb14467d39be14..2c65821cfd810d85642ce0b273d1275db447033c 100644 (file)
@@ -281,11 +281,15 @@ struct ExposePass : public Pass {
                                flag_dff = true;
                                continue;
                        }
-                       if (args[argidx] == "-cut" && !flag_input) {
+                       if (args[argidx] == "-cut") {
+                               if (flag_input)
+                                       log_cmd_error("Options -cut and -input are mutually exclusive.\n");
                                flag_cut = true;
                                continue;
                        }
-                       if (args[argidx] == "-input" && !flag_cut) {
+                       if (args[argidx] == "-input") {
+                               if (flag_cut)
+                                       log_cmd_error("Options -cut and -input are mutually exclusive.\n");
                                flag_input = true;
                                continue;
                        }