MS ABI: Get linkage of RTTI data correct
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 3 Jul 2014 05:51:27 +0000 (05:51 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 3 Jul 2014 05:51:27 +0000 (05:51 +0000)
commit93de4b1608f196e641c44dea839b428cf0fb8cf7
treee93ce240cbed24fe060f563d5e2e2f1d16a3d403
parent78b84f5454a044e8d8d6c9d7b028cf98ba608c97
MS ABI: Get linkage of RTTI data correct

The Itanium rules are not appropriate for the MS ABI.  RTTI data is
_never_ imported and thus is never available_externally.  It is either
internal (if the type's linkage is internal) or linkonce_odr.

This also means that classes which inherit from dllimport'd bases force
their translation unit to duplicate the entirety of the RTTI data of
that base.

Interestingly, the complete object locator can never be referenced by
translation units which import the class.

This fixes PR20106.

llvm-svn: 212256
clang/lib/CodeGen/MicrosoftRTTI.cpp
clang/test/CodeGenCXX/dllimport-rtti.cpp [new file with mode: 0644]