diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-07-21 17:06:51 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-07-21 17:06:51 +0000 |
commit | 6c99015fe2c1814f793530adc96f48050081612e (patch) | |
tree | 6dd9bd97817fed538386fcedbf363d38470ace2a /llvm/lib/IR/Dominators.cpp | |
parent | 1aaad6970cee96c214cc663bc7ae2cecb6fd1e7c (diff) | |
download | llvm-6c99015fe2c1814f793530adc96f48050081612e.zip llvm-6c99015fe2c1814f793530adc96f48050081612e.tar.gz llvm-6c99015fe2c1814f793530adc96f48050081612e.tar.bz2 |
Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges."
This reverts commit r213474 (and r213475), which causes a miscompile on
a stage2 LTO build. I'll reply on the list in a moment.
llvm-svn: 213562
Diffstat (limited to 'llvm/lib/IR/Dominators.cpp')
-rw-r--r-- | llvm/lib/IR/Dominators.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/IR/Dominators.cpp b/llvm/lib/IR/Dominators.cpp index f45543a..d6649d6 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; |