[clang] clang: Make the type_info builtin declaration a singleton (PR #151277)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 5 07:16:29 PDT 2025


erichkeane wrote:

> I've noticed that this PR changed the tag type kind of the implicit `type_info` from `class` to `struct`. I don't know if it has any bad consequences, but it looks inconsistent with the definition of `std::type_info`.
> 
> Seems like it is a `class` in MSVC: https://godbolt.org/z/zj9asdE1a

Oh, interesting!  class vs struct can mangle differently in certain ABIs (and IIRC, Windows is one that it does!). That said, we mangle type_info special, so there is no real way I could find to notice the difference between class-vs-struct here.  

Either way, fixed here: 16766b3aef281a24acad08292ffe69554b44805b

https://github.com/llvm/llvm-project/pull/151277


More information about the cfe-commits mailing list