forked from OSchip/llvm-project
[CodeGen] Make MMI immutable NPM pass
This commit is contained in:
parent
6fd30f0669
commit
d04f3e028d
|
@ -54,8 +54,8 @@ class Module;
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
/// This class can be derived from and used by targets to hold private
|
/// This class can be derived from and used by targets to hold private
|
||||||
/// target-specific information for each Module. Objects of type are
|
/// target-specific information for each Module. Objects of type are
|
||||||
/// accessed/created with MMI::getInfo and destroyed when the MachineModuleInfo
|
/// accessed/created with MachineModuleInfo::getObjFileInfo and destroyed when
|
||||||
/// is destroyed.
|
/// the MachineModuleInfo is destroyed.
|
||||||
///
|
///
|
||||||
class MachineModuleInfoImpl {
|
class MachineModuleInfoImpl {
|
||||||
public:
|
public:
|
||||||
|
@ -251,6 +251,12 @@ public:
|
||||||
return Personalities;
|
return Personalities;
|
||||||
}
|
}
|
||||||
/// \}
|
/// \}
|
||||||
|
|
||||||
|
// MMI owes MCContext. It should never be invalidated.
|
||||||
|
bool invalidate(Module &, const PreservedAnalyses &,
|
||||||
|
ModuleAnalysisManager::Invalidator &) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}; // End class MachineModuleInfo
|
}; // End class MachineModuleInfo
|
||||||
|
|
||||||
class MachineModuleInfoWrapperPass : public ImmutablePass {
|
class MachineModuleInfoWrapperPass : public ImmutablePass {
|
||||||
|
|
Loading…
Reference in New Issue