diff options
| author | Oliver Stannard <oliver.stannard@arm.com> | 2014-05-07 10:39:12 +0000 |
|---|---|---|
| committer | Oliver Stannard <oliver.stannard@arm.com> | 2014-05-07 10:39:12 +0000 |
| commit | 3a0d738b65cf897b02af99aa253f546dd3eb6fbb (patch) | |
| tree | 6855fec4a858c577376dfac6a0eadd762ad102f3 /lib/CodeGen/TargetInfo.cpp | |
| parent | 27f00b4707f2c6ccdf4cf1a4d4f0c5752ebac2b4 (diff) | |
| download | clang-3a0d738b65cf897b02af99aa253f546dd3eb6fbb.tar.gz clang-3a0d738b65cf897b02af99aa253f546dd3eb6fbb.tar.bz2 clang-3a0d738b65cf897b02af99aa253f546dd3eb6fbb.tar.xz | |
ARM: Fix assertion caused by passing bitfield struct using ABIArgInfo::getExpandWithPadding
In cases where a struct must, according to the AAPCS, not be split between
general purpose and floating point registers, we use
ABIArgInfo::getExpandWithPadding to add the padding arguments. However,
ExpandWithPadding does not work if the struct contains bitfields, so we
instead must use ABIArgInfo::getDirect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
| -rw-r--r-- | lib/CodeGen/TargetInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index 32525e4700..300fb19f20 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -3926,7 +3926,8 @@ void ARMABIInfo::computeInfo(CGFunctionInfo &FI) const { if (!IsCPRC && PreAllocationGPRs < NumGPRs && AllocatedGPRs > NumGPRs && StackUsed) { llvm::Type *PaddingTy = llvm::ArrayType::get( llvm::Type::getInt32Ty(getVMContext()), NumGPRs - PreAllocationGPRs); - I.info = ABIArgInfo::getExpandWithPadding(false, PaddingTy); + I.info = ABIArgInfo::getDirect(nullptr /* type */, 0 /* offset */, + PaddingTy); } } |
