mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-06 09:44:39 +00:00
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:
parent
f3f062eb71
commit
4bd4aa5e3c
@ -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
|
||||
|
@ -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...
|
||||
|
Loading…
x
Reference in New Issue
Block a user