summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-05-30 16:59:42 +0000
committerHans Wennborg <hans@hanshq.net>2014-05-30 16:59:42 +0000
commit6ecc88615e99eaac5bfeb28207416e93118bbfa7 (patch)
treef3459218160cf8abc5e33cb4b6739ad0db0a57d1 /lib/Sema/SemaExpr.cpp
parentf6da0fd888382d274bbb0bfceab4724c701b4922 (diff)
downloadclang-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/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index be00c0e8b3..d767b3c8e7 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -11284,7 +11284,7 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func) {
Constructor = cast<CXXConstructorDecl>(Constructor->getFirstDecl());
if (Constructor->isDefaulted() && !Constructor->isDeleted()) {
if (Constructor->isDefaultConstructor()) {
- if (Constructor->isTrivial())
+ if (Constructor->isTrivial() && !Constructor->hasAttr<DLLExportAttr>())
return;
DefineImplicitDefaultConstructor(Loc, Constructor);
} else if (Constructor->isCopyConstructor()) {