Move linker code into separate file

This commit is contained in:
gingerBill
2023-07-24 11:53:18 +01:00
parent 4051dd9522
commit bd81c6f5b4
5 changed files with 438 additions and 426 deletions
+1 -9
View File
@@ -190,13 +190,9 @@ struct lbModule {
LLVMPassManagerRef function_pass_managers[lbFunctionPassManager_COUNT];
};
struct lbGenerator {
struct lbGenerator : LinkerData {
CheckerInfo *info;
Array<String> output_object_paths;
Array<String> output_temp_paths;
String output_base;
String output_name;
PtrMap<void *, lbModule *> modules; // key is `AstPackage *` (`void *` is used for future use)
PtrMap<LLVMContextRef, lbModule *> modules_through_ctx;
lbModule default_module;
@@ -204,10 +200,6 @@ struct lbGenerator {
RecursiveMutex anonymous_proc_lits_mutex;
PtrMap<Ast *, lbProcedure *> anonymous_proc_lits;
BlockingMutex foreign_mutex;
PtrSet<Entity *> foreign_libraries_set;
Array<Entity *> foreign_libraries;
std::atomic<u32> global_array_index;
std::atomic<u32> global_generated_index;