[Sema] Respect DLL attributes more faithfully
authorShoaib Meenai <smeenai@fb.com>
Mon, 5 Dec 2016 18:01:35 +0000 (18:01 +0000)
committerShoaib Meenai <smeenai@fb.com>
Mon, 5 Dec 2016 18:01:35 +0000 (18:01 +0000)
commitfc78d7cb8e5c0c849950fca7d69d81485f3513e1
tree80447485bbdcf3026d69292bbc6059f28a724f75
parentc14916dae7f76938f0d1460a54b71154eaaecb79
[Sema] Respect DLL attributes more faithfully

On MSVC, if an implicit instantiation already exists and an explicit
instantiation definition with a DLL attribute is created, the DLL
attribute still takes effect. Make clang match this behavior for
exporting.

Differential Revision: https://reviews.llvm.org/D26657

llvm-svn: 288682
clang/lib/Sema/SemaTemplate.cpp
clang/test/CodeGenCXX/dllexport.cpp
clang/test/CodeGenCXX/windows-itanium-dllexport.cpp