[PATCH] D28212: typeinfo: provide a partial implementation for Win32

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 1 14:53:20 PST 2017


compnerd created this revision.
compnerd added reviewers: EricWF, mclow.lists, majnemer, rnk.
compnerd added subscribers: smeenai, kastiglione, cfe-commits.
compnerd set the repository for this revision to rL LLVM.

The RTTI structure is different on Windows when building under MS ABI.
Update the definition to reflect this.  The structure itself contains an
area for caching the undecorated name (which is 0-initialized).  The
decorated name has a bitfield followed by the linkage name.  When
std::type_info::name is invoked for the first time, the runtime should
undecorate the name, cache it, and return the undecorated name.  This
requires access to an implementation of `__unDName`.  For now, return
the raw name.

This uses the fnv-1a hash to hash the name of the RTTI.  We could use an alternate hash (murmur?  city?), but, this was the quickest to throw together.


Repository:
  rL LLVM

https://reviews.llvm.org/D28212

Files:
  include/typeinfo
  src/typeinfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28212.82790.patch
Type: text/x-patch
Size: 3006 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170101/caf06cef/attachment.bin>


More information about the cfe-commits mailing list