Replace mysterious code causing a g++-4.2 warning
with hopefully correct code that pleases g++-4.2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40051 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/IPA/CallGraphSCCPass.cpp b/lib/Analysis/IPA/CallGraphSCCPass.cpp
index a7e9dd0..97a4008 100644
--- a/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -153,12 +153,9 @@
void CallGraphSCCPass::assignPassManager(PMStack &PMS,
PassManagerType PreferredType) {
// Find CGPassManager
- while (!PMS.empty()) {
- if (PMS.top()->getPassManagerType() > PMT_CallGraphPassManager)
- PMS.pop();
- else;
- break;
- }
+ while (!PMS.empty() &&
+ PMS.top()->getPassManagerType() > PMT_CallGraphPassManager)
+ PMS.pop();
CGPassManager *CGP = dynamic_cast<CGPassManager *>(PMS.top());