diff options
author | Devang Patel <dpatel@apple.com> | 2011-09-13 21:13:29 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-09-13 21:13:29 +0000 |
commit | c67d184a2bd24ee827479db5556fbaaac0bc9507 (patch) | |
tree | 99176540eadc1171305dc7e5de6be32ecf6d429c /lib/VMCore | |
parent | fe731214d2529f7b30527fc312964af411867dd0 (diff) | |
download | external_llvm-c67d184a2bd24ee827479db5556fbaaac0bc9507.zip external_llvm-c67d184a2bd24ee827479db5556fbaaac0bc9507.tar.gz external_llvm-c67d184a2bd24ee827479db5556fbaaac0bc9507.tar.bz2 |
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/PassManager.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 34f3768..ecedb1d 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -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 |