diff options
author | Hans Wennborg <hans@hanshq.net> | 2014-05-30 16:59:42 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2014-05-30 16:59:42 +0000 |
commit | 853ae946607ab370e10703f1550c72404374efd9 (patch) | |
tree | d1c19b4e23b8cb47c93bd337841f8420ebfc5079 /clang/lib/CodeGen/CGCXX.cpp | |
parent | c002981084fc63573b6538415461af1783e5dc55 (diff) | |
download | bcm5719-llvm-853ae946607ab370e10703f1550c72404374efd9.tar.gz bcm5719-llvm-853ae946607ab370e10703f1550c72404374efd9.zip |
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
Diffstat (limited to 'clang/lib/CodeGen/CGCXX.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCXX.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp index 55c06f67865..24dc89d551f 100644 --- a/clang/lib/CodeGen/CGCXX.cpp +++ b/clang/lib/CodeGen/CGCXX.cpp @@ -44,6 +44,10 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) { if (!D->hasTrivialBody()) return true; + // For exported destructors, we need a full definition. + if (D->hasAttr<DLLExportAttr>()) + return true; + const CXXRecordDecl *Class = D->getParent(); // If we need to manipulate a VTT parameter, give up. |