[dllimport] A non-imported class with an imported key can't have a key
authorReid Kleckner <rnk@google.com>
Mon, 10 Aug 2015 19:39:01 +0000 (19:39 +0000)
committerReid Kleckner <rnk@google.com>
Mon, 10 Aug 2015 19:39:01 +0000 (19:39 +0000)
commitc2e3ba48e315312560a2fb26cbb8e8045ab9991e
tree7435985e66350f922596d4891892e781872dc207
parent5dcf15744336f698e9a0573f9606522af8470a41
[dllimport] A non-imported class with an imported key can't have a key

Summary:
The vtable takes its DLL storage class from the class, not the key
function. When they disagree, the vtable won't be exported by the DLL
that defines the key function. The easiest way to ensure that importers
of the class emit their own vtable is to say that the class has no key
function.

Reviewers: hans, majnemer

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11913

llvm-svn: 244488
clang/lib/AST/RecordLayoutBuilder.cpp
clang/test/CodeGenCXX/dllimport-rtti.cpp