From c03c52ea017aa470a05e12fe2a7fda91a2e22e3a Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sun, 15 Jan 2012 18:08:05 +0000 Subject: When deserializing the definition of a C++ class/ObjC class/ObjC protocol, record the definition pointer in the canonical declaration for that entity, and then propagate that definition pointer from the canonical declaration to all other deserialized declarations. This approach works well even when deserializing declarations that didn't know about the original definition, which can occur with modules. A nice bonus from this definition-deserialization approach is that we no longer need update records when a definition is added, because the redeclaration chains ensure that the if any declaration is loaded, the definition will also get loaded. llvm-svn: 148223 --- clang/lib/AST/DeclObjC.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'clang/lib/AST/DeclObjC.cpp') diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index b0aeabf68f8..6a3bdfd4bb4 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/lib/AST/DeclObjC.cpp @@ -245,9 +245,6 @@ void ObjCInterfaceDecl::startDefinition() { if (*RD != this) RD->Data = Data; } - - if (ASTMutationListener *L = getASTContext().getASTMutationListener()) - L->CompletedObjCForwardRef(this); } /// getFirstClassExtension - Find first class extension of the given class. @@ -1058,9 +1055,6 @@ void ObjCProtocolDecl::startDefinition() { for (redecl_iterator RD = redecls_begin(), RDEnd = redecls_end(); RD != RDEnd; ++RD) RD->Data = this->Data; - - if (ASTMutationListener *L = getASTContext().getASTMutationListener()) - L->CompletedObjCForwardRef(this); } //===----------------------------------------------------------------------===// -- cgit v1.2.3