]> granicus.if.org Git - clang/commit
When deserializing the definition of a C++ class/ObjC class/ObjC
authorDouglas Gregor <dgregor@apple.com>
Sun, 15 Jan 2012 18:08:05 +0000 (18:08 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sun, 15 Jan 2012 18:08:05 +0000 (18:08 +0000)
commitcc32b44ea4b3c702bf84eae0af27ca160bd90831
tree163825ac172ff1fd1325edc8ba9f5321ff9bb3c4
parent2171bf1caba4d4b9eeb6a91efac4300b41f38b07
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148223 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ASTMutationListener.h
include/clang/Serialization/ASTWriter.h
lib/AST/DeclObjC.cpp
lib/Serialization/ASTCommon.h
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriter.cpp
test/Modules/Inputs/redecl-merge-left-left.h
test/Modules/Inputs/redecl-merge-right.h
test/Modules/redecl-merge.m