mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-01 10:02:42 +00:00
Don't create zero sized stack objects even for array allocas with a zero
number of elements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23219 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1e9de3ed2d
commit
fd88f64934
@ -150,7 +150,8 @@ 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 (CUI->getValue()) // Don't produce zero sized stack objects
|
||||
TySize *= CUI->getValue(); // Get total allocated size.
|
||||
StaticAllocaMap[AI] =
|
||||
MF.getFrameInfo()->CreateStackObject((unsigned)TySize, Align);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user