summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-11-02 23:20:58 +0000
committerBill Wendling <isanbard@gmail.com>2011-11-02 23:20:58 +0000
commit9c674bb012c23622bd31d5e82cb0baeda9aac3a5 (patch)
treef14edd89936c53b436a75779b5b565f13e29035c /lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
parent1a1d1fcc0b955420cdbe0b94bd01c46d4e96b429 (diff)
downloadllvm-9c674bb012c23622bd31d5e82cb0baeda9aac3a5.tar.gz
llvm-9c674bb012c23622bd31d5e82cb0baeda9aac3a5.tar.bz2
llvm-9c674bb012c23622bd31d5e82cb0baeda9aac3a5.tar.xz
An array of chars of length 8 will also cause the stack protector to be inserted
into the function. Reflect that here so that the array will be placed next to the SP. <rdar://problem/10128329> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143590 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index b052740a1a..90d35cc76d 100644
--- a/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -92,7 +92,7 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf) {
// candidate. I.e., it would trigger the creation of a stack protector.
bool MayNeedSP =
(AI->isArrayAllocation() ||
- (TySize > 8 && isa<ArrayType>(Ty) &&
+ (TySize >= 8 && isa<ArrayType>(Ty) &&
cast<ArrayType>(Ty)->getElementType()->isIntegerTy(8)));
StaticAllocaMap[AI] =
MF->getFrameInfo()->CreateStackObject(TySize, Align, false, MayNeedSP);