Fix global variables being "missing" with -use-separate-modules

This commit is contained in:
gingerBill
2024-07-15 12:21:42 +01:00
parent c5decd3eae
commit 549311fac9
4 changed files with 82 additions and 76 deletions

View File

@@ -1187,6 +1187,7 @@ gb_internal void add_debug_info_for_global_constant_from_entity(lbGenerator *gen
if (USE_SEPARATE_MODULES) {
m = lb_module_of_entity(gen, e);
}
GB_ASSERT(m != nullptr);
if (is_type_integer(e->type)) {
ExactValue const &value = e->Constant.value;