Add a check to make sure schedulePass() has not deleted stale RequiredPass.

llvm-svn: 139642
This commit is contained in:
Devang Patel 2011-09-13 21:13:29 +00:00
parent f13b5ef0e1
commit 466c23b78a

View File

@ -1634,9 +1634,11 @@ void MPPassManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) {
FPP->add(RequiredPass);
// Register P as the last user of RequiredPass.
SmallVector<Pass *, 1> LU;
LU.push_back(RequiredPass);
FPP->setLastUser(LU, P);
if (RequiredPass) {
SmallVector<Pass *, 1> LU;
LU.push_back(RequiredPass);
FPP->setLastUser(LU, P);
}
}
/// Return function pass corresponding to PassInfo PI, that is