- Apr 28, 2009
-
-
Ted Kremenek authored
llvm-svn: 70286
-
Ted Kremenek authored
add "Looping back to the head of the loop" diagnostic for loops. llvm-svn: 70285
-
Ted Kremenek authored
llvm-svn: 70284
-
Eli Friedman authored
llvm-svn: 70283
-
Eli Friedman authored
llvm-svn: 70282
-
Eli Friedman authored
scheme to be more useful. The new scheme introduces a set of categories that should be more readable, and also reflects what we want to consider as an extension more accurately. Specifically, it makes the "what is a keyword" determination accurately reflect whether the keyword is a GNU or Microsoft extension. I also introduced separate flags for keyword aliases; this is useful because the classification of the aliases is mostly unrelated to the classification of the original keyword. This patch treats anything that's in the implementation namespace (prefixed with "__", or "_X" where "X" is any upper-case letter) as a keyword without marking it as an extension. This is consistent with the standards in that an implementation is allowed to define arbitrary extensions in the implementation namespace without violating the standard. This gets rid of all the nasty "extension used" warnings for stuff like __attribute__ in -pedantic mode. We still warn for extensions outside of the the implementation namespace, like typeof. If someone wants to implement -Wextensions or something like that, we could add additional information to the keyword table. This also removes processing for the unused "Boolean" language option; such an extension isn't supported on any other C implementation, so I don't see any point to adding it. The changes to test/CodeGen/inline.c are required because previously, we weren't actually disabling the "inline" keyword in -std=c89 mode. I'll remove Boolean and NoExtensions from LangOptions in a follow-up commit. llvm-svn: 70281
-
Ted Kremenek authored
llvm-svn: 70280
-
Mike Stump authored
llvm-svn: 70277
-
Ted Kremenek authored
- Add 'LoopTarget' pointer field to CFGBlock. This records if the block is used as the 'loop back' path back to the head of a loop. - For ForStmt, encode the loop back target as the increment code. llvm-svn: 70274
-
Eli Friedman authored
that if we're going to print an extension warning anyway, there's no point to changing behavior based on NoExtensions: it will only make error recovery worse. Note that this doesn't cause any behavior change because NoExtensions isn't used by the current front-end. I'm still considering what to do about the remaining use of NoExtensions in IdentifierTable.cpp. llvm-svn: 70273
-
Eli Friedman authored
builds to work (PR4088). llvm-svn: 70269
-
Devang Patel authored
llvm-svn: 70266
-
Douglas Gregor authored
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
-
Chris Lattner authored
llvm-svn: 70263
-
Chris Lattner authored
llvm-svn: 70259
-
- Apr 27, 2009
-
-
Chris Lattner authored
processing to after PCH is loaded. -Eonly and -parse-noop are close to working with PCH now but are not quite there yet. llvm-svn: 70257
-
Sebastian Redl authored
llvm-svn: 70256
-
Douglas Gregor authored
ignore a PCH file. llvm-svn: 70251
-
Sebastian Redl authored
llvm-svn: 70248
-
Sebastian Redl authored
Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes. llvm-svn: 70242
-
Douglas Gregor authored
Add Sema::ExtVectorDecls and Sema::ObjCCategoryImpls to the PCH file. Since 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
-
Ted Kremenek authored
'objc_ownership_cfrelease'. These are the 'release' equivalents of 'objc_ownership_retain' and 'objc_ownership_cfretain' respectively. llvm-svn: 70235
-
Ted Kremenek authored
treated as "not owned" objects. llvm-svn: 70232
-
Chris Lattner authored
llvm-svn: 70229
-
Chris Lattner authored
entries, shaving 100K off the PCH file for cocoa. llvm-svn: 70228
-
Ted Kremenek authored
HandleObjCOwnershipParmAttr. No functionality change (hopefully). llvm-svn: 70224
-
Douglas Gregor authored
essentially the same thing we do with pretokenized headers. stat() caching improves performance of the Cocoa-prefixed "Hello, World" by 45%. llvm-svn: 70223
-
Daniel Dunbar authored
member. Also, spell bitfield more consistently as bit-field. llvm-svn: 70220
-
Ted Kremenek authored
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
-
Chris Lattner authored
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
-
Chris Lattner authored
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
-
Chris Lattner authored
of the normal stream cursor. llvm-svn: 70198
-
Douglas Gregor authored
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
-
Chris Lattner authored
llvm-svn: 70194
-
Chris Lattner authored
llvm-svn: 70193
-
Chris Lattner authored
llvm-svn: 70192
-
Chris Lattner authored
extraneous braces. llvm-svn: 70191
-
Chris Lattner authored
from the DeclsCursor. llvm-svn: 70190
-
Chris Lattner authored
is part of a decl. llvm-svn: 70189
-
Chris Lattner authored
llvm-svn: 70188
-