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
This commit is contained in:
Chris Lattner 2003-08-24 03:41:39 +00:00
parent f3f062eb71
commit 4bd4aa5e3c
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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...