[PATCH] D53870: [clang-cl] Put dllexport attrs on static locals also in template instantiations (PR39496)
Hans Wennborg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 30 08:08:31 PDT 2018
hans created this revision.
hans added reviewers: rnk, thakis, takuto.ikuta.
In the course of https://reviews.llvm.org/D51340, @takuto.ikuta discovered that Clang fails to put dllexport/import attributes on static locals during template instantiation.
For regular functions, this happens in Sema::FinalizeDeclaration(), however for template instantiations we need to do something in or around TemplateDeclInstantiator::VisitVarDecl(). This patch does that, and extracts the code to a utility function.
Please take a look!
https://reviews.llvm.org/D53870
Files:
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
test/CodeGenCXX/dllexport.cpp
test/CodeGenCXX/dllimport.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53870.171702.patch
Type: text/x-patch
Size: 5273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181030/f09c2c56/attachment.bin>
More information about the cfe-commits
mailing list