Integrate numerous debug fixes from #1877

This commit is contained in:
gingerBill
2022-07-18 12:49:29 +01:00
parent 0b0c6da8b0
commit 6c7e5748a8
5 changed files with 49 additions and 35 deletions
+4 -4
View File
@@ -2746,10 +2746,6 @@ lbAddr lb_add_local(lbProcedure *p, Type *type, Entity *e, bool zero_init, i32 p
}
}
if (zero_init) {
lb_mem_zero_ptr(p, ptr, type, alignment);
}
lbValue val = {};
val.value = ptr;
val.type = alloc_type_pointer(type);
@@ -2759,6 +2755,10 @@ lbAddr lb_add_local(lbProcedure *p, Type *type, Entity *e, bool zero_init, i32 p
lb_add_debug_local_variable(p, ptr, type, e->token);
}
if (zero_init) {
lb_mem_zero_ptr(p, ptr, type, alignment);
}
return lb_addr(val);
}