[llvm-branch-commits] [CodeGen][CFI] Generalize transparent union in args of args of functions (PR #158194)
Vitaly Buka via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Sep 12 13:52:02 PDT 2025
================
@@ -2360,12 +2363,19 @@ static QualType GeneralizeType(ASTContext &Ctx, QualType Ty,
bool GeneralizePointers) {
Ty = GeneralizeTransparentUnion(Ty);
- if (!GeneralizePointers || !Ty->isPointerType())
+ if (!Ty->isPointerType())
+ return Ty;
+
+ QualType PTy = Ty->getPointeeType();
+ if (PTy->getAs<FunctionProtoType>() || PTy->getAs<FunctionNoProtoType>())
----------------
vitalybuka wrote:
Mangler is too late, if we have pointer generalization, it should apply to pointers form transparent union
https://github.com/llvm/llvm-project/pull/158194
More information about the llvm-branch-commits
mailing list