jrtc27 added inline comments.

================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:10986
+        bool Ret = detectFPCCEligibleStructHelper(
+            B.getType(), CurOff, Field1Ty, Field1Off, Field2Ty, Field2Off);
+        if (!Ret)
----------------
craig.topper wrote:
> jrtc27 wrote:
> > 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)
> If it has a vtable wouldn't it have failed the `getRecordArgABI` check 
> earlier? I think the copy constructor would not be trivial in that case.
Quite possibly, I don't know all the details, just enough to be wary of 
ignoring it entirely


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131677/new/

https://reviews.llvm.org/D131677

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to