diff options
Diffstat (limited to 'llvm/lib/IR/Dominators.cpp')
-rw-r--r-- | llvm/lib/IR/Dominators.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/IR/Dominators.cpp b/llvm/lib/IR/Dominators.cpp index d6649d6c706..f45543a4e71 100644 --- a/llvm/lib/IR/Dominators.cpp +++ b/llvm/lib/IR/Dominators.cpp @@ -179,9 +179,7 @@ bool DominatorTree::dominates(const BasicBlockEdge &BBE, // trivially dominates itself, so we only have to find if it dominates the // other predecessors. Since the only way out of X is via NormalDest, X can // only properly dominate a node if NormalDest dominates that node too. - for (const_pred_iterator PI = pred_begin(End), E = pred_end(End); - PI != E; ++PI) { - const BasicBlock *BB = *PI; + for (const BasicBlock *BB : predecessors(End)) { if (BB == Start) continue; |