[PATCH] D22296: CodeGen: Attach !splitpoint metadata to vtables under Itanium ABI.
Peter Collingbourne via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 18 18:00:35 PDT 2016
pcc added a comment.
> An amendment to the Itanium ABI requiring that a conforming program may not
> adjust a virtual table pointer loaded from an object to another virtual table
> in the same virtual table group would seem to be all that would be required
> to guarantee that this scheme will be ABI compatible with future compilers,
> and I'd be happy to drive such an amendment.
Actually, now that I've taken a closer look at the Itanium ABI, I think we're already covered, as the ABI specifies the calling sequence for virtual calls (https://mentorembedded.github.io/cxx-abi/abi.html#vcall.caller). As mentioned in that section, it would seem that the caller has to pass a pointer to the chosen subobject as the `this` pointer. This would seem to require that the caller choose a virtual function pointer appropriate to the chosen subobject, rather than some other subobject in another virtual table group (such a virtual function would by definition require a different this adjustment).
https://reviews.llvm.org/D22296
More information about the cfe-commits
mailing list