Start adding support for dllimport/dllexport on classes (PR11170)
authorHans Wennborg <hans@hanshq.net>
Fri, 30 May 2014 16:59:42 +0000 (16:59 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 30 May 2014 16:59:42 +0000 (16:59 +0000)
commit853ae946607ab370e10703f1550c72404374efd9
treed1c19b4e23b8cb47c93bd337841f8420ebfc5079
parentc002981084fc63573b6538415461af1783e5dc55
Start adding support for dllimport/dllexport on classes (PR11170)

This implements the central part of support for dllimport/dllexport on
classes: allowing the attribute on class declarations, inheriting it
to class members, and forcing emission of exported members. It's based
on Nico Rieck's patch from http://reviews.llvm.org/D1099.

This patch doesn't propagate dllexport to bases that are template
specializations, which is an interesting problem. It also doesn't
look at the rules when redeclaring classes with different attributes,
I'd like to do that separately.

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

llvm-svn: 209908
clang/include/clang/Basic/Attr.td
clang/lib/CodeGen/CGCXX.cpp
clang/lib/CodeGen/CGClass.cpp
clang/lib/CodeGen/CGVTables.cpp
clang/lib/CodeGen/MicrosoftCXXABI.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/CodeGenCXX/dllexport.cpp
clang/test/CodeGenCXX/dllimport.cpp
clang/test/SemaCXX/dllexport.cpp
clang/test/SemaCXX/dllimport.cpp