diff options
Diffstat (limited to 'lib/Analysis/LoopPass.cpp')
-rw-r--r-- | lib/Analysis/LoopPass.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/Analysis/LoopPass.cpp b/lib/Analysis/LoopPass.cpp index a5496a01f0..f14a9baf98 100644 --- a/lib/Analysis/LoopPass.cpp +++ b/lib/Analysis/LoopPass.cpp @@ -261,12 +261,9 @@ bool LPPassManager::runOnFunction(Function &F) { void LoopPass::preparePassManager(PMStack &PMS) { // Find LPPassManager - while (!PMS.empty()) { - if (PMS.top()->getPassManagerType() > PMT_LoopPassManager) - PMS.pop(); - else; - break; - } + while (!PMS.empty() && + PMS.top()->getPassManagerType() > PMT_LoopPassManager) + PMS.pop(); LPPassManager *LPPM = dynamic_cast<LPPassManager *>(PMS.top()); @@ -281,12 +278,9 @@ void LoopPass::preparePassManager(PMStack &PMS) { void LoopPass::assignPassManager(PMStack &PMS, PassManagerType PreferredType) { // Find LPPassManager - while (!PMS.empty()) { - if (PMS.top()->getPassManagerType() > PMT_LoopPassManager) - PMS.pop(); - else; - break; - } + while (!PMS.empty() && + PMS.top()->getPassManagerType() > PMT_LoopPassManager) + PMS.pop(); LPPassManager *LPPM = dynamic_cast<LPPassManager *>(PMS.top()); |