aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/Interval.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-07-21 17:06:51 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-07-21 17:06:51 +0000
commit6c99015fe2c1814f793530adc96f48050081612e (patch)
tree6dd9bd97817fed538386fcedbf363d38470ace2a /llvm/lib/Analysis/Interval.cpp
parent1aaad6970cee96c214cc663bc7ae2cecb6fd1e7c (diff)
downloadllvm-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/Analysis/Interval.cpp')
-rw-r--r--llvm/lib/Analysis/Interval.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/Interval.cpp b/llvm/lib/Analysis/Interval.cpp
index ca71cf3..e3e785f 100644
--- a/llvm/lib/Analysis/Interval.cpp
+++ b/llvm/lib/Analysis/Interval.cpp
@@ -29,8 +29,9 @@ using namespace llvm;
bool Interval::isLoop() const {
// There is a loop in this interval iff one of the predecessors of the header
// node lives in the interval.
- for (BasicBlock *Pred : predecessors(HeaderNode))
- if (contains(Pred))
+ for (::pred_iterator I = ::pred_begin(HeaderNode), E = ::pred_end(HeaderNode);
+ I != E; ++I)
+ if (contains(*I))
return true;
return false;
}