[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)
Hubert Tong via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 5 11:41:20 PDT 2024
================
@@ -393,6 +401,18 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::classifyArgumentType(QualType Ty) const {
+ bool IsTransparentUnion;
+ Ty = useFirstFieldIfTransparentUnion(Ty, IsTransparentUnion);
+
+ if (IsTransparentUnion && isPromotableIntegerTypeForABI(Ty))
----------------
hubert-reinterpretcast wrote:
I don't think `isPromotableIntegerTypeForABI` handles enums. We should add a enum test case (maybe with `-fshort-enums`).
https://github.com/llvm/llvm-project/pull/101738
More information about the cfe-commits
mailing list