================
@@ -3452,23 +3456,34 @@ ABIArgInfo
WinX86_64ABIInfo::reclassifyHvaArgForVectorCall(
}
ABIArgInfo WinX86_64ABIInfo::classify(QualType Ty, unsigned &FreeSSERegs,
- bool IsReturnType, unsigned CC) const {
+ ClassifyKind Kind, unsigned CC) const {
bool IsVectorCall = CC == llvm::CallingConv::X86_VectorCall;
bool IsRegCall = CC == llvm::CallingConv::X86_RegCall;
if (Ty->isVoidType())
return ABIArgInfo::getIgnore();
- if (const auto *ED = Ty->getAsEnumDecl())
+ bool PromoteScopedEnum = false;
+ if (const auto *ED = Ty->getAsEnumDecl()) {
Ty = ED->getIntegerType();
+ PromoteScopedEnum = Kind == ClassifyKind::VarArg && ED->isScoped() &&
+ getContext().isPromotableIntegerType(Ty);
+ }
+
+ // MSVC extends scoped enums with a sub-int underlying type when they are
----------------
shafik wrote:
Do they have an ABI doc we can refer to or we have to figure this out just
based on MSVC behavior?
https://github.com/llvm/llvm-project/pull/221356
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits