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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213562 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2014-07-21 17:06:51 +00:00
parent 9787e8c76b
commit facdfc6781
41 changed files with 230 additions and 167 deletions
+4 -2
View File
@@ -865,7 +865,8 @@ void SampleFunctionProfile::buildEdges(Function &F) {
SmallPtrSet<BasicBlock *, 16> Visited;
if (!Predecessors[B1].empty())
llvm_unreachable("Found a stale predecessors list in a basic block.");
for (BasicBlock *B2 : predecessors(B1)) {
for (pred_iterator PI = pred_begin(B1), PE = pred_end(B1); PI != PE; ++PI) {
BasicBlock *B2 = *PI;
if (Visited.insert(B2))
Predecessors[B1].push_back(B2);
}
@@ -874,7 +875,8 @@ void SampleFunctionProfile::buildEdges(Function &F) {
Visited.clear();
if (!Successors[B1].empty())
llvm_unreachable("Found a stale successors list in a basic block.");
for (BasicBlock *B2 : successors(B1)) {
for (succ_iterator SI = succ_begin(B1), SE = succ_end(B1); SI != SE; ++SI) {
BasicBlock *B2 = *SI;
if (Visited.insert(B2))
Successors[B1].push_back(B2);
}