aboutsummaryrefslogtreecommitdiff
path: root/src/name_canonicalization.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2026-02-02 11:37:19 +0000
committerGitHub <noreply@github.com>2026-02-02 11:37:19 +0000
commitadf56ced22de0ef84100c70b394641c272231c3f (patch)
treeee049d3ffa61d7ce1de1b774b4844a0ea7bfcc00 /src/name_canonicalization.cpp
parentb9e4007cb190c1a5d96e7786e726dcbcac1d08c9 (diff)
parentb183b1219c3b336988e53235a0671958b5079c09 (diff)
Merge pull request #6215 from odin-lang/bill/fix-data-races-2026-02
Fix numerous data races
Diffstat (limited to 'src/name_canonicalization.cpp')
-rw-r--r--src/name_canonicalization.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/name_canonicalization.cpp b/src/name_canonicalization.cpp
index f1dccb182..d3faefed7 100644
--- a/src/name_canonicalization.cpp
+++ b/src/name_canonicalization.cpp
@@ -559,8 +559,8 @@ gb_internal void write_canonical_parent_prefix(TypeWriter *w, Entity *e) {
// no prefix
return;
}
- if (e->parent_proc_decl) {
- Entity *p = e->parent_proc_decl->entity;
+ if (e->parent_proc_decl.load(std::memory_order_relaxed)) {
+ Entity *p = e->parent_proc_decl.load(std::memory_order_relaxed)->entity;
write_canonical_parent_prefix(w, p);
type_writer_append(w, p->token.string.text, p->token.string.len);
if (is_type_polymorphic(p->type)) {