When splitting a basic block, insert the new half immediately after the first

half.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11110 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-02-04 03:21:31 +00:00
parent 5e923dee60
commit c6aa017eae

View File

@ -231,7 +231,7 @@ BasicBlock *BasicBlock::splitBasicBlock(iterator I, const std::string &BBName) {
assert(I != InstList.end() &&
"Trying to get me to create degenerate basic block!");
BasicBlock *New = new BasicBlock(BBName, getParent());
BasicBlock *New = new BasicBlock(BBName, getNext());
// Move all of the specified instructions from the original basic block into
// the new basic block.