summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Dominators.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Dominators.cpp')
-rw-r--r--llvm/lib/IR/Dominators.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/IR/Dominators.cpp b/llvm/lib/IR/Dominators.cpp
index f45543a4e71..d6649d6c706 100644
--- a/llvm/lib/IR/Dominators.cpp
+++ b/llvm/lib/IR/Dominators.cpp
@@ -179,7 +179,9 @@ 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 BasicBlock *BB : predecessors(End)) {
+ for (const_pred_iterator PI = pred_begin(End), E = pred_end(End);
+ PI != E; ++PI) {
+ const BasicBlock *BB = *PI;
if (BB == Start)
continue;
OpenPOWER on IntegriCloud