Fix -debug bug with internal startup procedures

This commit is contained in:
gingerBill
2020-09-16 15:16:29 +01:00
parent 94b27aa64e
commit f530c80216
+5
View File
@@ -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);