From f530c80216c648a19d97ccb5b7c431dd5c5e0072 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 16 Sep 2020 15:16:29 +0100 Subject: [PATCH] Fix -debug bug with internal startup procedures --- src/ir.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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);