aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/RecordLayoutBuilder.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-02 17:15:43 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-02 17:15:43 +0000
commit5ec02ae147760c32ad5b6fb0fec30ab3b3696778 (patch)
tree736264c2e86ceee0eb74e0904281a7a9df25cb9a /lib/AST/RecordLayoutBuilder.cpp
parentf59ef9668d9ac7ae319d751a7cd4ed671525abfe (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.cpp5
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;