projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated VS build system. Patch provided by Cedric Venet:
[oota-llvm.git]
/
lib
/
CodeGen
/
BranchFolding.cpp
diff --git
a/lib/CodeGen/BranchFolding.cpp
b/lib/CodeGen/BranchFolding.cpp
index e67339ab3860066f1d86587615c327b36a7cb7ac..f629ae75f3aee9bf0eb2e163529b1960039e8235 100644
(file)
--- a/
lib/CodeGen/BranchFolding.cpp
+++ b/
lib/CodeGen/BranchFolding.cpp
@@
-381,11
+381,7
@@
MachineBasicBlock *BranchFolder::SplitMBBAt(MachineBasicBlock &CurMBB,
CurMBB.getParent()->getBasicBlockList().insert(++MBBI, NewMBB);
// Move all the successors of this block to the specified block.
CurMBB.getParent()->getBasicBlockList().insert(++MBBI, NewMBB);
// Move all the successors of this block to the specified block.
- while (!CurMBB.succ_empty()) {
- MachineBasicBlock *S = *(CurMBB.succ_end()-1);
- NewMBB->addSuccessor(S);
- CurMBB.removeSuccessor(S);
- }
+ NewMBB->transferSuccessors(&CurMBB);
// Add an edge from CurMBB to NewMBB for the fall-through.
CurMBB.addSuccessor(NewMBB);
// Add an edge from CurMBB to NewMBB for the fall-through.
CurMBB.addSuccessor(NewMBB);