Fix race condition with -use-separate-modules due to type determination

This commit is contained in:
gingerBill
2023-04-18 17:20:50 +01:00
parent 30fa8f8ac2
commit 843eaf8893
3 changed files with 18 additions and 3 deletions
+5 -3
View File
@@ -139,9 +139,11 @@ struct lbModule {
AstPackage *pkg; // possibly associated
AstFile *file; // possibly associated
PtrMap<Type *, LLVMTypeRef> types;
PtrMap<Type *, LLVMTypeRef> func_raw_types;
PtrMap<void *, lbStructFieldRemapping> struct_field_remapping; // Key: LLVMTypeRef or Type *
PtrMap<Type *, LLVMTypeRef> types; // mutex: types_mutex
PtrMap<void *, lbStructFieldRemapping> struct_field_remapping; // Key: LLVMTypeRef or Type *, mutex: types_mutex
PtrMap<Type *, LLVMTypeRef> func_raw_types; // mutex: func_raw_types_mutex
RecursiveMutex types_mutex;
RecursiveMutex func_raw_types_mutex;
i32 internal_type_level;
RwMutex values_mutex;