]> granicus.if.org Git - clang/commit
- Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward...
authorSebastian Redl <sebastian.redl@getdesigned.at>
Mon, 9 Aug 2010 21:55:28 +0000 (21:55 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Mon, 9 Aug 2010 21:55:28 +0000 (21:55 +0000)
commit74c730ad1f6818b676b0bad46d806a9176950328
tree5c18340b3ff50d40bbb77954d0b75ebd34550eb0
parent35cc9627340b15232139b3c43fcde5973e7fad30
- Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition.
- Eagerly create ObjCInterfaceTypes for declarations.
- The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another.
- Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110610 91177308-0d34-0410-b5e6-96231b3b80d8
20 files changed:
include/clang/AST/ASTConsumer.h
include/clang/AST/ASTContext.h
include/clang/AST/DeclObjC.h
include/clang/AST/Type.h
lib/AST/ASTConsumer.cpp
lib/AST/ASTContext.cpp
lib/AST/ASTImporter.cpp
lib/AST/DeclObjC.cpp
lib/AST/DeclPrinter.cpp
lib/AST/Type.cpp
lib/Frontend/ASTUnit.cpp
lib/Frontend/PCHReader.cpp
lib/Frontend/PCHReaderDecl.cpp
lib/Frontend/PCHWriter.cpp
lib/Frontend/PCHWriterDecl.cpp
lib/Sema/Sema.cpp
lib/Sema/SemaCodeComplete.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclObjC.cpp
test/Index/TestClassDecl.m