[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 14:52:49 PST 2025
mingmingl-llvm wrote:
> > Taking a further look shows these preserved RTTIs come from vtables whose superclass has its type-id accessed.
>
> Thank you for helping evaluate this patch. I am curious about what these type IDs is used for—is it for dynamic_cast, exception handling, or the typeid operator?
I have two findings after some investigation
1. There is one use of `std::typeid` in a core templated library. The capture class type has a large subtree (protobuf message), which preserves nodes in its subtree. Luckily a source code change is feasible to remove the dependency on RTTI in the surrounding code.
2. The other finding is more open-ended and it is described in details in https://github.com/llvm/llvm-project/pull/126336#discussion_r1962473148 with some follow-up questions. We can discuss there.
https://github.com/llvm/llvm-project/pull/126336
More information about the llvm-commits
mailing list