[clang] [clang] Add builtin_get_vtable_pointer and virtual_member_address (PR #135469)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 15 13:26:16 PDT 2025
ojhunt wrote:
> Oof. On the one hand, we don't want to break your existing users. On the other hand, we don't want to force the much broader audience of users into a worse interface. Are those uses in your downstream able to use things like fix-its to switch from the reference-based interface to a pointer-based interface? (Basically, is there a transition approach that leads to a better world?)
I sent this in discord rather than in GH where the reply can be seen by others and not lost to time:
> i'm going to revert the addition of reference parameter i added to __builtin_get_vtable_pointer, for the suboptimal behavior of __builtin_virtual_member_address, i could make it pointer argument only by default, with a flag to permit reference parameters and a deprecation warning so that it's only no new users of a reference argument arrive and we can drop it entirely once all existing users have migrated
https://github.com/llvm/llvm-project/pull/135469
More information about the cfe-commits
mailing list