Increment the insertion iterator to beyond the landingpad instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137872 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2011-08-17 21:21:31 +00:00
parent 0906a7c46c
commit ab82fd9ff6

View File

@ -287,7 +287,7 @@ BasicBlock *llvm::SplitEdge(BasicBlock *BB, BasicBlock *Succ, Pass *P) {
///
BasicBlock *llvm::SplitBlock(BasicBlock *Old, Instruction *SplitPt, Pass *P) {
BasicBlock::iterator SplitIt = SplitPt;
while (isa<PHINode>(SplitIt))
while (isa<PHINode>(SplitIt) || isa<LandingPadInst>(SplitIt))
++SplitIt;
BasicBlock *New = Old->splitBasicBlock(SplitIt, Old->getName()+".split");