aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-02-17 18:06:05 +0000
committerDouglas Gregor <dgregor@apple.com>2011-02-17 18:06:05 +0000
commit2ae442a8a0974aee1da389a69857a4b6f2823c1a (patch)
tree9d1c7cf95dec9283dc9712d2601a6f6dd73193a6 /lib/AST/Decl.cpp
parentafdfdc05fe8b2442713f0150a5985a9c6d852cee (diff)
Devirtualize TagDecl::completeDefinition().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125755 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 8c55d0e7ab..d5e9dbf4fc 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -2128,13 +2128,6 @@ RecordDecl::field_iterator RecordDecl::field_begin() const {
return field_iterator(decl_iterator(FirstDecl));
}
-/// completeDefinition - Notes that the definition of this type is now
-/// complete.
-void RecordDecl::completeDefinition() {
- assert(!isDefinition() && "Cannot redefine record!");
- TagDecl::completeDefinition();
-}
-
void RecordDecl::LoadFieldsFromExternalStorage() const {
ExternalASTSource *Source = getASTContext().getExternalSource();
assert(hasExternalLexicalStorage() && Source && "No external storage?");
@@ -2160,6 +2153,13 @@ void RecordDecl::LoadFieldsFromExternalStorage() const {
llvm::tie(FirstDecl, LastDecl) = BuildDeclChain(Decls);
}
+void RecordDecl::completeDefinition() {
+ assert(!isDefinition() && "Cannot redefine record!");
+ TagDecl::completeDefinition();
+ if (CXXRecordDecl *CXXRecord = dyn_cast<CXXRecordDecl>(this))
+ CXXRecord->completeDefinitionImpl(0);
+}
+
//===----------------------------------------------------------------------===//
// BlockDecl Implementation
//===----------------------------------------------------------------------===//