[clang] Fix codegen for transparent_union function params (PR #104816)
Lei Huang via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 21 08:10:44 PDT 2024
lei137 wrote:
> I think the issue could be handled a different (more generic) way, by pulling `useFirstFieldIfTransparentUnion` to the caller and taking transparent unions into account when emitting LLVM IR for the formal / actual parameters somewhere in `CGCall.cpp`, so that ABIInfo implementations don't need to care about transparent unions at all.
I am not familiar with the calling convention and ABI to know if this is how it should be done. It sounds like a reasonable improvement in how we can implement this. However I feel like it is out of scope for what I am trying to do right now. Would this be better as a separate PR to change how this is handled? This PR would fix the current codegen bug that is seen.
https://github.com/llvm/llvm-project/pull/104816
More information about the cfe-commits
mailing list