[llvm-commits] [llvm] r139642 - /llvm/trunk/lib/VMCore/PassManager.cpp
Devang Patel
dpatel at apple.com
Tue Sep 13 14:13:30 PDT 2011
Author: dpatel
Date: Tue Sep 13 16:13:29 2011
New Revision: 139642
URL: http://llvm.org/viewvc/llvm-project?rev=139642&view=rev
Log:
Add a check to make sure schedulePass() has not deleted stale RequiredPass.
Modified:
llvm/trunk/lib/VMCore/PassManager.cpp
Modified: llvm/trunk/lib/VMCore/PassManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=139642&r1=139641&r2=139642&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/PassManager.cpp (original)
+++ llvm/trunk/lib/VMCore/PassManager.cpp Tue Sep 13 16:13:29 2011
@@ -1634,9 +1634,11 @@
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
More information about the llvm-commits
mailing list