[clang] [CodeGen] Added '*' to internal linkage types (PR #220864)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 7 04:17:55 PDT 2026
matthew-j-code wrote:
> How does this interact with libc++, and non-Linux targets?
The '*' is emitted for both libc++ and libstdc++, but no comparison method for libc++ is effected by including '*'. Libc++ has 3 implemented methods for comparison of typeinfo name, the default for internal-linkage types is pointer only comparison, which differs from libstdc++ strcmp (which is where the error stems from).
libcxx/include/typeinfo : (EFL default)
```
_LIBCPP_HIDE_FROM_ABI _LIBCPP_ALWAYS_INLINE static bool __eq(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
return __lhs == __rhs;
}
```
libcxx/include/typeinfo : (COFF default)
```
_LIBCPP_HIDE_FROM_ABI _LIBCPP_ALWAYS_INLINE static bool __eq(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
return __lhs == __rhs || __builtin_strcmp(__lhs, __rhs) == 0;
}
```
https://github.com/llvm/llvm-project/pull/220864
More information about the cfe-commits
mailing list