]> granicus.if.org Git - clang/commit
MS ABI: Don't always instantiate all members of dllexported class templates (PR20163)
authorHans Wennborg <hans@hanshq.net>
Thu, 21 Aug 2014 01:14:01 +0000 (01:14 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 21 Aug 2014 01:14:01 +0000 (01:14 +0000)
commitaeb085d5c3a7eb22fd2470584bd1884b7fb8cead
tree508ee282a6f83b0c25fd854d7e6447d749681238
parentd284ced36bc2ac81300b22e6154e1a789c0e4d35
MS ABI: Don't always instantiate all members of dllexported class templates (PR20163)

Normally we mark all members of exported classes referenced to get them emitted.

However, MSVC doesn't do this for class templates that are implicitly specialized or
just have an explicit instantiation declaration. For such specializations, the members
are emitted when referenced.

The exception is the case when the dllexport attribute is propagated from a base class
to a base class template that doesn't have an explicit attribute: in this case all
methods of the base class template do get instantiated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216145 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDeclCXX.cpp
test/CodeGenCXX/dllexport.cpp
test/SemaCXX/dllexport.cpp