浏览代码

Fix -debug bug with internal startup procedures

gingerBill 5 年之前
父节点
当前提交
f530c80216
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/ir.cpp

+ 5 - 0
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);