Merge pull request #1188 from krux02/minor-fix-3

fix #1187
This commit is contained in:
gingerBill
2021-09-29 19:22:56 +01:00
committed by GitHub
+7 -3
View File
@@ -1207,9 +1207,13 @@ void lb_generate_code(lbGenerator *gen) {
LLVMBool is_optimized = build_context.optimization_level > 0; LLVMBool is_optimized = build_context.optimization_level > 0;
AstFile *init_file = m->info->init_package->files[0]; AstFile *init_file = m->info->init_package->files[0];
Ast *ident = m->info->entry_point->identifier.load();
if (m->info->entry_point && ident && ident->file) { if (Entity *entry_point = m->info->entry_point) {
init_file = ident->file; if (Ast *ident = entry_point->identifier.load()) {
if (ident->file) {
init_file = ident->file;
}
}
} }
LLVMBool split_debug_inlining = false; LLVMBool split_debug_inlining = false;