diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-03-29 17:12:55 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-03-29 17:12:55 +0000 |
commit | 3f782f4d7586a4e644850ad4d05ef6a027aabc04 (patch) | |
tree | 6f832ac8cb68289a0552fc0b267d58684f77f4af /lib | |
parent | 848b0c39b11801614c47e460248b60e8d40eb257 (diff) | |
download | external_llvm-3f782f4d7586a4e644850ad4d05ef6a027aabc04.zip external_llvm-3f782f4d7586a4e644850ad4d05ef6a027aabc04.tar.gz external_llvm-3f782f4d7586a4e644850ad4d05ef6a027aabc04.tar.bz2 |
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')
-rw-r--r-- | lib/CodeGen/StackProtector.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/StackProtector.cpp b/lib/CodeGen/StackProtector.cpp index b3ee152..f0a44ab 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; } |