summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add an AST representation for non-type template parameterDouglas Gregor2010-12-231-0/+1
| | | | | | | | | | | | | | packs, e.g., template<typename T, unsigned ...Dims> struct multi_array; along with semantic analysis support for finding unexpanded non-type template parameter packs in types, expressions, and so on. Template instantiation involving non-type template parameter packs probably doesn't work yet. That'll come soon. llvm-svn: 122527
* When an "inline" declaration was followed by a definition not markedDouglas Gregor2010-12-091-0/+1
| | | | | | | | | | | | | "inline", we weren't giving the definition weak linkage because the "inline" bit wasn't propagated. This was a longstanding FIXME that, somehow, hadn't triggered a bug in the wild. Fix this problem by tracking whether any declaration was marked "inline", and clean up the semantics of GNU's "extern inline" semantics calculation based on this change. Fixes <rdar://problem/8740363>. llvm-svn: 121373
* Added struct/class syntactic info for c++0x scoped enum.Abramo Bagnara2010-12-031-0/+1
| | | | llvm-svn: 120828
* Major anonymous union/struct redesign.Francois Pichet2010-11-211-0/+12
| | | | | | | | | | | 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-0/+1
| | | | | | | | | @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-5/+2
| | | | | | | | avoid leaking memory. Fixes rdar://8649963. llvm-svn: 118674
* Flush statements after writing each DECL_CXX_BASE_SPECIFIERS nodeDouglas Gregor2010-10-301-3/+0
| | | | llvm-svn: 117770
* Make the deserialization of C++ base class specifiers lazy, improvingDouglas Gregor2010-10-291-0/+6
| | | | | | the performance of C++ PCH and reducing stack depth in the reader. llvm-svn: 117732
* Switch case IDs conflict between chained PCHs; since there is no need to be ↵Argyrios Kyrtzidis2010-10-281-0/+3
| | | | | | global, make them local to a decl. llvm-svn: 117540
* Use the ASTMutationListener to track when a named decl gets added to a ↵Argyrios Kyrtzidis2010-10-281-1/+1
| | | | | | | | DeclContext, meaning we need to rewrite its name lookup table in a chained PCH. llvm-svn: 117536
* Use the ASTMutationListener to track added template specializations in a ↵Argyrios Kyrtzidis2010-10-281-4/+0
| | | | | | chained PCH. llvm-svn: 117533
* 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
* Refactoring.Argyrios Kyrtzidis2010-10-241-41/+2
| | | | | | | - Pass around RecordDataImpl instead of the concrete RecordData so that any SmallVector can be used. - Move ASTDeclWriter::WriteCXXDefinitionData to ASTWriter::AddCXXDefinitionData. llvm-svn: 117236
* Simplify and "robust-ify" the way that CXXRecord references point to the ↵Argyrios Kyrtzidis2010-10-241-18/+5
| | | | | | | | 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-40/+42
| | | | llvm-svn: 117233
* Fix chained PCH issue; make sure all visible decls that will be put into a ↵Argyrios Kyrtzidis2010-10-201-1/+18
| | | | | | UPDATE_VISIBLE block were recorded beforehand. llvm-svn: 116931
* Putting back safe fixes 116836,116837,116838Andrew Trick2010-10-191-1/+1
| | | | llvm-svn: 116866
* Reverting 116836,116837,116838 until we resolve the getLangStandardForKind ↵Andrew Trick2010-10-191-1/+1
| | | | | | failures. llvm-svn: 116859
* Fix up the comments for creating ParmVarDeclAbbrev to reflect reality.Argyrios Kyrtzidis2010-10-191-1/+1
| | | | llvm-svn: 116838
* Read/write declaration attributes from/to PCH properly. Embed them in the ↵Argyrios Kyrtzidis2010-10-181-4/+2
| | | | | | | | | 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-4/+12
| | | | | | QualifierInfos (rdar://8513756). llvm-svn: 116598
* Store in PCH the key function of C++ class to avoid deserializing the ↵Argyrios Kyrtzidis2010-10-141-0/+5
| | | | | | | | 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/+5
| | | | | | 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
* 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-0/+6
| | | | | | | | 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
* Fix C++ PCH issue.Argyrios Kyrtzidis2010-09-091-2/+1
| | | | | | | | | 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
* Fix C++ PCH issues.Argyrios Kyrtzidis2010-09-081-5/+8
| | | | | | | | | | | 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 directives (cursor + visitation +Douglas Gregor2010-09-011-1/+1
| | | | | | | | 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-1/+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-1/+1
| | | | | | | | | | | | | | | | 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
* AST writer support for having specializations of templates from earlier in ↵Sebastian Redl2010-08-241-3/+11
| | | | | | the chain. This ought to finish C++ chained PCH support. llvm-svn: 111986
* Support for IRGen of synthesize bitfield ivars inFariborz Jahanian2010-08-231-0/+2
| | | | | | objc-nonfragile-abi2 (radar 7824380). llvm-svn: 111823
* Use the AST on-disk hash table for name lookup inside a DeclContext.Argyrios Kyrtzidis2010-08-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *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-58/+58
| | | | llvm-svn: 111478
* Rename PCHDeclReader -> ASTDeclReader.Sebastian Redl2010-08-181-1/+1
| | | | llvm-svn: 111469
* Rename PCHWriter.h to ASTWriter.hSebastian Redl2010-08-181-1/+1
| | | | llvm-svn: 111466
* Rename the ASTWriter implementation filesSebastian Redl2010-08-181-0/+1174
llvm-svn: 111465
OpenPOWER on IntegriCloud