aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 22f3b5be09..9f7bef52cb 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -878,9 +878,6 @@ static bool ir_want_fast_math(CodeGen *g, IrInstruction *instruction) {
}
static bool ir_want_runtime_safety(CodeGen *g, IrInstruction *instruction) {
- if (g->build_mode == BuildModeFastRelease || g->build_mode == BuildModeSmallRelease)
- return false;
-
// TODO memoize
Scope *scope = instruction->scope;
while (scope) {
@@ -895,7 +892,9 @@ static bool ir_want_runtime_safety(CodeGen *g, IrInstruction *instruction) {
}
scope = scope->parent;
}
- return true;
+
+ return (g->build_mode != BuildModeFastRelease &&
+ g->build_mode != BuildModeSmallRelease);
}
static Buf *panic_msg_buf(PanicMsgId msg_id) {