aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-01-02 16:56:05 +0000
committergingerBill <bill@gingerbill.org>2023-01-02 16:56:05 +0000
commitc293f5b7ebc3b733e996a97c6e32d678f13b3ee5 (patch)
tree41935353d5e02213733dd846cf7b3f46a20703fe /src/llvm_backend_stmt.cpp
parentfa562ec5d60319f5cd7e85bb337bd21feb7ceeb8 (diff)
Remove unneeded mutex
Diffstat (limited to 'src/llvm_backend_stmt.cpp')
-rw-r--r--src/llvm_backend_stmt.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/llvm_backend_stmt.cpp b/src/llvm_backend_stmt.cpp
index 06abebc78..8742423a5 100644
--- a/src/llvm_backend_stmt.cpp
+++ b/src/llvm_backend_stmt.cpp
@@ -57,9 +57,8 @@ gb_internal void lb_build_constant_value_decl(lbProcedure *p, AstValueDecl *vd)
if (pl->body != nullptr) {
auto *found = map_get(&info->gen_procs, ident);
if (found) {
- auto procs = *found;
- for_array(i, procs) {
- Entity *e = procs[i];
+ MUTEX_GUARD(&found->mutex);
+ for (Entity *e : found->procs) {
if (!ptr_set_exists(min_dep_set, e)) {
continue;
}