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

in place to handle this correctly.

llvm-svn: 32684
This commit is contained in:
Devang Patel 2006-12-19 20:12:38 +00:00
parent 1e9d4977b6
commit cb5128a8d9
1 changed files with 0 additions and 11 deletions

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;
}