summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHWriterDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename FunctionDecl::isInline/setInline toDouglas Gregor2009-10-271-1/+1
| | | | | | FunctionDecl::isInlineSpecified/setInlineSpecified. llvm-svn: 85305
* Preserve type source information in TypedefDecls. Preserve it acrossJohn McCall2009-10-241-1/+1
| | | | | | | | | template instantiation. Preserve it through PCH. Show it off to the indexer. I'm healthily ignoring the vector type cases because we don't have a sensible TypeLoc implementation for them anyway. llvm-svn: 84994
* Remove OriginalTypeParmDecl; the original type is the one specifiedJohn McCall2009-10-231-8/+0
| | | | | | | | | | | | | in the DeclaratorInfo, if one is present. Preserve source information through template instantiation. This is made more complicated by the possibility that ParmVarDecls don't have DIs, which is possibly worth fixing in the future. Also preserve source information for function parameters in ObjC method declarations. llvm-svn: 84971
* Merge the "types" and "declarations" blocks in the precompiled headerDouglas Gregor2009-10-171-66/+50
| | | | | | | | | | | | | | | format, so that we don't end up with multiple declaration and types blocks. Also, fix a few obscure bugs with PCH loading and generation: - If the DeclIDs DenseMap reallocates while we are writing a declaration (due to recursively writing other declarations), we could end up writing a bad ID to ExternalDefinitions. - When loading an ArrayLoc (part of DeclaratorInfo), we need to set the size expression to NULL if no size expression was provided. PCH -> AST rewriting is still partly broken, unfortunately. llvm-svn: 84293
* Factor out routines to encode/decode DeclaratorInfos and move them into theJohn McCall2009-10-161-76/+1
| | | | | | core PCH reader/writer implementation files. llvm-svn: 84278
* Keep track of whether declararions were loaded from a precompiledDouglas Gregor2009-10-161-0/+3
| | | | | | | | | | header or not via a new "PCHLevel" field in Decl. We currently use this information to help CIndex filter out declarations that came from a precompiled header (rather than from an AST file). Further down the road, it can be used to help implement multi-level precompiled headers. llvm-svn: 84267
* Better living through metaprogramming. Create a base class which abstractsJohn McCall2009-10-151-1/+4
| | | | | | | | | | | most of the unsafe boilerplate out of TypeLoc. Create a QualifiedLoc class to represent the idea that we *might* start representing source locations of qualifiers. Dealing with qualifiers explicitly like this also lets us efficiently ignore them in all the concrete cases. This should make it obvious and easy to add new TypeLoc subclasses. llvm-svn: 84168
* Pull TypeLocVisitor into its own header file.Argyrios Kyrtzidis2009-09-291-1/+1
| | | | llvm-svn: 83112
* Introduce ObjCInterfaceLoc which provides type source information for ObjC ↵Argyrios Kyrtzidis2009-09-291-0/+3
| | | | | | interfaces. llvm-svn: 83097
* Introduce ObjCProtocolListLoc for keeping source location information for ↵Argyrios Kyrtzidis2009-09-291-0/+6
| | | | | | protocol references. llvm-svn: 83094
* Update PCH serialization of FunctionDecl flags.Daniel Dunbar2009-09-221-0/+3
| | | | llvm-svn: 82526
* PCH: When writing PCH files, tweak the predicate function deciding whether ↵Daniel Dunbar2009-09-171-3/+68
| | | | | | | | to mark a decl as "external" to be closer to reality. This still isn't perfect, but I believe it is conservatively accurate at marking decls which IRgen needs to see, while still keeping the "deserialization footprint" on Cocoa.h. llvm-svn: 82112
* Rework the way we determine whether an externally visible symbol isDouglas Gregor2009-09-131-1/+0
| | | | | | | | generated for an inline function definition, taking into account C99 and GNU inline/extern inline semantics. This solution is simpler, cleaner, and fixes PR4536. llvm-svn: 81670
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-24/+24
| | | | llvm-svn: 81346
* Fix build of clang with gcc-4.4: #include <cstdio> was missing.Torok Edwin2009-08-241-0/+2
| | | | llvm-svn: 79916
* Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use ↵Argyrios Kyrtzidis2009-08-211-4/+0
| | | | | | DeclaratorInfo to get this information. llvm-svn: 79584
* Store/load type source info from/to PCH files.Argyrios Kyrtzidis2009-08-191-4/+76
| | | | llvm-svn: 79396
* Make tag declarations redeclarable. This change has three purposes:Douglas Gregor2009-07-291-0/+1
| | | | | | | | | | | | | | | | 1) Allow the Index library (and any other interested client) to walk the set of declarations for a given tag (enum, union, class, whatever). At the moment, this information is not readily available. 2) Reduce our dependence on TagDecl::TypeForDecl being mapped down to a TagType (for which getDecl() will return the tag definition, if one exists). This property won't exist for class template partial specializations. 3) Make the canonical declaration of a TagDecl actually canonical, e.g., so that it does not change when the tag is defined. llvm-svn: 77523
* Make ObjCImplDecl inherit from ObjCContainerDecl.Argyrios Kyrtzidis2009-07-271-2/+1
| | | | | | ObjCContainerDecl now is the root class for objc decls that contain methods. llvm-svn: 77235
* Add the location of the tag keyword into TagDecl. From EneaDouglas Gregor2009-07-211-0/+1
| | | | | | Zaffanella, with tweaks from Abramo Bagnara. llvm-svn: 76576
* Reuse VarDecl::Init to store the default argument of a ParmVarDecl,Douglas Gregor2009-07-201-3/+0
| | | | | | | reducing the size of ParmVarDecl by one pointer. Also means that we'll properly (de-)serialize default arguments in C++ PCH files. llvm-svn: 76487
* Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella.Steve Naroff2009-07-141-0/+1
| | | | | Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary). llvm-svn: 75635
* Read/write TagDecl's RBraceLoc from/to PCH files.Argyrios Kyrtzidis2009-07-141-0/+1
| | | | llvm-svn: 75592
* Patch adds test to my previous patch for assigning toFariborz Jahanian2009-07-081-0/+1
| | | | | | | gc'able structs in the Next runtime and adds missing PCH info. llvm-svn: 75014
* Remove the ASTContext parameter from the getBody() methods of Decl and ↵Argyrios Kyrtzidis2009-06-301-2/+2
| | | | | | | | subclasses. Timings showed no significant difference before and after the commit. llvm-svn: 74504
* Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis2009-06-301-1/+1
| | | | | | | | | The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
* Serialize FunctionDecl's EndRangeLoc out to the PCH file.Argyrios Kyrtzidis2009-06-201-0/+1
| | | | llvm-svn: 73822
* Keep track of when declarations are "used" according to C andDouglas Gregor2009-06-191-0/+3
| | | | | | | | | | | | C++. This logic is required to trigger implicit instantiation of function templates and member functions of class templates, which will be implemented separately. This commit includes support for -Wunused-parameter, printing warnings for named parameters that are not used within a function/Objective-C method/block. Fixes <rdar://problem/6505209>. llvm-svn: 73797
* Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor2009-06-181-1/+1
| | | | llvm-svn: 73702
* Unify coding style.Zhongxing Xu2009-06-011-1/+1
| | | | llvm-svn: 72682
* Use a reference to modify the DeclIDs map.Zhongxing Xu2009-06-011-1/+1
| | | | llvm-svn: 72681
* Enumeration declarations that were instantiated from an enumerationDouglas Gregor2009-05-271-0/+1
| | | | | | | | within a template now have a link back to the enumeration from which they were instantiated. This means that we can now find the instantiation of an anonymous enumeration. llvm-svn: 72482
* Check that the function being overridden is virtual.Anders Carlsson2009-05-141-1/+1
| | | | llvm-svn: 71802
* Improvements to the FunctionDecl getters/setters.Anders Carlsson2009-05-141-2/+2
| | | | llvm-svn: 71800
* Link FunctionDecls instantiated from the member functions of a classDouglas Gregor2009-05-141-0/+1
| | | | | | | | template to the FunctionDecls from which they were instantiated. This is a necessary first step to support instantiation of the definitions of such functions, but by itself does essentially nothing. llvm-svn: 71792
* add an abbreviation for common PARM_VAR_DECL. All but 9 of the Chris Lattner2009-04-271-4/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | parm var decls in leopard cocoa.h end up using this abbreviation, which shrinks the bitcode file by about 50K: 7217736->7167120. Before: Block ID #12 (DECLS_BLOCK): Num Instances: 1 Total Size: 2.23595e+07b/2.79494e+06B/698736W % of file: 38.7233 Num SubBlocks: 0 Num Abbrevs: 0 Num Records: 139387 % Abbrev Recs: 0 After: Block ID #12 (DECLS_BLOCK): Num Instances: 1 Total Size: 2.02405e+07b/2.53006e+06B/632516W % of file: 35.301 Num SubBlocks: 0 Num Abbrevs: 1 Num Records: 139387 % Abbrev Recs: 19.2902 llvm-svn: 70199
* split decl writing out to its own PCHWriterDecl.cpp file.Chris Lattner2009-04-271-0/+468
llvm-svn: 70193
OpenPOWER on IntegriCloud