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 | 6ecc88615e99eaac5bfeb28207416e93118bbfa7 (patch) | |
| tree | f3459218160cf8abc5e33cb4b6739ad0db0a57d1 /lib/CodeGen/CGClass.cpp | |
| parent | f6da0fd888382d274bbb0bfceab4724c701b4922 (diff) | |
| download | clang-6ecc88615e99eaac5bfeb28207416e93118bbfa7.tar.gz clang-6ecc88615e99eaac5bfeb28207416e93118bbfa7.tar.bz2 clang-6ecc88615e99eaac5bfeb28207416e93118bbfa7.tar.xz | |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209908 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
| -rw-r--r-- | lib/CodeGen/CGClass.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp index 97bea97734..e82ac1df53 100644 --- a/lib/CodeGen/CGClass.cpp +++ b/lib/CodeGen/CGClass.cpp @@ -1425,8 +1425,8 @@ namespace { /// in reverse order of their construction. void CodeGenFunction::EnterDtorCleanups(const CXXDestructorDecl *DD, CXXDtorType DtorType) { - assert(!DD->isTrivial() && - "Should not emit dtor epilogue for trivial dtor!"); + assert((!DD->isTrivial() || DD->hasAttr<DLLExportAttr>()) && + "Should not emit dtor epilogue for non-exported trivial dtor!"); // The deleting-destructor phase just needs to call the appropriate // operator delete that Sema picked up. |
