aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.hpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-07-15 11:49:07 +0100
committergingerBill <bill@gingerbill.org>2024-07-15 11:49:07 +0100
commitc5decd3eaecf393e1bf216b4d864fc9cfc5db0c2 (patch)
tree964ebce0f055d1a0c984290f7388adfbfddd3e8a /src/llvm_backend.hpp
parent664a71454bd2c58ab6f06f8de6d7d34c3eb397d7 (diff)
Fix possible race and correct linkage _after_ generation
Diffstat (limited to 'src/llvm_backend.hpp')
-rw-r--r--src/llvm_backend.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/llvm_backend.hpp b/src/llvm_backend.hpp
index deb05528f..c4f2bd884 100644
--- a/src/llvm_backend.hpp
+++ b/src/llvm_backend.hpp
@@ -200,6 +200,12 @@ struct lbModule {
LLVMPassManagerRef function_pass_managers[lbFunctionPassManager_COUNT];
};
+struct lbEntityCorrection {
+ lbModule * other_module;
+ Entity * e;
+ char const *cname;
+};
+
struct lbGenerator : LinkerData {
CheckerInfo *info;
@@ -218,6 +224,8 @@ struct lbGenerator : LinkerData {
lbProcedure *startup_runtime;
lbProcedure *cleanup_runtime;
lbProcedure *objc_names;
+
+ MPSCQueue<lbEntityCorrection> entities_to_correct_linkage;
};