Unify function pass managers for auxiliary procedures (e.g. startup type info, runtime, objc names)

This commit is contained in:
gingerBill
2023-01-05 12:54:53 +00:00
parent 025e87d974
commit 029cb6581b
3 changed files with 32 additions and 32 deletions

View File

@@ -359,6 +359,9 @@ gb_internal void lb_run_remove_dead_instruction_pass(lbProcedure *p) {
gb_internal void lb_run_function_pass_manager(LLVMPassManagerRef fpm, lbProcedure *p) {
if (p == nullptr) {
return;
}
LLVMRunFunctionPassManager(fpm, p->value);
// NOTE(bill): LLVMAddDCEPass doesn't seem to be exported in the official DLL's for LLVM
// which means we cannot rely upon it