forked from OSchip/llvm-project
[ABI][NFC] Fix the confusion of ByVal and ByRef argument names
The second argument of getNaturalAlignIndirect() was `bool ByRef`, but the implementation was just delegating to getIndirect() with `ByRef` passed unchanged to `bool ByVal` parameter of getIndirect(). Fix a couple of /*ByRef=*/ comments as well. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D85113
This commit is contained in:
parent
3d10050e37
commit
5a07490d76
|
@ -111,7 +111,7 @@ namespace swiftcall {
|
||||||
/// A convenience method to return an indirect ABIArgInfo with an
|
/// A convenience method to return an indirect ABIArgInfo with an
|
||||||
/// expected alignment equal to the ABI alignment of the given type.
|
/// expected alignment equal to the ABI alignment of the given type.
|
||||||
CodeGen::ABIArgInfo
|
CodeGen::ABIArgInfo
|
||||||
getNaturalAlignIndirect(QualType Ty, bool ByRef = true,
|
getNaturalAlignIndirect(QualType Ty, bool ByVal = true,
|
||||||
bool Realign = false,
|
bool Realign = false,
|
||||||
llvm::Type *Padding = nullptr) const;
|
llvm::Type *Padding = nullptr) const;
|
||||||
|
|
||||||
|
|
|
@ -80,17 +80,17 @@ static bool isAggregateTypeForABI(QualType T) {
|
||||||
T->isMemberFunctionPointerType();
|
T->isMemberFunctionPointerType();
|
||||||
}
|
}
|
||||||
|
|
||||||
ABIArgInfo
|
ABIArgInfo ABIInfo::getNaturalAlignIndirect(QualType Ty, bool ByVal,
|
||||||
ABIInfo::getNaturalAlignIndirect(QualType Ty, bool ByRef, bool Realign,
|
bool Realign,
|
||||||
llvm::Type *Padding) const {
|
llvm::Type *Padding) const {
|
||||||
return ABIArgInfo::getIndirect(getContext().getTypeAlignInChars(Ty),
|
return ABIArgInfo::getIndirect(getContext().getTypeAlignInChars(Ty), ByVal,
|
||||||
ByRef, Realign, Padding);
|
Realign, Padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
ABIArgInfo
|
ABIArgInfo
|
||||||
ABIInfo::getNaturalAlignIndirectInReg(QualType Ty, bool Realign) const {
|
ABIInfo::getNaturalAlignIndirectInReg(QualType Ty, bool Realign) const {
|
||||||
return ABIArgInfo::getIndirectInReg(getContext().getTypeAlignInChars(Ty),
|
return ABIArgInfo::getIndirectInReg(getContext().getTypeAlignInChars(Ty),
|
||||||
/*ByRef*/ false, Realign);
|
/*ByVal*/ false, Realign);
|
||||||
}
|
}
|
||||||
|
|
||||||
Address ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr,
|
Address ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr,
|
||||||
|
@ -8555,7 +8555,7 @@ ABIArgInfo LanaiABIInfo::classifyArgumentType(QualType Ty,
|
||||||
if (RAA == CGCXXABI::RAA_Indirect) {
|
if (RAA == CGCXXABI::RAA_Indirect) {
|
||||||
return getIndirectResult(Ty, /*ByVal=*/false, State);
|
return getIndirectResult(Ty, /*ByVal=*/false, State);
|
||||||
} else if (RAA == CGCXXABI::RAA_DirectInMemory) {
|
} else if (RAA == CGCXXABI::RAA_DirectInMemory) {
|
||||||
return getNaturalAlignIndirect(Ty, /*ByRef=*/true);
|
return getNaturalAlignIndirect(Ty, /*ByVal=*/true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue