Fix race condition from add_entity_use due to Entity.identifier

This commit is contained in:
gingerBill
2021-08-19 17:38:18 +01:00
parent e722af7f61
commit 38841dd46e
6 changed files with 17 additions and 15 deletions
+3 -2
View File
@@ -1204,8 +1204,9 @@ void lb_generate_code(lbGenerator *gen) {
LLVMBool is_optimized = build_context.optimization_level > 0;
AstFile *init_file = m->info->init_package->files[0];
if (m->info->entry_point && m->info->entry_point->identifier && m->info->entry_point->identifier->file) {
init_file = m->info->entry_point->identifier->file;
Ast *ident = m->info->entry_point->identifier.load();
if (m->info->entry_point && ident && ident->file) {
init_file = ident->file;
}
LLVMBool split_debug_inlining = false;