diff options
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 14 |
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 //===----------------------------------------------------------------------===// |