From 4bd4aa5e3c41c0fc803e960252bb6fe75b804b1d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 24 Aug 2003 03:41:39 +0000 Subject: [PATCH] Allow specifying the name for the newly split basic block git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8097 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/BasicBlock.h | 2 +- lib/VMCore/BasicBlock.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h index 893792656c8..103761a23ee 100644 --- a/include/llvm/BasicBlock.h +++ b/include/llvm/BasicBlock.h @@ -171,7 +171,7 @@ public: /// cause a degenerate basic block to be formed, having a terminator inside of /// the basic block). /// - BasicBlock *splitBasicBlock(iterator I); + BasicBlock *splitBasicBlock(iterator I, const std::string &BBName = ""); }; #endif diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp index d04e5546162..ac97ed386e1 100644 --- a/lib/VMCore/BasicBlock.cpp +++ b/lib/VMCore/BasicBlock.cpp @@ -217,12 +217,12 @@ void BasicBlock::removePredecessor(BasicBlock *Pred) { // cause a degenerate basic block to be formed, having a terminator inside of // the basic block). // -BasicBlock *BasicBlock::splitBasicBlock(iterator I) { +BasicBlock *BasicBlock::splitBasicBlock(iterator I, const std::string &BBName) { assert(getTerminator() && "Can't use splitBasicBlock on degenerate BB!"); assert(I != InstList.end() && "Trying to get me to create degenerate basic block!"); - BasicBlock *New = new BasicBlock("", getParent()); + BasicBlock *New = new BasicBlock(BBName, getParent()); // Go from the end of the basic block through to the iterator pointer, moving // to the new basic block...