diff options
author | dim <dim@FreeBSD.org> | 2015-09-06 18:36:24 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-09-06 18:36:24 +0000 |
commit | 4238dc458ed9a048965af111b979fd51d288f22c (patch) | |
tree | 3d3ed1e1987dbe6444294b1b4e249814b97b97a5 /lib/AST/RecordLayoutBuilder.cpp | |
parent | 6416b56f5a3923c6c264b46365e16718ccabf081 (diff) | |
download | FreeBSD-src-4238dc458ed9a048965af111b979fd51d288f22c.zip FreeBSD-src-4238dc458ed9a048965af111b979fd51d288f22c.tar.gz |
Import clang 3.7.0 release (r246257).
Diffstat (limited to 'lib/AST/RecordLayoutBuilder.cpp')
-rw-r--r-- | lib/AST/RecordLayoutBuilder.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp index 388c91c..de7bcb8 100644 --- a/lib/AST/RecordLayoutBuilder.cpp +++ b/lib/AST/RecordLayoutBuilder.cpp @@ -2014,6 +2014,12 @@ static const CXXMethodDecl *computeKeyFunction(ASTContext &Context, continue; } + // If the key function is dllimport but the class isn't, then the class has + // no key function. The DLL that exports the key function won't export the + // vtable in this case. + if (MD->hasAttr<DLLImportAttr>() && !RD->hasAttr<DLLImportAttr>()) + return nullptr; + // We found it. return MD; } |