diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-11-10 09:55:55 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-11-10 09:55:55 -0500 |
commit | 7c79c741bf8ef87d269c470867cfa77637be8b8f (patch) | |
tree | e34346e703f31f74119a842f9a6be2a575f9aa20 /opt.c | |
parent | 68c96e0b44932196920c2d3f05d5f873e1db69dc (diff) | |
download | bfs-7c79c741bf8ef87d269c470867cfa77637be8b8f.tar.xz |
opt: Assert that we don't do disabled optimizations
Diffstat (limited to 'opt.c')
-rw-r--r-- | opt.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -317,6 +317,8 @@ struct opt_state { /** Log an optimization. */ BFS_FORMATTER(3, 4) static bool debug_opt(const struct opt_state *state, int level, const char *format, ...) { + assert(state->ctx->optlevel >= level); + if (bfs_debug(state->ctx, DEBUG_OPT, "${cyn}-O%d${rs}: ", level)) { va_list args; va_start(args, format); |