Now, there is additional layer, referred in the comment,

in place to handle this correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32684 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2006-12-19 20:12:38 +00:00
parent b60528b8ab
commit a68941b2d4

View File

@ -153,10 +153,6 @@ public:
/// then return NULL.
Pass *findAnalysisPass(AnalysisID AID);
inline void clearManagers() {
PassManagers.clear();
}
virtual ~PMTopLevelManager() {
for (std::vector<Pass *>::iterator I = PassManagers.begin(),
E = PassManagers.end(); I != E; ++I)
@ -1150,13 +1146,6 @@ FunctionPassManager::FunctionPassManager(ModuleProvider *P) {
}
FunctionPassManager::~FunctionPassManager() {
// Note : FPM maintains one entry in PassManagers vector.
// This one entry is FPM itself. This is not ideal. One
// alternative is have one additional layer between
// FunctionPassManager and FunctionPassManagerImpl.
// Meanwhile, to avoid going into infinte loop, first
// remove FPM from its PassMangers vector.
FPM->clearManagers();
delete FPM;
}