forked from OSchip/llvm-project
Pass records with non-trivial destructors or constructors indirectly.
llvm-svn: 136630
This commit is contained in:
parent
af8e96c185
commit
df425dbf04
|
@ -2934,6 +2934,11 @@ ABIArgInfo MipsABIInfo::classifyArgumentType(QualType Ty) const {
|
|||
if (getContext().getTypeSize(Ty) == 0)
|
||||
return ABIArgInfo::getIgnore();
|
||||
|
||||
// Records with non trivial destructors/constructors should not be passed
|
||||
// by value.
|
||||
if (isRecordWithNonTrivialDestructorOrCopyConstructor(Ty))
|
||||
return ABIArgInfo::getIndirect(0, /*ByVal=*/false);
|
||||
|
||||
return ABIArgInfo::getIndirect(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue