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 {
78
78
79
79
// / Global function merging pass for new pass manager.
80
80
struct GlobalMergeFuncPass : public PassInfoMixin <GlobalMergeFuncPass> {
81
+ const ModuleSummaryIndex *ImportSummary = nullptr ;
82
+ GlobalMergeFuncPass () = default ;
83
+ GlobalMergeFuncPass (const ModuleSummaryIndex *ImportSummary)
84
+ : ImportSummary(ImportSummary) {}
81
85
PreservedAnalyses run (Module &M, AnalysisManager<Module> &);
82
86
};
83
87
Original file line number Diff line number Diff line change @@ -637,7 +637,6 @@ bool GlobalMergeFuncPassWrapper::runOnModule(Module &M) {
637
637
638
638
PreservedAnalyses GlobalMergeFuncPass::run (Module &M,
639
639
AnalysisManager<Module> &AM) {
640
- ModuleSummaryIndex *Index = &(AM.getResult <ModuleSummaryIndexAnalysis>(M));
641
- bool Changed = GlobalMergeFunc (Index).run (M);
640
+ bool Changed = GlobalMergeFunc (ImportSummary).run (M);
642
641
return Changed ? PreservedAnalyses::none () : PreservedAnalyses::all ();
643
642
}
You can’t perform that action at this time.
0 commit comments