mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Allow SILBasicBlocks to be constructed after a specific
block, and do so when splitting a block. Swift SVN r19076
This commit is contained in:
@@ -105,8 +105,9 @@ void SILBuilder::emitBlock(SILBasicBlock *BB, SILLocation BranchLoc) {
|
||||
/// continuation block.
|
||||
SILBasicBlock *SILBuilder::splitBlockForFallthrough() {
|
||||
// If we are concatenating, just create and return a new block.
|
||||
if (insertingAtEndOfBlock())
|
||||
return new (F.getModule()) SILBasicBlock(&F);
|
||||
if (insertingAtEndOfBlock()) {
|
||||
return new (F.getModule()) SILBasicBlock(&F, BB);
|
||||
}
|
||||
|
||||
// Otherwise we need to split the current block at the insertion point.
|
||||
auto *NewBB = BB->splitBasicBlock(InsertPt);
|
||||
|
||||
Reference in New Issue
Block a user