mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 19:24:25 +00:00
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213474 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user