aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_general.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-01-16 17:04:37 +0000
committergingerBill <bill@gingerbill.org>2023-01-16 17:04:37 +0000
commitb289a27c4eb26f0e2984c0cbb1a9a7e07cc40325 (patch)
treefcdaef485006063201855ce4402955311821d824 /src/llvm_backend_general.cpp
parentd085283f203e0ead3f1402e28333221ae1d37ea6 (diff)
Move the mutex up a little
Diffstat (limited to 'src/llvm_backend_general.cpp')
-rw-r--r--src/llvm_backend_general.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llvm_backend_general.cpp b/src/llvm_backend_general.cpp
index 1dd36ba14..7846c302a 100644
--- a/src/llvm_backend_general.cpp
+++ b/src/llvm_backend_general.cpp
@@ -2622,11 +2622,11 @@ gb_internal lbValue lb_find_procedure_value_from_entity(lbModule *m, Entity *e)
GB_ASSERT(other_module != nullptr);
mutex_lock(&other_module->values_mutex);
auto *found = map_get(&other_module->values, e);
+ mutex_unlock(&other_module->values_mutex);
if (found == nullptr) {
lbProcedure *missing_proc_in_other_module = lb_create_procedure(other_module, e, false);
array_add(&other_module->missing_procedures_to_check, missing_proc_in_other_module);
}
- mutex_unlock(&other_module->values_mutex);
} else {
array_add(&m->missing_procedures_to_check, missing_proc);
}