]> granicus.if.org Git - clang/commit
Move the definition-specific data of ObjCInterfaceDecl into a
authorDouglas Gregor <dgregor@apple.com>
Thu, 15 Dec 2011 05:27:12 +0000 (05:27 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 15 Dec 2011 05:27:12 +0000 (05:27 +0000)
commit2e5c15be82f362611c5928ce853d0685ff98c766
tree8b23e367ea5a70ddf92adc54293271df5f5c1d08
parentfa39f5b76bafdf536c5e305f821eb1b7f11079bd
Move the definition-specific data of ObjCInterfaceDecl into a
separately-allocated DefinitionData structure, which we manage the
same way as CXXRecordDecl::DefinitionData. This prepares the way for
making ObjCInterfaceDecls redeclarable, to more accurately model
forward declarations of Objective-C classes and eliminate the mutation
of ObjCInterfaceDecl that causes us serious trouble in the AST reader.

Note that ObjCInterfaceDecl's accessors are fairly robust against
being applied to forward declarations, because Clang (and Sema in
particular) doesn't perform RequireCompleteType/hasDefinition() checks
everywhere it has to. Each of these overly-robust cases is marked with
a FIXME, which we can tackle over time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146644 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/DeclObjC.h
include/clang/Serialization/ASTReader.h
lib/AST/ASTImporter.cpp
lib/AST/DeclObjC.cpp
lib/AST/DeclPrinter.cpp
lib/Sema/SemaCodeComplete.cpp
lib/Sema/SemaDeclObjC.cpp
lib/Sema/SemaExprObjC.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp
tools/libclang/IndexingContext.cpp