Cache the paddding filler type

This commit is contained in:
gingerBill
2024-08-18 18:37:40 +01:00
parent f49ebae956
commit 8e52a52580
3 changed files with 36 additions and 3 deletions
+9
View File
@@ -137,6 +137,12 @@ enum lbFunctionPassManagerKind {
lbFunctionPassManager_COUNT
};
struct lbPadType {
i64 padding;
i64 padding_align;
LLVMTypeRef type;
};
struct lbModule {
LLVMModuleRef mod;
LLVMContextRef ctx;
@@ -199,6 +205,9 @@ struct lbModule {
PtrMap<Ast *, lbAddr> exact_value_compound_literal_addr_map; // Key: Ast_CompoundLit
LLVMPassManagerRef function_pass_managers[lbFunctionPassManager_COUNT];
BlockingMutex pad_types_mutex;
Array<lbPadType> pad_types;
};
struct lbEntityCorrection {