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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139642 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2011-09-13 21:13:29 +00:00
parent fe731214d2
commit c67d184a2b

View File

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