aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-01-02 23:21:16 +0000
committergingerBill <bill@gingerbill.org>2023-01-02 23:21:16 +0000
commit8ece92f1f69217ae5b143cf0e7d812c0f857fa8d (patch)
tree29d39f93624dad449dd41c8d9eda6ee94392bf8e /src/llvm_backend_stmt.cpp
parent69b075782bac981ceeea5eea8f544e346f0fe6b5 (diff)
Minimize the parapoly mutex usage a bit
Diffstat (limited to 'src/llvm_backend_stmt.cpp')
-rw-r--r--src/llvm_backend_stmt.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/llvm_backend_stmt.cpp b/src/llvm_backend_stmt.cpp
index 8742423a5..2703c511a 100644
--- a/src/llvm_backend_stmt.cpp
+++ b/src/llvm_backend_stmt.cpp
@@ -57,8 +57,9 @@ 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) {
- MUTEX_GUARD(&found->mutex);
- for (Entity *e : found->procs) {
+ GenProcsData *gpd = *found;
+ MUTEX_GUARD(&gpd->mutex);
+ for (Entity *e : gpd->procs) {
if (!ptr_set_exists(min_dep_set, e)) {
continue;
}