diff --git a/llvm/include/llvm/CodeGen/MachineModuleInfo.h b/llvm/include/llvm/CodeGen/MachineModuleInfo.h index 08fc8542a4eeb0..5f66d1ada0d082 100644 --- a/llvm/include/llvm/CodeGen/MachineModuleInfo.h +++ b/llvm/include/llvm/CodeGen/MachineModuleInfo.h @@ -192,12 +192,6 @@ class MachineModuleInfo { unsigned getCurrentCallSite() { return CurCallSite; } /// \} - - // MMI owes MCContext. It should never be invalidated. - bool invalidate(Module &, const PreservedAnalyses &, - ModuleAnalysisManager::Invalidator &) { - return false; - } }; // End class MachineModuleInfo class MachineModuleInfoWrapperPass : public ImmutablePass { @@ -237,6 +231,12 @@ class MachineModuleAnalysis : public AnalysisInfoMixin { public: MachineModuleInfo &getMMI() { return MMI; } + + // MMI owes MCContext. It should never be invalidated. + bool invalidate(Module &, const PreservedAnalyses &, + ModuleAnalysisManager::Invalidator &) { + return false; + } }; MachineModuleAnalysis(MachineModuleInfo &MMI) : MMI(MMI) {}