llvm.org GIT mirror llvm / 4bd4aa5
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 Chris Lattner 17 years ago
2 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
170170 /// cause a degenerate basic block to be formed, having a terminator inside of
171171 /// the basic block).
172172 ///
173 BasicBlock *splitBasicBlock(iterator I);
173 BasicBlock *splitBasicBlock(iterator I, const std::string &BBName = "");
174174 };
175175
176176 #endif
216216 // cause a degenerate basic block to be formed, having a terminator inside of
217217 // the basic block).
218218 //
219 BasicBlock *BasicBlock::splitBasicBlock(iterator I) {
219 BasicBlock *BasicBlock::splitBasicBlock(iterator I, const std::string &BBName) {
220220 assert(getTerminator() && "Can't use splitBasicBlock on degenerate BB!");
221221 assert(I != InstList.end() &&
222222 "Trying to get me to create degenerate basic block!");
223223
224 BasicBlock *New = new BasicBlock("", getParent());
224 BasicBlock *New = new BasicBlock(BBName, getParent());
225225
226226 // Go from the end of the basic block through to the iterator pointer, moving
227227 // to the new basic block...