forked from OSchip/llvm-project
ARM/[A]APCS: Ignore empty records passed as arguments.
llvm-svn: 81798
This commit is contained in:
parent
0e795ffbb0
commit
09d3362bf5
|
@ -1395,6 +1395,10 @@ ABIArgInfo ARMABIInfo::classifyArgumentType(QualType Ty,
|
|||
return (Ty->isPromotableIntegerType() ?
|
||||
ABIArgInfo::getExtend() : ABIArgInfo::getDirect());
|
||||
|
||||
// Ignore empty records.
|
||||
if (isEmptyRecord(Context, Ty, true))
|
||||
return ABIArgInfo::getIgnore();
|
||||
|
||||
// FIXME: This is kind of nasty... but there isn't much choice because the ARM
|
||||
// backend doesn't support byval.
|
||||
// FIXME: This doesn't handle alignment > 64 bits.
|
||||
|
|
|
@ -84,3 +84,11 @@ struct s13 f13(void) {}
|
|||
// AAPCS: define arm_aapcscc i32 @f14()
|
||||
union u14 { float f0; };
|
||||
union u14 f14(void) {}
|
||||
|
||||
// APCS-GNU: define arm_apcscc void @f15()
|
||||
// AAPCS: define arm_aapcscc void @f15()
|
||||
void f15(struct s7 a0) {}
|
||||
|
||||
// APCS-GNU: define arm_apcscc void @f16()
|
||||
// AAPCS: define arm_aapcscc void @f16()
|
||||
void f16(struct s8 a0) {}
|
||||
|
|
Loading…
Reference in New Issue