mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
When we split a basic block, there's a default branch to the newly created BB.
Delete this default branch, because we're going to generate our own. llvm-svn: 66234
This commit is contained in:
parent
c751e83e2b
commit
5ddde1a24c
@ -191,6 +191,9 @@ bool StackProtector::InsertStackProtectors() {
|
||||
// Split the basic block before the return instruction.
|
||||
BasicBlock *NewBB = BB->splitBasicBlock(RI, "SP_return");
|
||||
|
||||
// Remove default branch instruction to the new BB.
|
||||
BB->getTerminator()->eraseFromParent();
|
||||
|
||||
// Move the newly created basic block to the point right after the old basic
|
||||
// block so that it's in the "fall through" position.
|
||||
NewBB->moveAfter(BB);
|
||||
|
Loading…
x
Reference in New Issue
Block a user