summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-06-07 16:48:47 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-06-07 16:53:17 -0400
commit527d49a18979bc04992af5864034af57495a2f0b (patch)
treecc4d4a404bf0e0f5840f7cb217c8a2c8ad0fcf61
parent8896f35294649975c1df22a8b57db4333cc56091 (diff)
downloadbfs-527d49a18979bc04992af5864034af57495a2f0b.tar.xz
opt: Dump the command line before optimizing with -D opt
-rw-r--r--opt.c2
-rw-r--r--parse.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/opt.c b/opt.c
index e305588..14996f2 100644
--- a/opt.c
+++ b/opt.c
@@ -984,6 +984,8 @@ static struct expr *optimize_expr(struct opt_state *state, struct expr *expr) {
}
int optimize_cmdline(struct cmdline *cmdline) {
+ dump_cmdline(cmdline, DEBUG_OPT);
+
struct opt_facts facts_when_impure;
set_facts_impossible(&facts_when_impure);
diff --git a/parse.c b/parse.c
index 4fc06e1..7914363 100644
--- a/parse.c
+++ b/parse.c
@@ -3467,12 +3467,12 @@ void dump_cmdline(const struct cmdline *cmdline, enum debug_flags flag) {
if (flag == DEBUG_RATES) {
if (cmdline->exclude != &expr_false) {
- cfprintf(cerr, "${red}-exclude${rs} %pE ", cmdline->exclude);
+ cfprintf(cerr, "(${red}-exclude${rs} %pE) ", cmdline->exclude);
}
cfprintf(cerr, "%pE", cmdline->expr);
} else {
if (cmdline->exclude != &expr_false) {
- cfprintf(cerr, "${red}-exclude${rs} %pe ", cmdline->exclude);
+ cfprintf(cerr, "(${red}-exclude${rs} %pe) ", cmdline->exclude);
}
cfprintf(cerr, "%pe", cmdline->expr);
}