summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReaderDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Major anonymous union/struct redesign.Francois Pichet2010-11-211-0/+16
| | | | | | | | | | | A new AST node is introduced: def IndirectField : DDecl<Value>; IndirectFields are injected into the anonymous's parent scope and chain back to the original field. Name lookup for anonymous entities now result in an IndirectFieldDecl instead of a FieldDecl. There is no functionality change, the code generated should be the same. llvm-svn: 119919
* For an Objective-C @synthesize statement, e.g.,Douglas Gregor2010-11-171-3/+5
| | | | | | | | | @synthesize foo = _foo; keep track of the location of the ivar ("_foo"). Teach libclang to visit the ivar as a member reference. llvm-svn: 119447
* Replace UsingDecl's SmallPtrSet of UsingShadowDecls with a linked list to ↵Argyrios Kyrtzidis2010-11-101-11/+2
| | | | | | | | avoid leaking memory. Fixes rdar://8649963. llvm-svn: 118674
* Remove broken support for variadic templates, along with the variousDouglas Gregor2010-11-071-3/+5
| | | | | | | | | | | | | abstractions (e.g., TemplateArgumentListBuilder) that were designed to support variadic templates. Only a few remnants of variadic templates remain, in the parser (parsing template type parameter packs), AST (template type parameter pack bits and TemplateArgument::Pack), and Sema; these are expected to be used in a future implementation of variadic templates. But don't get too excited about that happening now. llvm-svn: 118385
* Make the deserialization of C++ base class specifiers lazy, improvingDouglas Gregor2010-10-291-14/+8
| | | | | | the performance of C++ PCH and reducing stack depth in the reader. llvm-svn: 117732
* Remove an assertion that hit on legitimate cases. A redeclaration may have ↵Argyrios Kyrtzidis2010-10-281-6/+0
| | | | | | | | location before the first one if the redeclaration comes from a friend decl. llvm-svn: 117537
* Use the ASTMutationListener to track added template specializations in a ↵Argyrios Kyrtzidis2010-10-281-14/+4
| | | | | | chained PCH. llvm-svn: 117533
* Make AST deserialization for class template specializations lazier, byDouglas Gregor2010-10-271-16/+31
| | | | | | | not loading the specializations of a class template until some AST consumer needs them. llvm-svn: 117498
* Lazily load the next friend in the chain of FriendDecls, to eliminateDouglas Gregor2010-10-271-1/+1
| | | | | | some excessive recursion and deserialization. llvm-svn: 117480
* Lazily load the "next" namespace in the chain of NamespaceDecls, toDouglas Gregor2010-10-271-4/+3
| | | | | | eliminate some excessive recursion and deserialization. llvm-svn: 117476
* Keep track in chained PCH of implicit members that were added after the ↵Argyrios Kyrtzidis2010-10-241-0/+4
| | | | | | definition was completed. llvm-svn: 117240
* Start fleshing out ASTMutationListener; notify when a tag definition is ↵Argyrios Kyrtzidis2010-10-241-1/+13
| | | | | | | | | completed. In that case a chained PCH will record the updates to the DefinitionData pointer of forward references. If a forward reference mutated into a definition re-write it into the chained PCH, this is too big of a change. llvm-svn: 117239
* Refactoring.Argyrios Kyrtzidis2010-10-241-8/+23
| | | | | | | - Pass around RecordDataImpl instead of the concrete RecordData so that any SmallVector can be used. - Move ASTDeclWriter::WriteCXXDefinitionData to ASTWriter::AddCXXDefinitionData. llvm-svn: 117236
* Put the mechanism in place to track modifications in an AST entity that were ↵Argyrios Kyrtzidis2010-10-241-0/+29
| | | | | | | | | | | | committed after its initial creation/deserialization and store the changes in a chained PCH. The idea is that the AST entities call methods on the ASTMutationListener to give notifications of changes; the PCHWriter implements the ASTMutationListener interface and stores the incremental changes of the updated entity. WIP llvm-svn: 117235
* Simplify and "robust-ify" the way that CXXRecord references point to the ↵Argyrios Kyrtzidis2010-10-241-40/+27
| | | | | | | | definition data when loaded from PCH. Temporary disable 'test/PCH/chain-cxx.cpp' until a better way to fix it is in place. llvm-svn: 117234
* Minor refactoring; Pull reading/writing DefinitionData out into a function.Argyrios Kyrtzidis2010-10-241-49/+54
| | | | llvm-svn: 117233
* Modify the assumptions of an assert; the updated latest redeclaration can ↵Argyrios Kyrtzidis2010-10-201-6/+6
| | | | | | | | have the same location if it's a template specialization pointing at the template. llvm-svn: 116974
* Minor optimization; Try to iterator over redeclarations only when necessary.Argyrios Kyrtzidis2010-10-201-9/+8
| | | | llvm-svn: 116930
* Fix issue with chained PCH where forward references did not pick up later ↵Argyrios Kyrtzidis2010-10-201-0/+18
| | | | | | definition in the chained PCH. llvm-svn: 116887
* Read/write declaration attributes from/to PCH properly. Embed them in the ↵Argyrios Kyrtzidis2010-10-181-16/+5
| | | | | | | | | declaration block instead of trying to create another block. The new block was messing with the assumption that after decls block comes the stmts block. Fixes http://llvm.org/PR8406 llvm-svn: 116737
* White-listing templated-scope friend decls is a good idea, but doing itJohn McCall2010-10-161-0/+1
| | | | | | | | by marking the decl invalid isn't. Make some steps towards supporting these and then hastily shut them down at the last second by marking them as unsupported. llvm-svn: 116661
* Read/write to/from PCH DeclarationNameLocs, DeclarationNameInfos and ↵Argyrios Kyrtzidis2010-10-151-10/+30
| | | | | | QualifierInfos (rdar://8513756). llvm-svn: 116598
* Store in PCH the key function of C++ class to avoid deserializing the ↵Argyrios Kyrtzidis2010-10-141-0/+9
| | | | | | | | complete declaration context in order to compute it. Progress for rdar://7260160. llvm-svn: 116508
* Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked aDouglas Gregor2010-10-081-1/+6
| | | | | | bit by me). llvm-svn: 116122
* Serialize the "inline" bit for namespaces. Fixes <rdar://problem/8515069>.Douglas Gregor2010-10-051-0/+1
| | | | llvm-svn: 115667
* Give every file that ASTReader loads a type: module, PCH, precompiled ↵Sebastian Redl2010-10-051-1/+1
| | | | | | preamble or main file. Base Decls' PCHLevel on this to make it more sane. llvm-svn: 115626
* Thread PerFileData through the ASTReader again, this time with the LLVM changes.Sebastian Redl2010-10-051-98/+110
| | | | llvm-svn: 115625
* Revert r115336 ("Thread PerFileData through everything."), becauseDouglas Gregor2010-10-011-110/+98
| | | | | | we're missing the corresponding changes in the LLVM repository. llvm-svn: 115340
* Thread PerFileData through everything. This allows us to remap stuff later.Sebastian Redl2010-10-011-98/+110
| | | | llvm-svn: 115336
* Kill FunctionDecl's IsCopyAssignment bit; it duplicated what couldDouglas Gregor2010-09-271-1/+0
| | | | | | | | already be determined by isCopyAssignmentOperator(), and was set too late in the process for all clients to see the appropriate value. Cleanup only; no functionality change. llvm-svn: 114916
* Fix C++ PCH issue.Argyrios Kyrtzidis2010-09-131-3/+7
| | | | | | | | The canonical FunctionTemplateDecl contains the specializations but we cannot use getCanonicalDecl on Template because it may still be initializing. Write and read it from PCH. Fixes http://llvm.org/PR8134 llvm-svn: 113744
* Avoid setters in ASTDeclReader::VisitClassTemplatePartialSpecializationDecl.Argyrios Kyrtzidis2010-09-131-11/+13
| | | | llvm-svn: 113743
* Avoid setters in ASTDeclReader::VisitClassTemplateSpecializationDecl.Argyrios Kyrtzidis2010-09-131-12/+21
| | | | llvm-svn: 113742
* Avoid setters in ASTDeclReader::VisitCXXRecordDecl.Argyrios Kyrtzidis2010-09-131-4/+5
| | | | llvm-svn: 113741
* Fix C++ PCH issue.Argyrios Kyrtzidis2010-09-091-14/+21
| | | | | | | | | Another beating by boost in this test case: http://llvm.org/PR8117 A function specialization wasn't properly initialized if it wasn't canonical. I wish there was a nice little test case but this was boost. llvm-svn: 113481
* Re-enable CheckAccessDeclContext and make sure it doesn't trigger assertions.Argyrios Kyrtzidis2010-09-081-2/+1
| | | | llvm-svn: 113413
* Fix C++ PCH issues.Argyrios Kyrtzidis2010-09-081-13/+32
| | | | | | | | | | | PCH got a severe beating by the boost-using test case reported here: http://llvm.org/PR8099 Fix issues like: -When PCH reading, make sure Decl's getASTContext() doesn't get called since a Decl in the parent hierarchy may be initializing. -In ASTDeclReader::VisitFunctionDecl VisitRedeclarable should be called before using FunctionDecl's isCanonicalDecl() -In ASTDeclReader::VisitRedeclarableTemplateDecl CommonOrPrev must be initialized before anything else. llvm-svn: 113391
* Implement libclang support for using declarations. Clang actually usesDouglas Gregor2010-09-011-4/+4
| | | | | | | | | | | | | | | | three different kinds of AST nodes to represent using declarations: UsingDecl, UnresolvedUsingValueDecl, and UnresolvedUsingTypenameDecl. These three are collapsed into a single cursor kind for using declarations, since libclang clients don't need the distinction. Several related changes here: - Cursor visitation of the three AST nodes for using declarations - Proper source-range computation for these AST nodes - Using declarations have no USRs, since they don't actually declare any entities. llvm-svn: 112730
* Implement libclang support for using directives (cursor + visitation +Douglas Gregor2010-09-011-7/+6
| | | | | | | | suppressing USRs). Also, fix up the source location information for using directives so that the declaration location refers to the namespace name. llvm-svn: 112693
* Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ↵Ted Kremenek2010-09-011-0/+13
| | | | | | | | | | | | | ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols (and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is needed to maintain the lexical information of the original source. Fixes <rdar://problem/8380046>. llvm-svn: 112691
* Improve location information in the representation of namespaceDouglas Gregor2010-09-011-4/+3
| | | | | | | | | | | | | | | | aliases. Previously, the location of the alias was at the "namespace" keyword. Now, it's on the identifier being declared (as is the custom for Clang), and we keep a separate source location for the "namespace" keyword. Also, added a getSourceRange() member function to NamespaceAliasDecl to correctly compute the source range. Finally, removed a bunch of setters from NamespaceAliasDecl and gave ASTReaderDecl friendship so that it could set the corresponding fields directly. llvm-svn: 112681
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-6/+6
| | | | | | This lets us remove Sema.h's dependency on Expr.h and Decl.h. llvm-svn: 112156
* AST reader support for having specializations of templates from earlier in ↵Sebastian Redl2010-08-241-0/+14
| | | | | | the chain. llvm-svn: 111985
* Read the UPDATE_VISIBLE record, and add its visible decls to the lookup ↵Sebastian Redl2010-08-241-3/+19
| | | | | | tables. Also, free the lookup tables when destructing the ASTReader. llvm-svn: 111880
* Support for IRGen of synthesize bitfield ivars inFariborz Jahanian2010-08-231-0/+2
| | | | | | objc-nonfragile-abi2 (radar 7824380). llvm-svn: 111823
* objective-c ivar refactoring patch. IterationsFariborz Jahanian2010-08-201-0/+4
| | | | | | | | over ivars for a varienty of puposes is now consolidated into two small routines; DeepCollectObjCIvars and ShallowCollectObjCIvars. llvm-svn: 111679
* Use the AST on-disk hash table for name lookup inside a DeclContext.Argyrios Kyrtzidis2010-08-201-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *Huge* improvement over the amount of deserializing that we do for C++ lookup. e.g, if he have the Carbon header precompiled and include it on a file containing this: int x; these are the before/after stats: BEFORE: *** AST File Statistics: 578 stat cache hits 4 stat cache misses 548/30654 source location entries read (1.787695%) 15907/16501 types read (96.400223%) 53525/59955 declarations read (89.275291%) 33993/43525 identifiers read (78.099945%) 41516/51891 statements read (80.006165%) 77/5317 macros read (1.448185%) 0/6335 lexical declcontexts read (0.000000%) 1/5424 visible declcontexts read (0.018437%) AFTER using the on-disk table: *** AST File Statistics: 578 stat cache hits 4 stat cache misses 548/30654 source location entries read (1.787695%) 10/16501 types read (0.060602%) 9/59955 declarations read (0.015011%) 161/43525 identifiers read (0.369902%) 20/51891 statements read (0.038542%) 6/5317 macros read (0.112846%) 0/6335 lexical declcontexts read (0.000000%) 2/5424 visible declcontexts read (0.036873%) There's only one issue affecting mostly the precompiled preambles which I will address soon. llvm-svn: 111636
* Rename pch namespace to serialization.Sebastian Redl2010-08-181-63/+63
| | | | llvm-svn: 111478
* Rename the ASTReader header files.Sebastian Redl2010-08-181-1/+1
| | | | llvm-svn: 111474
* Rename the ASTReader implementation files.Sebastian Redl2010-08-181-0/+1447
llvm-svn: 111473
OpenPOWER on IntegriCloud