[PATCH] D152405: [WIP][clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 16:13:15 PDT 2023


leonardchan added a comment.

In D152405#4404596 <https://reviews.llvm.org/D152405#4404596>, @mcgrathr wrote:

> It's not clear from the change description if this can be enabled orthogonally to relative-vtables. I think it should be possible to choose each switch independently, thus generating 4 variants of the vtable layout ABI.

Oh this is completely independent from relative vtables. I'll update the wording.

> Does any runtime code (libc++abi) ever need to know the vtable layout details when actually making use of RTTI, such that it would need to adapt to this ABI change?

`__dynamic_cast` is the only thing that comes to mind, but since this is gated on `-fno-rtti` where dynamic_cast is disabled, then I think libc++abi doesn't need to worry about this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152405



More information about the cfe-commits mailing list