diff options
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp index 9950798..e7d529d 100644 --- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp +++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp @@ -909,3 +909,25 @@ void ModuleSummaryIndexWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<ProfileSummaryInfoWrapperPass>(); AU.addRequired<StackSafetyInfoWrapperPass>(); } + +char ImmutableModuleSummaryIndexWrapperPass::ID = 0; + +ImmutableModuleSummaryIndexWrapperPass::ImmutableModuleSummaryIndexWrapperPass( + const ModuleSummaryIndex *Index) + : ImmutablePass(ID), Index(Index) { + initializeImmutableModuleSummaryIndexWrapperPassPass( + *PassRegistry::getPassRegistry()); +} + +void ImmutableModuleSummaryIndexWrapperPass::getAnalysisUsage( + AnalysisUsage &AU) const { + AU.setPreservesAll(); +} + +ImmutablePass *llvm::createImmutableModuleSummaryIndexWrapperPass( + const ModuleSummaryIndex *Index) { + return new ImmutableModuleSummaryIndexWrapperPass(Index); +} + +INITIALIZE_PASS(ImmutableModuleSummaryIndexWrapperPass, "module-summary-info", + "Module summary info", false, true) |