aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_proc.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-01-02 15:30:04 +0000
committergingerBill <bill@gingerbill.org>2023-01-02 15:30:04 +0000
commit529383f5b17d74f66bebb8679820a69476635b6a (patch)
tree67754a8f0458378fb67888912e6cf956956aa01a /src/llvm_backend_proc.cpp
parentf01cff7ff0d61a4bd222be159243775b5d9bf3e7 (diff)
Correct a race condition when checking the procedure body
Diffstat (limited to 'src/llvm_backend_proc.cpp')
-rw-r--r--src/llvm_backend_proc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/llvm_backend_proc.cpp b/src/llvm_backend_proc.cpp
index 384d29ca7..9691afebc 100644
--- a/src/llvm_backend_proc.cpp
+++ b/src/llvm_backend_proc.cpp
@@ -68,7 +68,7 @@ gb_internal lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool i
GB_ASSERT(entity != nullptr);
GB_ASSERT(entity->kind == Entity_Procedure);
if (!entity->Procedure.is_foreign) {
- GB_ASSERT_MSG(entity->flags & EntityFlag_ProcBodyChecked, "%.*s :: %s", LIT(entity->token.string), type_to_string(entity->type));
+ GB_ASSERT_MSG(entity->flags & EntityFlag_ProcBodyChecked, "%.*s :: %s (was parapoly: %d)", LIT(entity->token.string), type_to_string(entity->type), is_type_polymorphic(entity->type, true));
}
String link_name = {};
@@ -487,6 +487,7 @@ gb_internal void lb_begin_procedure_body(lbProcedure *p) {
lb_start_block(p, p->entry_block);
map_init(&p->direct_parameters, heap_allocator());
+ map_init(&p->local_entity_map, heap_allocator());
GB_ASSERT(p->type != nullptr);