aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/IPA/CallGraphSCCPass.cpp
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
commit20d824b7dfea987775586d9de56c7448cc2cc44d (patch)
treec47a3476520fd2fb614b1141ab874163cf71bae1 /lib/Analysis/IPA/CallGraphSCCPass.cpp
parent1d572db21e3655093f5f9b56aa7799d0fe1f5949 (diff)
downloadexternal_llvm-20d824b7dfea987775586d9de56c7448cc2cc44d.zip
external_llvm-20d824b7dfea987775586d9de56c7448cc2cc44d.tar.gz
external_llvm-20d824b7dfea987775586d9de56c7448cc2cc44d.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/CallGraphSCCPass.cpp')
-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());