summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReaderDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Apart from storing/retrieving the previous redeclaration from PCH, also ↵Argyrios Kyrtzidis2010-08-031-13/+78
| | | | | | | | | | | | 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. llvm-svn: 110125
* Refactor the way PCHReader tracks whether we are in recursive loading.Argyrios Kyrtzidis2010-07-301-1/+1
| | | | | | | | | | -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. llvm-svn: 109856
* Store latest redeclaration for each redeclarable template declarationPeter Collingbourne2010-07-291-0/+5
| | | | | | | This patch adds a Latest field to RedeclarableTemplateDecl's CommonBase class which is used to store the latest redeclaration. llvm-svn: 109755
* Refactor redeclarable template declarationsPeter Collingbourne2010-07-291-24/+25
| | | | | | | | | | | 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. llvm-svn: 109754
* Update the list of lexical decls in the TU for chained PCHs. This makes ↵Sebastian Redl2010-07-271-1/+5
| | | | | | -ast-print show the decls from the dependent PCH. llvm-svn: 109524
* - Fix recording of offsets of types in dependent PCHs.Sebastian Redl2010-07-271-5/+35
| | | | | | | - 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. llvm-svn: 109474
* Add source location information to C++ base specifiers.Nick Lewycky2010-07-261-3/+3
| | | | llvm-svn: 109396
* Thread bitstream cursors all the way through the AST reading stuff. This ↵Sebastian Redl2010-07-221-36/+53
| | | | | | way, reading a trivial 2-element chained file actually works. llvm-svn: 109191
* atch for implementation of objective-c's -WselectorFariborz Jahanian2010-07-221-0/+1
| | | | | | | warning flag in clang. Little more to do for a PCH issue. Radar 6507158. llvm-svn: 109129
* Read/write C++0x static_assert for PCH.Argyrios Kyrtzidis2010-07-221-2/+4
| | | | llvm-svn: 109123
* Allow loading declcontext information from any file in the chain. Properly ↵Sebastian Redl2010-07-221-1/+6
| | | | | | write source locations to dependent files. WIP llvm-svn: 109119
* Read/write FriendTemplateDecl for PCH.Argyrios Kyrtzidis2010-07-221-2/+12
| | | | llvm-svn: 109113
* Apparently not every system thinks that references in pairs are as cool as I ↵Sebastian Redl2010-07-201-2/+2
| | | | | | think. llvm-svn: 108959
* Allow loading declarations from any file in the chain. WIPSebastian Redl2010-07-201-3/+17
| | | | llvm-svn: 108956
* Hide FunctionTemplateDecl's specializations folding set as implementation ↵Argyrios Kyrtzidis2010-07-201-5/+6
| | | | | | | | | | | 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. llvm-svn: 108834
* Whether the specialization should be added to template's folding set when ↵Argyrios Kyrtzidis2010-07-201-1/+1
| | | | | | | | read from PCH, is determined by a isCanonicalDecl check. llvm-svn: 108833
* Remove PCHReader::getStream(), it was unused. Inline ↵Sebastian Redl2010-07-191-1/+1
| | | | | | PCHReader::getDelsCursor() into its sole caller and remove it. This reduces the attack surface of multiple PCH files towards code outside the PCH implementation. llvm-svn: 108763
* Added PCH/ASTImporter code for ObjCIvarDecl's field.Fariborz Jahanian2010-07-171-0/+2
| | | | llvm-svn: 108627
* First baby steps towards PCHReader being able to keep track of multiple PCH ↵Sebastian Redl2010-07-161-0/+2
| | | | | | files. WIP llvm-svn: 108537
* Simplify code using the new FoldingSetImpl::InsertNode() overload.Argyrios Kyrtzidis2010-07-121-8/+2
| | | | llvm-svn: 108198
* Switch to void-cast for this. Chris prefers that over the attribute, I'llChandler Carruth2010-07-111-3/+4
| | | | | | probably try and switch more of these if I can. llvm-svn: 108085
* Mark assert-only variables as unused.Chandler Carruth2010-07-111-2/+3
| | | | llvm-svn: 108068
* Reorganize how ClassTemplate[Partial]SpecializationDecls are read/written to ↵Argyrios Kyrtzidis2010-07-091-26/+20
| | | | | | | | avoid the possibility of adding an unitialized one into the folding set. llvm-svn: 108016
* isMemberSpecialization -> setMemberSpecialization.Argyrios Kyrtzidis2010-07-091-1/+1
| | | | llvm-svn: 108015
* Support TemplateTemplateParmDecl for PCH.Argyrios Kyrtzidis2010-07-081-3/+11
| | | | llvm-svn: 107884
* Fix reading of UsingDecl from PCH.Argyrios Kyrtzidis2010-07-081-1/+3
| | | | llvm-svn: 107871
* Delay passing InterestingDecls to the Consumer until when we know we are not ↵Argyrios Kyrtzidis2010-07-071-10/+5
| | | | | | | | in recursive loading and the declarations are fully initialized. llvm-svn: 107783
* Pacify versions of gcc that think these variables may be usedDuncan Sands2010-07-061-3/+3
| | | | | | | uninitialized (which doesn't seem to be the case), by giving them arbitrary initial values. llvm-svn: 107679
* Read/write function template specializations for PCH, properly this time.Argyrios Kyrtzidis2010-07-061-3/+6
| | | | llvm-svn: 107665
* Allow a CXXRecordDecl to get a DefinitionData pointer even when its owner is ↵Argyrios Kyrtzidis2010-07-061-47/+63
| | | | | | still initializing. llvm-svn: 107663
* Read/write instantiated-from-member of EnumDecl for PCH.Argyrios Kyrtzidis2010-07-061-1/+2
| | | | llvm-svn: 107662
* Read/write the identifier namespace in PCH for decls that may modify it.Argyrios Kyrtzidis2010-07-051-6/+8
| | | | | | We can now use a PCH'ed <map>. llvm-svn: 107617
* Read/write some source location for PCH.Argyrios Kyrtzidis2010-07-051-1/+5
| | | | llvm-svn: 107616
* Read/write more information of ASTContext for PCH. Overriden methods and ↵Argyrios Kyrtzidis2010-07-041-0/+19
| | | | | | instantiated-from information. llvm-svn: 107597
* Write/read ParmVarDecl's UninstantiatedDefaultArg for PCH.Argyrios Kyrtzidis2010-07-041-0/+2
| | | | llvm-svn: 107594
* Read/write specialization info of static data members for PCH.Argyrios Kyrtzidis2010-07-041-0/+7
| | | | llvm-svn: 107593
* When setting the anonymous namespace at PCH reading, it may still be ↵Argyrios Kyrtzidis2010-07-031-6/+2
| | | | | | | | initializing so avoid the invariant checks at NamespaceDecl::setAnonymousNamespace(). llvm-svn: 107566
* Lazily declare default constructors. We now delay the construction ofDouglas Gregor2010-07-031-0/+1
| | | | | | | | | | | | | | | | | | declarations for implicit default constructors, copy constructors, copy assignment operators, and destructors. On a "simple" translation unit that includes a bunch of C++ standard library headers, we generate relatively few of these implicit declarations now: 4/159 implicit default constructors created 18/236 implicit copy constructors created 70/241 implicit copy assignment operators created 0/173 implicit destructors created And, on this translation unit, this optimization doesn't really provide any benefit. I'll do some more performance measurements soon, but this completes the implementation work for <rdar://problem/8151045>. llvm-svn: 107551
* Lazily declare implicit copy constructors.Douglas Gregor2010-07-021-0/+1
| | | | llvm-svn: 107543
* Read/write CastExpr's CXXBaseSpecifierArray for PCH.Argyrios Kyrtzidis2010-07-021-13/+2
| | | | llvm-svn: 107542
* Lazily declare copy-assignment operators.Douglas Gregor2010-07-021-0/+1
| | | | llvm-svn: 107521
* Lazily declare the implicitly-declared destructor in a C++ class.Douglas Gregor2010-07-021-0/+1
| | | | llvm-svn: 107510
* Handle CXXConstructorDecl, CXXDestructorDecl, and CXXConversionDecl for PCH.Argyrios Kyrtzidis2010-07-021-8/+74
| | | | | | <vector> header can be used correctly through PCH now. llvm-svn: 107483
* Fix reading FunctionDecls from PCH.Argyrios Kyrtzidis2010-07-021-25/+26
| | | | llvm-svn: 107477
* Fix reading ClassTemplateDecl's ClassTemplateSpecializationDecls and ↵Argyrios Kyrtzidis2010-07-021-7/+9
| | | | | | | | ClassTemplatePartialSpecializationDecls. Store/read also their template arguments because they may be initializing and not be able to provide them. llvm-svn: 107476
* Fully read/write CXXRecordDecl for PCH.Argyrios Kyrtzidis2010-07-021-31/+49
| | | | llvm-svn: 107475
* Generally types expect an initialized TypeDecl; its safer and less ↵Argyrios Kyrtzidis2010-07-021-8/+15
| | | | | | complicated to delay PCH reading the type of a TypeDecl. llvm-svn: 107469
* Add some side-effect free Create methods for TypeDecl subclasses and use ↵Argyrios Kyrtzidis2010-07-021-8/+7
| | | | | | them for PCH reading. llvm-svn: 107468
* Fix PCH support for UnresolvedUsingTypenameDecl and UnresolvedUsingValueDecl.Argyrios Kyrtzidis2010-06-301-4/+4
| | | | llvm-svn: 107268
* Support C++ friend declarations for PCH.Argyrios Kyrtzidis2010-06-291-2/+15
| | | | | | | | | | | | This commit 'introduces' a slightly different way to restore the state of the AST object. It makes PCHDeclReader/PCHDeclWriter friends and gives them access to the private members of the object. The rationale is to avoid using/modifying the AST interfaces for PCH read/write so that to: -Avoid complications with objects that have side-effects during creation or when using some setters. -Not 'pollute' the AST interface with methods only used by the PCH reader/writer -Allow AST objects to be read-only. llvm-svn: 107219
OpenPOWER on IntegriCloud