[llvm-commits] [llvm] r66236 - /llvm/branches/Apple/Dib/lib/CodeGen/StackProtector.cpp
Bill Wendling
isanbard at gmail.com
Thu Mar 5 17:42:35 PST 2009
Author: void
Date: Thu Mar 5 19:42:35 2009
New Revision: 66236
URL: http://llvm.org/viewvc/llvm-project?rev=66236&view=rev
Log:
--- Merging (from foreign repository) r66234 into '.':
U lib/CodeGen/StackProtector.cpp
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.
Modified:
llvm/branches/Apple/Dib/lib/CodeGen/StackProtector.cpp
Modified: llvm/branches/Apple/Dib/lib/CodeGen/StackProtector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/StackProtector.cpp?rev=66236&r1=66235&r2=66236&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/StackProtector.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/StackProtector.cpp Thu Mar 5 19:42:35 2009
@@ -191,6 +191,9 @@
// 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);
More information about the llvm-commits
mailing list