summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-04 03:21:31 +0000
committerChris Lattner <sabre@nondot.org>2004-02-04 03:21:31 +0000
commitc6aa017eae3f6d9a8bf60c31c4614e5ade478e5f (patch)
treedbe5c55658bfbcfb377b3854a7ad1e47e9b5277e
parent5e923dee6024248f58fa83a7c7299437f44f0d1a (diff)
downloadllvm-c6aa017eae3f6d9a8bf60c31c4614e5ade478e5f.tar.gz
llvm-c6aa017eae3f6d9a8bf60c31c4614e5ade478e5f.tar.bz2
llvm-c6aa017eae3f6d9a8bf60c31c4614e5ade478e5f.tar.xz
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
-rw-r--r--lib/VMCore/BasicBlock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp
index c83b316672..04f2034e9e 100644
--- a/lib/VMCore/BasicBlock.cpp
+++ b/lib/VMCore/BasicBlock.cpp
@@ -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.