From 405b4e97a1302340e648b06cc8a1bb11e34db806 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 29 Jun 2020 14:45:49 +0200 Subject: [PATCH] Give error that options are exclusive --- passes/sat/expose.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/passes/sat/expose.cc b/passes/sat/expose.cc index 20b8536fc..2c65821cf 100644 --- a/passes/sat/expose.cc +++ b/passes/sat/expose.cc @@ -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; } -- 2.30.2