diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-02 17:15:43 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-02 17:15:43 +0000 |
commit | 5ec02ae147760c32ad5b6fb0fec30ab3b3696778 (patch) | |
tree | 736264c2e86ceee0eb74e0904281a7a9df25cb9a /lib/AST/RecordLayoutBuilder.cpp | |
parent | f59ef9668d9ac7ae319d751a7cd4ed671525abfe (diff) |
In Sema, whenever we think that a function is going to cause a vtable to be generated, we mark any virtual implicit member functions as referenced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/RecordLayoutBuilder.cpp')
-rw-r--r-- | lib/AST/RecordLayoutBuilder.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp index 326a1dcd27..3a1e248dbc 100644 --- a/lib/AST/RecordLayoutBuilder.cpp +++ b/lib/AST/RecordLayoutBuilder.cpp @@ -677,6 +677,11 @@ static const CXXMethodDecl *GetKeyFunction(const CXXRecordDecl *RD) { if (MD->isPure()) continue; + // Ignore implicit member functions, they are always marked as inline, but + // they don't have a body until they're defined. + if (MD->isImplicit()) + continue; + const FunctionDecl *fn; if (MD->getBody(fn) && !fn->isOutOfLine()) continue; |