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 | 39d26c98c53596dc800571ee2a62328ed681bed3 (patch) | |
tree | d2fa920380a52e2f5687de7391e35a865a07de7d /clang/lib | |
parent | 3dc2c016a6e7b5d57713a014cfae6ce45c2f652b (diff) | |
download | bcm5719-llvm-39d26c98c53596dc800571ee2a62328ed681bed3.tar.gz bcm5719-llvm-39d26c98c53596dc800571ee2a62328ed681bed3.zip |
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.
llvm-svn: 208185
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 32525e47001..300fb19f209 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/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); } } |