[cxx-abi-dev] std::type_info::hash_code/before

John McCall rjmccall at apple.com
Tue Oct 4 22:18:47 UTC 2016


> On Oct 4, 2016, at 3:06 PM, David Vandevoorde <daveed at edg.com> wrote:
>> On Oct 4, 2016, at 5:54 PM, John McCall <rjmccall at apple.com <mailto:rjmccall at apple.com>> wrote:
> […]
>> What we did for ARM64 seems like the right basic approach: the type_info object records whether it's unique or non-unique, and non-unique RTTI just falls back on string-based comparisons / hashes.  The type_info is unique if and only if it's for a fundamental type in the ABI library or a polymorphic class with a key function.
> 
> That sounds pretty good, but can it be done in a backward-compatible way?  I’m guessing not, but perhaps it’s “close enough”?

If you still made every effort to coalesce type_info names even for non-unique RTTI, and you found a way to record non-uniqueness that didn't mess up existing compiles, then interoperation would generally remain intact.  However, in my mind that would sacrifice the main benefit, which is that non-unique RTTI no longer require default visibility.  I should have been clear that I was noting this mostly as an "ABI v2" recommendation.

John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20161004/aa0ebe14/attachment.html>


More information about the cxx-abi-dev mailing list