diff options
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | lib/CodeGen/TargetInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index a9e11cb954..6a929a17cc 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -810,6 +810,10 @@ bool X86_32ABIInfo::shouldUseInReg(QualType Ty, unsigned &FreeRegs) const { return false; unsigned SizeInRegs = (getContext().getTypeSize(Ty) + 31) / 32; + + if (SizeInRegs == 0) + return false; + if (SizeInRegs > FreeRegs) { FreeRegs = 0; return false; |