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 @@ -666,7 +666,6 @@ bool GlobalMergeFuncPassWrapper::runOnModule(Module &M) {
666666
667667PreservedAnalyses GlobalMergeFuncPass::run (Module &M,
668668 AnalysisManager<Module> &AM) {
669- ModuleSummaryIndex *Index = &(AM.getResult <ModuleSummaryIndexAnalysis>(M));
670- bool Changed = GlobalMergeFunc (Index).run (M);
669+ bool Changed = GlobalMergeFunc (ImportSummary).run (M);
671670 return Changed ? PreservedAnalyses::none () : PreservedAnalyses::all ();
672671}
You can’t perform that action at this time.
0 commit comments