|
@@ -6208,9 +6208,10 @@ ABIArgInfo MSDXILABIInfo::classifyArgumentType(QualType Ty) const {
|
|
|
if (const EnumType *EnumTy = Ty->getAs<EnumType>())
|
|
|
Ty = EnumTy->getDecl()->getIntegerType();
|
|
|
|
|
|
- // Return aggregates type as indirect by value
|
|
|
+ // Return aggregates type as indirect by ref.
|
|
|
+ // By val not work for out param.
|
|
|
if (isAggregateTypeForABI(Ty))
|
|
|
- return ABIArgInfo::getIndirect(0, /* byval */ true);
|
|
|
+ return ABIArgInfo::getIndirect(0, /* byval */ false);
|
|
|
|
|
|
return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend()
|
|
|
: ABIArgInfo::getDirect());
|