]> granicus.if.org Git - clang/commit
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)
commitd2e599c10d93aa13d8faad2d475bce9274536740
treed9902b3511aa3c6feb388eef8c640855cc348880
parent512e9c089c2d020ab98bfd71c63e4d6e823d1a42
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212256 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MicrosoftRTTI.cpp
test/CodeGenCXX/dllimport-rtti.cpp [new file with mode: 0644]