File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,10 @@ class GlobalMergeFunc {
7878
7979// / Global function merging pass for new pass manager.
8080struct GlobalMergeFuncPass : public PassInfoMixin <GlobalMergeFuncPass> {
81+ const ModuleSummaryIndex *ImportSummary = nullptr ;
82+ GlobalMergeFuncPass () = default ;
83+ GlobalMergeFuncPass (const ModuleSummaryIndex *ImportSummary)
84+ : ImportSummary(ImportSummary) {}
8185 PreservedAnalyses run (Module &M, AnalysisManager<Module> &);
8286};
8387
Original file line number Diff line number Diff line change @@ -637,7 +637,6 @@ bool GlobalMergeFuncPassWrapper::runOnModule(Module &M) {
637637
638638PreservedAnalyses GlobalMergeFuncPass::run (Module &M,
639639 AnalysisManager<Module> &AM) {
640- ModuleSummaryIndex *Index = &(AM.getResult <ModuleSummaryIndexAnalysis>(M));
641- bool Changed = GlobalMergeFunc (Index).run (M);
640+ bool Changed = GlobalMergeFunc (ImportSummary).run (M);
642641 return Changed ? PreservedAnalyses::none () : PreservedAnalyses::all ();
643642}
You can’t perform that action at this time.
0 commit comments