mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-24 08:27:53 +00:00
Correct a race condition when checking the procedure body
This commit is contained in:
@@ -2714,7 +2714,6 @@ gb_internal lbValue lb_find_value_from_entity(lbModule *m, Entity *e) {
|
||||
return g;
|
||||
}
|
||||
}
|
||||
|
||||
GB_PANIC("\n\tError in: %s, missing value '%.*s'\n", token_pos_to_string(e->token.pos), LIT(e->token.string));
|
||||
return {};
|
||||
}
|
||||
@@ -2845,6 +2844,10 @@ gb_internal lbAddr lb_add_local(lbProcedure *p, Type *type, Entity *e, bool zero
|
||||
lb_mem_zero_ptr(p, ptr, type, alignment);
|
||||
}
|
||||
|
||||
if (e != nullptr) {
|
||||
map_set(&p->local_entity_map, e, val);
|
||||
}
|
||||
|
||||
return lb_addr(val);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user