[Driver][Frontend] Introduce load-pass-plugin option

Allow dynamic loading of LLVM passes via `load-pass-plugin`
option passed to the Swift compiler driver.
This commit is contained in:
Antonio Frighetto
2024-11-07 17:25:24 +01:00
parent 113f11c2d1
commit 377c03fa7e
10 changed files with 119 additions and 18 deletions

View File

@@ -3183,6 +3183,10 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
}
}
for (const Arg *A : Args.filtered(OPT_load_pass_plugin_EQ)) {
Opts.LLVMPassPlugins.push_back(A->getValue());
}
for (const Arg *A : Args.filtered(OPT_verify_type_layout)) {
Opts.VerifyTypeLayoutNames.push_back(A->getValue());
}