summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
authorManuel Jacob <me@manueljacob.de>2014-07-20 09:10:11 +0000
committerManuel Jacob <me@manueljacob.de>2014-07-20 09:10:11 +0000
commitd11beffef4f1117aceb9f2f5532b4a317c30c05a (patch)
treec0a3aa5e2d4225971366e16eac335aacf32f9eed /llvm/lib/IR/Verifier.cpp
parent4100ebd67b61abfb7fc7728e9af5dcc6e51327be (diff)
downloadbcm5719-llvm-d11beffef4f1117aceb9f2f5532b4a317c30c05a.tar.gz
bcm5719-llvm-d11beffef4f1117aceb9f2f5532b4a317c30c05a.zip
[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges.
Summary: This patch introduces two new iterator ranges and updates existing code to use it. No functional change intended. Test Plan: All tests (make check-all) still pass. Reviewers: dblaikie Reviewed By: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4481 llvm-svn: 213474
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 9cf911b51a4..5b7a3475574 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -2107,8 +2107,8 @@ void Verifier::visitLandingPadInst(LandingPadInst &LPI) {
// The landingpad instruction defines its parent as a landing pad block. The
// landing pad block may be branched to only by the unwind edge of an invoke.
- for (pred_iterator I = pred_begin(BB), E = pred_end(BB); I != E; ++I) {
- const InvokeInst *II = dyn_cast<InvokeInst>((*I)->getTerminator());
+ for (BasicBlock *Pred : predecessors(BB)) {
+ const InvokeInst *II = dyn_cast<InvokeInst>(Pred->getTerminator());
Assert1(II && II->getUnwindDest() == BB && II->getNormalDest() != BB,
"Block containing LandingPadInst must be jumped to "
"only by the unwind edge of an invoke.", &LPI);
OpenPOWER on IntegriCloud