aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriterDecl.cpp
AgeCommit message (Collapse)Author
2009-09-29Introduce ObjCProtocolListLoc for keeping source location information for ↵Argyrios Kyrtzidis
protocol references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83094 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22Update PCH serialization of FunctionDecl flags.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82526 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17PCH: When writing PCH files, tweak the predicate function deciding whether ↵Daniel Dunbar
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82112 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13Rework the way we determine whether an externally visible symbol isDouglas Gregor
generated for an inline function definition, taking into account C99 and GNU inline/extern inline semantics. This solution is simpler, cleaner, and fixes PR4536. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81670 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24Fix build of clang with gcc-4.4: #include <cstdio> was missing.Torok Edwin
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use ↵Argyrios Kyrtzidis
DeclaratorInfo to get this information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79584 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19Store/load type source info from/to PCH files.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79396 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Make tag declarations redeclarable. This change has three purposes:Douglas Gregor
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27Make ObjCImplDecl inherit from ObjCContainerDecl.Argyrios Kyrtzidis
ObjCContainerDecl now is the root class for objc decls that contain methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77235 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21Add the location of the tag keyword into TagDecl. From EneaDouglas Gregor
Zaffanella, with tweaks from Abramo Bagnara. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76576 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20Reuse VarDecl::Init to store the default argument of a ParmVarDecl,Douglas Gregor
reducing the size of ParmVarDecl by one pointer. Also means that we'll properly (de-)serialize default arguments in C++ PCH files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76487 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella.Steve Naroff
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75635 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14Read/write TagDecl's RBraceLoc from/to PCH files.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75592 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Patch adds test to my previous patch for assigning toFariborz Jahanian
gc'able structs in the Next runtime and adds missing PCH info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Remove the ASTContext parameter from the getBody() methods of Decl and ↵Argyrios Kyrtzidis
subclasses. Timings showed no significant difference before and after the commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-20Serialize FunctionDecl's EndRangeLoc out to the PCH file.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-19Keep track of when declarations are "used" according to C andDouglas Gregor
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>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73797 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01Unify coding style.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72682 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01Use a reference to modify the DeclIDs map.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72681 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27Enumeration declarations that were instantiated from an enumerationDouglas Gregor
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72482 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-14Check that the function being overridden is virtual.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71802 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-14Improvements to the FunctionDecl getters/setters.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71800 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-14Link FunctionDecls instantiated from the member functions of a classDouglas Gregor
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71792 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27add an abbreviation for common PARM_VAR_DECL. All but 9 of the Chris Lattner
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27split decl writing out to its own PCHWriterDecl.cpp file.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70193 91177308-0d34-0410-b5e6-96231b3b80d8