mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-12 14:23:33 +00:00
Make Entity.parent_proc_decl atomic
This commit is contained in:
@@ -170,7 +170,7 @@ struct Entity {
|
||||
Type * type;
|
||||
std::atomic<Ast *> identifier; // Can be nullptr
|
||||
DeclInfo * decl_info;
|
||||
DeclInfo * parent_proc_decl; // nullptr if in file/global scope
|
||||
std::atomic<DeclInfo *> parent_proc_decl; // nullptr if in file/global scope
|
||||
AstFile * file;
|
||||
AstPackage *pkg;
|
||||
|
||||
@@ -370,7 +370,7 @@ gb_internal Entity *alloc_entity_using_variable(Entity *parent, Token token, Typ
|
||||
token.pos = parent->token.pos;
|
||||
Entity *entity = alloc_entity(Entity_Variable, parent->scope, token, type);
|
||||
entity->using_parent = parent;
|
||||
entity->parent_proc_decl = parent->parent_proc_decl;
|
||||
entity->parent_proc_decl.store(parent->parent_proc_decl, std::memory_order_relaxed);
|
||||
entity->using_expr = using_expr;
|
||||
entity->flags |= EntityFlag_Using;
|
||||
entity->flags |= EntityFlag_Used;
|
||||
|
||||
Reference in New Issue
Block a user