summaryrefslogtreecommitdiffstats
path: root/clang/Lex/Preprocessor.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* CStringMap -> StringMap.Chris Lattner2007-02-081-1/+1
| | | | llvm-svn: 39334
* adjust to CStringMap interface change.Chris Lattner2007-02-081-2/+3
| | | | llvm-svn: 39333
* Produce a nice error message for '#define and' in C++. Patch by Bill!Chris Lattner2006-11-211-4/+14
| | | | llvm-svn: 39218
* eliminate string compares when checking for the 'defined' token.Chris Lattner2006-11-211-2/+1
| | | | llvm-svn: 39216
* Add support for C++ operator keywords. Patch by Bill Wendling.Chris Lattner2006-11-211-0/+6
| | | | llvm-svn: 39214
* Change KeepComments/KeepMacroComments modes to be facets of the preprocessorChris Lattner2006-11-211-7/+11
| | | | | | state, not aspects of the language standard being parsed. llvm-svn: 39209
* simplify the Preprocessor ctor.Chris Lattner2006-11-211-4/+3
| | | | llvm-svn: 39208
* Formalize preprocessor callbacks together into a PPCallbacks structure, insteadChris Lattner2006-11-211-14/+12
| | | | | | | of having a loose collection of function pointers. This also allows clients to maintain state, and reduces the size of the Preprocessor.h interface. llvm-svn: 39203
* silence some warnings when asserts are disabled.Chris Lattner2006-11-051-0/+1
| | | | llvm-svn: 39127
* Refactor the paths used for checking and getting the spelling of #includeChris Lattner2006-10-301-6/+63
| | | | | | | | | filenames (and also '#pragma GCC dependency' of course). Now, assuming no cleaning is needed, we can go all the way from lexing the filename to doing filename lookups with no mallocs. This speeds up user PP time from 0.077 to 0.075s for Cocoa.h (2.6%). llvm-svn: 39092
* Make Preprocessor::LookupFile take a character range instead of a string.Chris Lattner2006-10-301-8/+5
| | | | | | This avoids some copying in its clients. llvm-svn: 39091
* Push strings out of the HeaderSearch interface, it now deals solely withChris Lattner2006-10-301-3/+9
| | | | | | character ranges. llvm-svn: 39090
* Pull the string hashtable out of the IdentifierTable, moving into LLVM'sChris Lattner2006-10-291-2/+3
| | | | | | libsupport. Now it can be used for other things besides identifier hashing. llvm-svn: 39079
* Implement test/Preprocessor/comment_save_if.cChris Lattner2006-10-271-0/+8
| | | | llvm-svn: 39069
* add #includeChris Lattner2006-10-221-0/+1
| | | | llvm-svn: 39034
* Fix a regression introduced when adding subframework supportChris Lattner2006-10-201-2/+2
| | | | llvm-svn: 39022
* Implement test/Preprocessor/macro_arg_keyword.cChris Lattner2006-10-201-4/+8
| | | | llvm-svn: 39021
* Implement subframework lookupChris Lattner2006-10-201-3/+27
| | | | llvm-svn: 39015
* Move keyword setup from the preprocessor into the IdentifierTable class.Chris Lattner2006-10-181-72/+1
| | | | llvm-svn: 39014
* refactor header searching stuff out of the main Preprocessor object intoChris Lattner2006-10-181-160/+21
| | | | | | | it's own HeaderSearch object. This makes Preprocessor simpler and easier to understand. llvm-svn: 39012
* silence warning, add hacky patch for framework lookupChris Lattner2006-10-181-3/+46
| | | | llvm-svn: 39011
* Make the identifier table track objc keywordsChris Lattner2006-10-171-0/+14
| | | | llvm-svn: 39003
* Make preprocessor keywords like 'define' first class citizens in theChris Lattner2006-10-171-68/+99
| | | | | | IdentifierTable, instead of making them resort to strcmp'ing. llvm-svn: 39002
* ignore '#line' and '# 123' for now.Chris Lattner2006-10-171-5/+7
| | | | llvm-svn: 38997
* Implement the #define_other_target directive.Chris Lattner2006-10-141-2/+54
| | | | llvm-svn: 38984
* Implement the #define_target preprocessor directive.Chris Lattner2006-10-141-5/+30
| | | | llvm-svn: 38980
* Write up TargetInfo so that use of wchar_t strings results in a warning ifChris Lattner2006-10-141-2/+3
| | | | | | used in a target set where the size is not identical. llvm-svn: 38975
* Rename LexerToken methods to be more consistent.Chris Lattner2006-10-141-42/+42
| | | | llvm-svn: 38969
* Initial support for semantic analysis and AST building for StringExpr nodes.Chris Lattner2006-10-061-2/+2
| | | | llvm-svn: 38960
* Fix precedence problemChris Lattner2006-08-041-3/+3
| | | | llvm-svn: 38809
* Simplify implementation of varargs macros by adding the __VA_ARGS__ tokenChris Lattner2006-07-301-18/+4
| | | | | | to the formal argument list of a C99 varargs macro. llvm-svn: 38800
* The optimized case has to treat __VA_ARGS__ as an argument. This fixesChris Lattner2006-07-291-0/+5
| | | | | | test/Preprocessor/macro_rescan_varargs.c llvm-svn: 38795
* Implement support for #__VA_ARGS__Chris Lattner2006-07-291-1/+2
| | | | llvm-svn: 38791
* Implement comment saving mode: the -C and -CC options.Chris Lattner2006-07-291-0/+18
| | | | llvm-svn: 38783
* Implement the GNU comma swallowing extension. This implementsChris Lattner2006-07-291-1/+8
| | | | | | test/Preprocessor/macro_fn_comma_swallow.c llvm-svn: 38780
* Fix a bug in previous commitChris Lattner2006-07-291-1/+1
| | | | llvm-svn: 38774
* No need for explicit underscore anymore.Chris Lattner2006-07-291-1/+1
| | | | llvm-svn: 38773
* Poison and unpoison __VA_ARGS__ when appropriateChris Lattner2006-07-291-2/+15
| | | | llvm-svn: 38770
* If the varargs token is missing, add an empty argument to represent it. ThisChris Lattner2006-07-291-10/+9
| | | | | | fixes Preprocessor/macro_fn_varargs_named.c llvm-svn: 38769
* Implement C99 6.10.3.4p2, testcase here: Preprocessor/macro_disable3.c.Chris Lattner2006-07-271-3/+18
| | | | llvm-svn: 38760
* Change Preprocessor::ReadFunctionLikeMacroArgs to use a SmallVector to lexChris Lattner2006-07-261-3/+5
| | | | | | | | argument tokens into instead of a real vector. This avoids some malloc traffic in common cases. In an "abusive macro expansion" testcase, this reduced -Eonly time by 25%. llvm-svn: 38757
* Change MacroArgs to allocate space for the unexpanded tokens immediately afterChris Lattner2006-07-261-2/+2
| | | | | | | the MacroArgs object itself. This is a bit more efficient and will be even more so shortly. llvm-svn: 38756
* Implement a FIXME: don't copy token array into a token vector, instead, ↵Chris Lattner2006-07-261-2/+2
| | | | | | macroexpander should expand from an array directly. llvm-svn: 38754
* speed up a brutal macro-expansion torture test by about 30% (1.5 -> 1.0s)Chris Lattner2006-07-211-14/+25
| | | | | | | by turning vectors of vectors into a single vector, reducing pressure on malloc. This can still be improved. llvm-svn: 38753
* Add optimization for identifier##identifier -> identifier, the most common ↵Chris Lattner2006-07-201-1/+4
| | | | | | case of token pasting. llvm-svn: 38747
* Simplify "raw lexing mode" even further. Now the preprocessor is only calledChris Lattner2006-07-201-6/+1
| | | | | | | into when a hard error is found. This simplifies logic and eliminates the need for the preprocessor to know about raw mode. llvm-svn: 38746
* Simplify identifier lookup in raw mode, implementing ↵Chris Lattner2006-07-201-6/+3
| | | | | | Preprocessor/macro_fn_lparen_scan2.c. llvm-svn: 38744
* Move LexingRawMode handling of file EOF out of the preprocessor into theChris Lattner2006-07-191-13/+0
| | | | | | | | lexer. This makes more logical sense and also unbreaks the case when the lexer hasn't been pushed onto the PP include stack. This is the case when pasting identifiers. This patch implements macro_paste_bcpl_comment.c. llvm-svn: 38736
* Make end-of-file handling much less recursive. This reduces the worst caseChris Lattner2006-07-181-5/+8
| | | | | | stack depth sampled by shark from ~34 to ~17 frames when preprocessing <iostream>. llvm-svn: 38726
* Implement support for lexing from a pre-constructed token stream.Chris Lattner2006-07-161-11/+31
| | | | | | | | Use this support to implement function-like macro argument preexpansion. This implements test/Preprocessor/macro_fn_preexpand.c llvm-svn: 38724
OpenPOWER on IntegriCloud