diff options
| author | Bill Wendling <isanbard@gmail.com> | 2011-11-02 23:20:58 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2011-11-02 23:20:58 +0000 |
| commit | 645eadac670814eea87b8e0f5bdc9362a9faa9a8 (patch) | |
| tree | 1a3291d317669147a65709ccac310cb0a4215799 /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | |
| parent | 1437852c38a9f5aad2dd1494a9c913774a6b8372 (diff) | |
| download | bcm5719-llvm-645eadac670814eea87b8e0f5bdc9362a9faa9a8.tar.gz bcm5719-llvm-645eadac670814eea87b8e0f5bdc9362a9faa9a8.zip | |
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>
llvm-svn: 143590
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index b052740a1ab..90d35cc76d9 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/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); |

