mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-04 03:17:51 +00:00
Fix Generic/2005-10-18-ZeroSizeStackObject.ll by not requesting a zero
sized stack object if either the array size or the type size is zero. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23801 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f46544cd82
commit
d222f6ab67
@ -152,6 +152,7 @@ FunctionLoweringInfo::FunctionLoweringInfo(TargetLowering &tli,
|
||||
// TargetData. It serves primarily to 8-byte align doubles for X86.
|
||||
if (Align < TySize && TySize <= 8) Align = TySize;
|
||||
TySize *= CUI->getValue(); // Get total allocated size.
|
||||
if (TySize == 0) TySize = 1; // Don't create zero-sized stack objects.
|
||||
StaticAllocaMap[AI] =
|
||||
MF.getFrameInfo()->CreateStackObject((unsigned)TySize, Align);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user