summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Write/Read new Language OptionsNate Begeman2009-06-251-0/+2
| | | | llvm-svn: 74221
* Add a DecltypeType type.Anders Carlsson2009-06-241-0/+5
| | | | llvm-svn: 74099
* First step toward fixing <rdar://problem/6613046> refactor clang objc type ↵Steve Naroff2009-06-171-4/+6
| | | | | | | | | | | | representation. Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType). This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types). No functionality change. llvm-svn: 73649
* Move CharIsSigned from TargetInfo to LangOptions.Eli Friedman2009-06-051-0/+2
| | | | llvm-svn: 72928
* emit ORIGINAL_FILE_NAME record ID to blockinfo block.Zhongxing Xu2009-06-031-0/+1
| | | | llvm-svn: 72759
* Reintroduce the home for exception specs, and make Sema fill it. However, ↵Sebastian Redl2009-05-271-0/+5
| | | | | | keep the spec out of the canonical type this time. Net effect is currently nothing, because the spec isn't checked anywhere. llvm-svn: 72498
* Convert ObjC qualified type clients over to using iterators.Steve Naroff2009-05-271-4/+6
| | | | | | | | This allows me to remove some API that I don't want to carry over to ObjCObjectPointerType. No functionality change. llvm-svn: 72475
* Pull EmitRecord() out of loop. It should be called only once.Zhongxing Xu2009-05-221-1/+1
| | | | llvm-svn: 72252
* implementation of format_arg for ObjC methods/functions.Fariborz Jahanian2009-05-201-0/+6
| | | | | | Still more to do. llvm-svn: 72173
* Disable access control by default. It can be enabled with the ↵Anders Carlsson2009-05-131-0/+2
| | | | | | -faccess-control option. When we have better support for it, we can enable it by default again. llvm-svn: 71706
* Some early declarations to support sentinel attribute onFariborz Jahanian2009-05-131-0/+7
| | | | | | | message dispatches (and function calls later). No change in functionality. llvm-svn: 71683
* Make precompiled headers work with -E. When we're only preprocessingDouglas Gregor2009-05-121-11/+40
| | | | | | | (with -E), we turn the PCH include into an implicit include of the file from which the PCH file was generated. llvm-svn: 71534
* Implement C++0x nullptr.Sebastian Redl2009-05-101-0/+1
| | | | llvm-svn: 71405
* Add back Parse/Sema support for attributes cf_returns_retained andTed Kremenek2009-05-091-0/+2
| | | | | | | ns_returns_retained, but do not include the other ownership attributes we previously had. llvm-svn: 71308
* Remove experimental ownership attributes from Clang.Ted Kremenek2009-05-081-7/+0
| | | | llvm-svn: 71216
* Back out r70506 (exception spec in AST) again. We won't have exception specs ↵Sebastian Redl2009-05-061-5/+0
| | | | | | until we've had a lot more discussion. llvm-svn: 71125
* Implement attribute 'ns_autorelease'.Ted Kremenek2009-05-051-0/+1
| | | | llvm-svn: 70990
* Implement attribute 'cf_returns_owned' (mirrors 'ns_returns_owned').Ted Kremenek2009-05-051-0/+1
| | | | llvm-svn: 70952
* Remove experimental attribute 'ns_ownership_make_collectable.'Ted Kremenek2009-05-041-1/+0
| | | | llvm-svn: 70940
* Rename attributes 'objc_ownership...' to 'ns_ownership...'.Ted Kremenek2009-05-041-4/+4
| | | | llvm-svn: 70897
* Rename attributes:Ted Kremenek2009-05-041-2/+2
| | | | | | | | | | | 'objc_ownership_cfretain' -> 'cf_ownership_retain' 'objc_ownership_cfrelease' -> 'cf_ownership_release' Motivation: Core Foundation objects can be used in isolation from Objective-C, and this forces users to reason about the separate semantics of CF objects. More Sema support pending. llvm-svn: 70884
* Make a home for exception specs in the AST. Now Sema can hook them up.Sebastian Redl2009-04-301-0/+5
| | | | llvm-svn: 70506
* initial support for __[u]int128_t, which should be basicallyChris Lattner2009-04-301-0/+2
| | | | | | | | compatible with VC++ and GCC. The codegen/mangling angle hasn't been fully ironed out yet. Note that we accept int128_t even in 32-bit mode, unlike gcc. llvm-svn: 70464
* Implement ownership attribute 'objc_ownership_make_collectable'. This allows oneTed Kremenek2009-04-281-1/+2
| | | | | | to add 'CFMakeCollectable' semantics to a method. llvm-svn: 70336
* Optimize IdentifierInfo storage within the precompiled header. We'veDouglas Gregor2009-04-281-6/+6
| | | | | | now gotten back about 180k of the 500k we lost. llvm-svn: 70326
* Implement a minor space optimization for the PCH identifier table,Douglas Gregor2009-04-281-10/+27
| | | | | | | | which eliminates the storage for IdentifierInfo in the "uninteresting identifier" cases. Sadly, this only brought back 7k of the 500k we lost :( llvm-svn: 70325
* Implement checking for macro definitions that occur on the commandDouglas Gregor2009-04-281-1/+11
| | | | | | | | line when using a PCH that were not provided when building the PCH file. If those names were used as identifiers somewhere in the PCH file, reject the PCH file. llvm-svn: 70321
* Revert r70075 and r70078, which reorganized the PCH on-disk hash tableDouglas Gregor2009-04-281-35/+4
| | | | | | | | | | for identifiers to separate "interesting" from "uninteresting" identifiers. However, to cope with compiler invocations where the predefines buffers mismatch, we need to be able to search the complete identifier table. Cocoa.h.pch is now about 500k larger that it used to be :( llvm-svn: 70320
* Remove unused LangOptions NoExtensions and Boolean.Eli Friedman2009-04-281-2/+0
| | | | llvm-svn: 70282
* Add a header containing the Clang version; make the driver use thisDouglas Gregor2009-04-271-9/+18
| | | | | | | | | Clang version value rather than hard-coding "1.0". Add PCH and Clang version information into the PCH file. Reject PCH files with the wrong version information. llvm-svn: 70264
* Add Sema::ExtVectorDecls and Sema::ObjCCategoryImpls to the PCH file. Since ↵Douglas Gregor2009-04-271-0/+21
| | | | | | these vectors are very, very rarely used and, when used in headers, and even when used are relatively small, we load them eagerly. llvm-svn: 70240
* Add two new checker-specific attributes: 'objc_ownership_release' andTed Kremenek2009-04-271-0/+2
| | | | | | | 'objc_ownership_cfrelease'. These are the 'release' equivalents of 'objc_ownership_retain' and 'objc_ownership_cfretain' respectively. llvm-svn: 70235
* make these be unsigned now that they are eagerly created.Chris Lattner2009-04-271-4/+4
| | | | llvm-svn: 70229
* shrink SOURCE_LOCATION_OFFSETS to use 4-byte entries instead of 8-byteChris Lattner2009-04-271-2/+2
| | | | | | entries, shaving 100K off the PCH file for cocoa. llvm-svn: 70228
* Implement caching of stat() calls for precompiled headers, which isDouglas Gregor2009-04-271-2/+123
| | | | | | | | essentially the same thing we do with pretokenized headers. stat() caching improves performance of the Cocoa-prefixed "Hello, World" by 45%. llvm-svn: 70223
* Add new checker-specific attribute 'objc_ownership_cfretain'. This is the sameTed Kremenek2009-04-271-0/+1
| | | | | | | | as 'objc_ownership_cfretain' except that the method acts like a CFRetain instead of a [... retain] (important in GC modes). Checker support is wired up, but currently only for Objective-C message expressions (not function calls). llvm-svn: 70218
* encode the type and decl offsets with 32-bits for entry insteadChris Lattner2009-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of 64 bits. This cuts 400KB off the PCH file for cocoa (7.1 -> 6.7MB): Before: Record Histogram: Count # Bits % Abv Record Kind 1 14296 SOURCE_LOCATION_PRELOADS 1 1699598 100.00 SOURCE_LOCATION_OFFSETS 1 1870766 100.00 METHOD_POOL 1 212988 100.00 SELECTOR_OFFSETS 1 88 STATISTICS 1 106 SPECIAL_TYPES 1 18033788 100.00 IDENTIFIER_TABLE 1 1806428 100.00 IDENTIFIER_OFFSET 1 170 100.00 TARGET_TRIPLE 1 268 LANGUAGE_OPTIONS 1 5168252 100.00 DECL_OFFSET 1 952700 100.00 TYPE_OFFSET After: Record Histogram: Count # Bits % Abv Record Kind 1 14296 SOURCE_LOCATION_PRELOADS 1 1699598 100.00 SOURCE_LOCATION_OFFSETS 1 1870766 100.00 METHOD_POOL 1 212988 100.00 SELECTOR_OFFSETS 1 88 STATISTICS 1 106 SPECIAL_TYPES 1 18033788 100.00 IDENTIFIER_TABLE 1 1806428 100.00 IDENTIFIER_OFFSET 1 170 100.00 TARGET_TRIPLE 1 268 LANGUAGE_OPTIONS 1 2584156 100.00 DECL_OFFSET 1 476380 100.00 TYPE_OFFSET llvm-svn: 70216
* add an abbreviation for common PARM_VAR_DECL. All but 9 of the Chris Lattner2009-04-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Load most of the source manager's information lazily from the PCHDouglas Gregor2009-04-271-68/+98
| | | | | | | | | | | | | | | | | | | file. In particular, only eagerly load source location entries for files and for the predefines buffer. Other buffers and macro-instantiation source location entries are loaded lazily. With the Cocoa-prefixed "Hello, World", we only load 815/26555 source location entities. This halves the amount of user time we spend in this "Hello, World" program with -fsyntax-only (down to .007s). This optimization is part 1 of 2 for the source manager. This eliminates most of the user time in loading a PCH file. We still spend too much time initialize File structures (especially in the calls to stat), so we need to either make the loading of source location entries for files lazy or import the stat cache from the PTH implementation. llvm-svn: 70196
* split expr/stmt writing out to PCHWriterStmt.cppChris Lattner2009-04-271-799/+0
| | | | llvm-svn: 70194
* split decl writing out to its own PCHWriterDecl.cpp file.Chris Lattner2009-04-271-445/+1
| | | | llvm-svn: 70193
* add stmt/expr names to BlockInfo block.Chris Lattner2009-04-271-3/+77
| | | | llvm-svn: 70172
* drop the _ID suffixes from block names.Chris Lattner2009-04-271-6/+6
| | | | llvm-svn: 70169
* add the decl names.Chris Lattner2009-04-261-2/+26
| | | | llvm-svn: 70167
* make llvm-bcanalyzer dump out PCH files symbolically. We should probablyChris Lattner2009-04-261-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eventually get an option to turn this off, but it is nice for looking at statistics. For example, the types block now prints: Block ID #11 (TYPES_BLOCK_ID): Num Instances: 1 Total Size: 895100b/111888B/27971.9W % of file: 1.55801 Num SubBlocks: 0 Num Abbrevs: 0 Num Records: 14899 % Abbrev Recs: 0 Code Histogram: 5478 TYPE_FUNCTION_PROTO 2683 TYPE_TYPEDEF 2460 TYPE_POINTER 2047 TYPE_ENUM 1553 TYPE_RECORD 283 TYPE_CONSTANT_ARRAY 274 TYPE_OBJC_INTERFACE 76 TYPE_INCOMPLETE_ARRAY 10 TYPE_VECTOR 9 TYPE_OBJC_QUALIFIED_ID 5 TYPE_FUNCTION_NO_PROTO 5 TYPE_EXT_QUAL 3 TYPE_TYPEOF_EXPR llvm-svn: 70166
* Some fixes for PCH (de-)serialization of Objective-C AST nodes:Douglas Gregor2009-04-261-9/+17
| | | | | | | | | | | | | | | | - Deal with the Receiver/ClassInfo shared storage in ObjCMessageExpr - Implement PCH support for ImplicitParamDecl - Fix the handling of the body of an ObjCMethodDecl - Several cast -> cast_or_null fixes - Make Selector::getIdentifierInfoForSlot work for 1-argument, NULL selectors. - Make Selector::getAsString() work with NULL selectors. - Fix the names of VisitObjCAtCatchStmt and VisitObjCAtFinallyStmt in the PCH reader and writer; these were never getting called. At this point, all of the pch-test tests pass for C and Objective-C. llvm-svn: 70163
* Add PCH read/write support for ObjC statements.Steve Naroff2009-04-261-1/+54
| | | | llvm-svn: 70143
* Make sure we have a code in the node:-)Steve Naroff2009-04-261-0/+4
| | | | | | This fixes all the -emit-pch problems discovered by utils/pch-test.pl. llvm-svn: 70125
* When writing a PCH file, write multiple type and declaration blocks asDouglas Gregor2009-04-261-12/+21
| | | | | | | | | | | necessary and iterate until all types and declarations have been written. This reduces the Cocoa.h PCH file size by about 4% (since we don't write types we don't need), and fixes problems where writing a declaration generates a new type. This doesn't seem to have any impact on performance either way. llvm-svn: 70109
* split ObjC and C++ Statements out into their own headers.Chris Lattner2009-04-261-1/+0
| | | | llvm-svn: 70105
OpenPOWER on IntegriCloud