[PATCH] D131677: [clang][RISCV] Fix incorrect ABI lowering for inherited structs under hard-float ABIs
Jessica Clarke via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 11 11:22:54 PDT 2022
jrtc27 added inline comments.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:10986
+ bool Ret = detectFPCCEligibleStructHelper(
+ B.getType(), CurOff, Field1Ty, Field1Off, Field2Ty, Field2Off);
+ if (!Ret)
----------------
jrtc27 wrote:
> With multiple inheritance this offset won't make sense, and it gets particularly fun with diamond virtual inheritance. This is a minefield.
>
> And what about non-standard layout classes in general, like the simple ones that just have a vtable, not just ones that have virtual inheritance somwhere?
(you at least need `uint64_t BaseOffInBits = Layout.getBaseClassOffset(&B)` and to add `getContext().toCharUnitsFromBits(BaseOffInBits)` like the field case, then there's the question of non-standard layout classes)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131677/new/
https://reviews.llvm.org/D131677
More information about the cfe-commits
mailing list