aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/IPA
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-07-19 09:42:01 +0000
committerDuncan Sands <baldrick@free.fr>2007-07-19 09:42:01 +0000
commit5e1f04822c7295063e37c16a0de946a6aa0fb8f6 (patch)
treec47a3476520fd2fb614b1141ab874163cf71bae1 /lib/Analysis/IPA
parent66929ff3312d5d2aefde1de50ab25865a887bae9 (diff)
downloadexternal_llvm-5e1f04822c7295063e37c16a0de946a6aa0fb8f6.zip
external_llvm-5e1f04822c7295063e37c16a0de946a6aa0fb8f6.tar.gz
external_llvm-5e1f04822c7295063e37c16a0de946a6aa0fb8f6.tar.bz2
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
Diffstat (limited to 'lib/Analysis/IPA')
-rw-r--r--lib/Analysis/IPA/CallGraphSCCPass.cpp9
1 files changed, 3 insertions, 6 deletions
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 @@ bool CGPassManager::doFinalization(CallGraph &CG) {
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());