diff options
author | Erik Verbruggen <erikjv@me.com> | 2014-03-25 09:06:18 +0000 |
---|---|---|
committer | Erik Verbruggen <erikjv@me.com> | 2014-03-25 09:06:18 +0000 |
commit | e706b883047fe52a033db9f70b03a6dbd2c4a3db (patch) | |
tree | 42779de580acaae6cd56ef15d90071d857b94869 /llvm/lib/Analysis | |
parent | 24fdbe567638d942fff6b1cf3df3cb4f5adf6823 (diff) | |
download | bcm5719-llvm-e706b883047fe52a033db9f70b03a6dbd2c4a3db.tar.gz bcm5719-llvm-e706b883047fe52a033db9f70b03a6dbd2c4a3db.zip |
Simplify loop that worked around bugs in old GCC/Xcode.
GCC 4.0.1 and Xcode 2 are no longer supported for building llvm/clang.
llvm-svn: 204705
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/CFG.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/CFG.cpp b/llvm/lib/Analysis/CFG.cpp index 9ebbb678497..69637606328 100644 --- a/llvm/lib/Analysis/CFG.cpp +++ b/llvm/lib/Analysis/CFG.cpp @@ -101,15 +101,9 @@ bool llvm::isCriticalEdge(const TerminatorInst *TI, unsigned SuccNum, // If AllowIdenticalEdges is true, then we allow this edge to be considered // non-critical iff all preds come from TI's block. - while (I != E) { - const BasicBlock *P = *I; - if (P != FirstPred) + for (; I != E; ++I) + if (*I != FirstPred) return true; - // Note: leave this as is until no one ever compiles with either gcc 4.0.1 - // or Xcode 2. This seems to work around the pred_iterator assert in PR 2207 - E = pred_end(P); - ++I; - } return false; } |