diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp index f3686fe67a2f..e297ab420731 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/lib/Analysis/LoopPass.cpp @@ -230,9 +230,9 @@ bool LPPassManager::runOnFunction(Function &F) { initializeAnalysisImpl(P); LoopPass *LP = dynamic_cast(P); + assert(LP && "Invalid LPPassManager member"); { PassManagerPrettyStackEntry X(LP, *CurrentLoop->getHeader()); - assert(LP && "Invalid LPPassManager member"); Timer *T = StartPassTimer(P); Changed |= LP->runOnLoop(CurrentLoop, *this); StopPassTimer(P, T);