From c6aa017eae3f6d9a8bf60c31c4614e5ade478e5f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 4 Feb 2004 03:21:31 +0000 Subject: [PATCH] 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 --- lib/VMCore/BasicBlock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp index c83b316672c..04f2034e9e2 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.