mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user