Merge pull request #68985 from antoniofrighetto/feature/load-pass-plugin

[Driver][Frontend] Introduce `load-pass-plugin` option
This commit is contained in:
Arnold Schwaighofer
2024-11-20 14:22:12 -08:00
committed by GitHub
10 changed files with 119 additions and 18 deletions

View File

@@ -214,7 +214,10 @@ int swift_llvm_opt_main(ArrayRef<const char *> argv, void *MainAddr) {
Opts.OutputKind = IRGenOutputKind::LLVMAssemblyAfterOptimization;
// Then perform the optimizations.
performLLVMOptimizations(Opts, M.get(), TM.get(), &Out->os());
SourceManager SM;
DiagnosticEngine Diags(SM);
performLLVMOptimizations(Opts, Diags, nullptr, M.get(), TM.get(),
&Out->os());
} else {
std::string Pipeline = PassPipeline;
llvm::TargetLibraryInfoImpl TLII(ModuleTriple);