aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-09-16 15:16:29 +0100
committergingerBill <bill@gingerbill.org>2020-09-16 15:16:29 +0100
commitf530c80216c648a19d97ccb5b7c431dd5c5e0072 (patch)
tree4d76c200ead0f26e459fa9cb0f7765e0cb3e292a /src/ir.cpp
parent94b27aa64e243793df6c26ce7920295e845cd528 (diff)
Fix -debug bug with internal startup procedures
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 4f9ec31f4..5c4c6f805 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -3120,6 +3120,11 @@ void ir_value_set_debug_location(irProcedure *proc, irValue *v) {
return; // Already set
}
+ if (proc->is_startup) {
+ // ignore startup procedures
+ return;
+ }
+
irModule *m = proc->module;
GB_ASSERT(m->debug_location_stack.count > 0);
v->loc = *array_end_ptr(&m->debug_location_stack);