aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHReaderDecl.cpp
AgeCommit message (Collapse)Author
2010-08-17Reintroduce the serialization library, with fixed dependencies.Sebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111279 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17Patch to add type parameter support for attribute iboutletcollection.Fariborz Jahanian
Radar 8308053. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17Revert Sebastian's build-breaking patch.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111265 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17Create a new Serialization module that contains all the PCH code, and will ↵Sebastian Redl
contain all the module code in the future. Update the Makefiles, CMake projects and the Xcode project. I hope I did everything right for Xcode. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111258 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-13Instead of modifying the ObjC AST to not modify existing declarations, teach ↵Sebastian Redl
chained PCH to overwrite declarations from earlier PCH files in dependent ones. Tell Sema to note when it changes AST nodes so that they have to be reserialized. Finally, the ObjCProtocolDecls created in forward decls, like the ObjCInterfaceDecls in @class forward decls, are not lexically part of the decl context; only the definition is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110989 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12Added locations and type source info for DeclarationName inside UsingDecl.Abramo Bagnara
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110912 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11Added locations and type source info for DeclarationName.Abramo Bagnara
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110860 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,Douglas Gregor
and create separate decl nodes for forward declarations and the definition," which appears to be causing significant Objective-C breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110803 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-09- Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for ↵Sebastian Redl
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
2010-08-09Complete PCH support for ObjCPropertyImplDecl.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110570 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-09Support ObjC implementation decls for PCH.Argyrios Kyrtzidis
Strictly speaking, implementations don't go in headers but there's no law against it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110567 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-09Refactor into functions PCH reading/writing the CXXBaseOrMemberInitializers. ↵Argyrios Kyrtzidis
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110566 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06Remove the DeclaredInCondition bit now that it's no longer used.Nick Lewycky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110432 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05Make sure C++ variable definitions are actually passed to the consumer when ↵Argyrios Kyrtzidis
loaded from PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110322 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05Implement #pragma GCC visibility.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110315 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03Apart from storing/retrieving the previous redeclaration from PCH, also ↵Argyrios Kyrtzidis
store/retrieve the most recent redeclaration. That way we are sure that the full redeclarations chain is loaded. When using chained PCHs, first declarations point to the most recent redeclarations in the same PCH. To address this use a REDECLS_UPDATE_LATEST record block to keep track of which first declarations need to point to a most recent redeclaration in another PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110125 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30Refactor the way PCHReader tracks whether we are in recursive loading.Argyrios Kyrtzidis
-Replace CurrentlyLoadingTypeOrDecl with a counting scheme (NumCurrentElementsDeserializing) -Provide outside access to the mechanism by adding methods StartedDeserializing/FinishedDeserializing to ExternalASTSource. These are preparation for the next commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109856 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29Store latest redeclaration for each redeclarable template declarationPeter Collingbourne
This patch adds a Latest field to RedeclarableTemplateDecl's CommonBase class which is used to store the latest redeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109755 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29Refactor redeclarable template declarationsPeter Collingbourne
This patch refactors much of the common code in ClassTemplateDecl and FunctionTemplateDecl into a common base class RedeclarableTemplateDecl together with support functions in a template class RedeclarableTemplate. The patch also includes similar refactoring for these classes' PCH reader and writer implementations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109754 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-27Update the list of lexical decls in the TU for chained PCHs. This makes ↵Sebastian Redl
-ast-print show the decls from the dependent PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109524 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-27- Fix recording of offsets of types in dependent PCHs.Sebastian Redl
- Stop reading in (and thus deserializing) every declaration in the TU when creating a dependent PCH. - Switch the storage of a decl context's lexical declarations to a blob containing the IDs instead of a record. This is the only sane way of supporting update records later on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109474 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26Add source location information to C++ base specifiers.Nick Lewycky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109396 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22Thread bitstream cursors all the way through the AST reading stuff. This ↵Sebastian Redl
way, reading a trivial 2-element chained file actually works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109191 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22atch for implementation of objective-c's -WselectorFariborz Jahanian
warning flag in clang. Little more to do for a PCH issue. Radar 6507158. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109129 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22Read/write C++0x static_assert for PCH.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109123 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22Allow loading declcontext information from any file in the chain. Properly ↵Sebastian Redl
write source locations to dependent files. WIP git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109119 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22Read/write FriendTemplateDecl for PCH.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109113 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20Apparently not every system thinks that references in pairs are as cool as I ↵Sebastian Redl
think. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108959 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20Allow loading declarations from any file in the chain. WIPSebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108956 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20Hide FunctionTemplateDecl's specializations folding set as implementation ↵Argyrios Kyrtzidis
detail and introduce FunctionTemplateDecl::findSpecialization. Redeclarations of specializations will not cause the previous decl to be removed from the set, the set will keep the canonical decl. findSpecialization will return the most recent redeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108834 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20Whether the specialization should be added to template's folding set when ↵Argyrios Kyrtzidis
read from PCH, is determined by a isCanonicalDecl check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108833 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19Remove PCHReader::getStream(), it was unused. Inline ↵Sebastian Redl
PCHReader::getDelsCursor() into its sole caller and remove it. This reduces the attack surface of multiple PCH files towards code outside the PCH implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108763 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17Added PCH/ASTImporter code for ObjCIvarDecl's field.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108627 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-16First baby steps towards PCHReader being able to keep track of multiple PCH ↵Sebastian Redl
files. WIP git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12Simplify code using the new FoldingSetImpl::InsertNode() overload.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108198 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-11Switch to void-cast for this. Chris prefers that over the attribute, I'llChandler Carruth
probably try and switch more of these if I can. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108085 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-11Mark assert-only variables as unused.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108068 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-09Reorganize how ClassTemplate[Partial]SpecializationDecls are read/written to ↵Argyrios Kyrtzidis
avoid the possibility of adding an unitialized one into the folding set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108016 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-09isMemberSpecialization -> setMemberSpecialization.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108015 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-08Support TemplateTemplateParmDecl for PCH.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107884 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-08Fix reading of UsingDecl from PCH.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107871 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-07Delay passing InterestingDecls to the Consumer until when we know we are not ↵Argyrios Kyrtzidis
in recursive loading and the declarations are fully initialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107783 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-06Pacify versions of gcc that think these variables may be usedDuncan Sands
uninitialized (which doesn't seem to be the case), by giving them arbitrary initial values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107679 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-06Read/write function template specializations for PCH, properly this time.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107665 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-06Allow a CXXRecordDecl to get a DefinitionData pointer even when its owner is ↵Argyrios Kyrtzidis
still initializing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107663 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-06Read/write instantiated-from-member of EnumDecl for PCH.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107662 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-05Read/write the identifier namespace in PCH for decls that may modify it.Argyrios Kyrtzidis
We can now use a PCH'ed <map>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107617 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-05Read/write some source location for PCH.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107616 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04Read/write more information of ASTContext for PCH. Overriden methods and ↵Argyrios Kyrtzidis
instantiated-from information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107597 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04Write/read ParmVarDecl's UninstantiatedDefaultArg for PCH.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107594 91177308-0d34-0410-b5e6-96231b3b80d8