summaryrefslogtreecommitdiff
path: root/lib/CodeGen/StackProtector.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-03-29 17:12:55 +0000
committerBill Wendling <isanbard@gmail.com>2011-03-29 17:12:55 +0000
commit3f782f4d7586a4e644850ad4d05ef6a027aabc04 (patch)
tree6f832ac8cb68289a0552fc0b267d58684f77f4af /lib/CodeGen/StackProtector.cpp
parent848b0c39b11801614c47e460248b60e8d40eb257 (diff)
downloadllvm-3f782f4d7586a4e644850ad4d05ef6a027aabc04.tar.gz
llvm-3f782f4d7586a4e644850ad4d05ef6a027aabc04.tar.bz2
llvm-3f782f4d7586a4e644850ad4d05ef6a027aabc04.tar.xz
Inline check that's used only once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128465 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/StackProtector.cpp')
-rw-r--r--lib/CodeGen/StackProtector.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/StackProtector.cpp b/lib/CodeGen/StackProtector.cpp
index b3ee152d28..f0a44abaf5 100644
--- a/lib/CodeGen/StackProtector.cpp
+++ b/lib/CodeGen/StackProtector.cpp
@@ -215,10 +215,9 @@ bool StackProtector::InsertStackProtectors() {
// unreachable
// Split the basic block before the return instruction.
- bool BBIsReachable = (DT && DT->isReachableFromEntry(BB));
BasicBlock *NewBB = BB->splitBasicBlock(RI, "SP_return");
- if (BBIsReachable) {
+ if (DT && DT->isReachableFromEntry(BB)) {
DT->addNewBlock(NewBB, BB);
FailBBDom = FailBBDom ? DT->findNearestCommonDominator(FailBBDom, BB) :BB;
}