Move this assert to check the condition as soon as it is known.

llvm-svn: 82951
This commit is contained in:
Dan Gohman 2009-09-28 00:10:28 +00:00
parent a29a3ffd18
commit 2963777d0c
1 changed files with 1 additions and 1 deletions

View File

@ -230,9 +230,9 @@ bool LPPassManager::runOnFunction(Function &F) {
initializeAnalysisImpl(P); initializeAnalysisImpl(P);
LoopPass *LP = dynamic_cast<LoopPass *>(P); LoopPass *LP = dynamic_cast<LoopPass *>(P);
assert(LP && "Invalid LPPassManager member");
{ {
PassManagerPrettyStackEntry X(LP, *CurrentLoop->getHeader()); PassManagerPrettyStackEntry X(LP, *CurrentLoop->getHeader());
assert(LP && "Invalid LPPassManager member");
Timer *T = StartPassTimer(P); Timer *T = StartPassTimer(P);
Changed |= LP->runOnLoop(CurrentLoop, *this); Changed |= LP->runOnLoop(CurrentLoop, *this);
StopPassTimer(P, T); StopPassTimer(P, T);