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/Transforms/Scalar/LoopInstSimplify.cpp | |
parent | 1aaad6970cee96c214cc663bc7ae2cecb6fd1e7c (diff) | |
download | bcm5719-llvm-6c99015fe2c1814f793530adc96f48050081612e.tar.gz bcm5719-llvm-6c99015fe2c1814f793530adc96f48050081612e.zip |
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/Transforms/Scalar/LoopInstSimplify.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp b/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp index 657038eeca7..ab1a9393c52 100644 --- a/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp @@ -145,7 +145,9 @@ bool LoopInstSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { // bodies of subloops. We visit the headers of loops so that we can process // their phis, but we contract the rest of the subloop body and only follow // edges leading back to the original loop. - for (BasicBlock *SuccBB : successors(BB)) { + for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; + ++SI) { + BasicBlock *SuccBB = *SI; if (!Visited.insert(SuccBB)) continue; |