Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Initial support for semantic analysis and AST building for StringExpr nodes. | Chris Lattner | 2006-10-06 | 1 | -2/+2 | |
| | | | | llvm-svn: 38960 | |||||
* | Fix precedence problem | Chris Lattner | 2006-08-04 | 1 | -3/+3 | |
| | | | | llvm-svn: 38809 | |||||
* | Simplify implementation of varargs macros by adding the __VA_ARGS__ token | Chris Lattner | 2006-07-30 | 1 | -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 fixes | Chris Lattner | 2006-07-29 | 1 | -0/+5 | |
| | | | | | | test/Preprocessor/macro_rescan_varargs.c llvm-svn: 38795 | |||||
* | Implement support for #__VA_ARGS__ | Chris Lattner | 2006-07-29 | 1 | -1/+2 | |
| | | | | llvm-svn: 38791 | |||||
* | Implement comment saving mode: the -C and -CC options. | Chris Lattner | 2006-07-29 | 1 | -0/+18 | |
| | | | | llvm-svn: 38783 | |||||
* | Implement the GNU comma swallowing extension. This implements | Chris Lattner | 2006-07-29 | 1 | -1/+8 | |
| | | | | | | test/Preprocessor/macro_fn_comma_swallow.c llvm-svn: 38780 | |||||
* | Fix a bug in previous commit | Chris Lattner | 2006-07-29 | 1 | -1/+1 | |
| | | | | llvm-svn: 38774 | |||||
* | No need for explicit underscore anymore. | Chris Lattner | 2006-07-29 | 1 | -1/+1 | |
| | | | | llvm-svn: 38773 | |||||
* | Poison and unpoison __VA_ARGS__ when appropriate | Chris Lattner | 2006-07-29 | 1 | -2/+15 | |
| | | | | llvm-svn: 38770 | |||||
* | If the varargs token is missing, add an empty argument to represent it. This | Chris Lattner | 2006-07-29 | 1 | -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 Lattner | 2006-07-27 | 1 | -3/+18 | |
| | | | | llvm-svn: 38760 | |||||
* | Change Preprocessor::ReadFunctionLikeMacroArgs to use a SmallVector to lex | Chris Lattner | 2006-07-26 | 1 | -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 after | Chris Lattner | 2006-07-26 | 1 | -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 Lattner | 2006-07-26 | 1 | -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 Lattner | 2006-07-21 | 1 | -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 Lattner | 2006-07-20 | 1 | -1/+4 | |
| | | | | | | case of token pasting. llvm-svn: 38747 | |||||
* | Simplify "raw lexing mode" even further. Now the preprocessor is only called | Chris Lattner | 2006-07-20 | 1 | -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 Lattner | 2006-07-20 | 1 | -6/+3 | |
| | | | | | | Preprocessor/macro_fn_lparen_scan2.c. llvm-svn: 38744 | |||||
* | Move LexingRawMode handling of file EOF out of the preprocessor into the | Chris Lattner | 2006-07-19 | 1 | -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 case | Chris Lattner | 2006-07-18 | 1 | -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 Lattner | 2006-07-16 | 1 | -11/+31 | |
| | | | | | | | | Use this support to implement function-like macro argument preexpansion. This implements test/Preprocessor/macro_fn_preexpand.c llvm-svn: 38724 | |||||
* | More changes from formals -> actuals. | Chris Lattner | 2006-07-15 | 1 | -9/+9 | |
| | | | | llvm-svn: 38717 | |||||
* | Rename macroformalargs -> MacroArgs, as it represents the actual arguments, | Chris Lattner | 2006-07-15 | 1 | -19/+19 | |
| | | | | | | not the formal arguments, to a macro. llvm-svn: 38716 | |||||
* | Eliminate the IdentifierInfo::IsMacroArg flag. | Chris Lattner | 2006-07-15 | 1 | -11/+3 | |
| | | | | llvm-svn: 38715 | |||||
* | Change Lexer::Stringify to not add ""'s around the string. | Chris Lattner | 2006-07-15 | 1 | -1/+1 | |
| | | | | llvm-svn: 38708 | |||||
* | Add an API so that external clients can create strings in the scratch buffer. | Chris Lattner | 2006-07-14 | 1 | -9/+21 | |
| | | | | llvm-svn: 38706 | |||||
* | Move Preprocessor::isNextPPTokenLParen to Lexer::isNextPPTokenLParen, where | Chris Lattner | 2006-07-11 | 1 | -33/+2 | |
| | | | | | | it more rightly belongs. llvm-svn: 38702 | |||||
* | Change Preprocessor::SkippingContents into Lexer::LexingRawMode. Raw mode | Chris Lattner | 2006-07-11 | 1 | -19/+12 | |
| | | | | | | | | | | is an intra-lexer property, not a inter-lexer property, so it makes sense for it to be define here. It also makes no sense for macros, and allows us to define it more carefully in the header. While I'm at it, improve comments and structuring in Lexer.h llvm-svn: 38701 | |||||
* | Fix a regression on Preprocessor/hash_space.c | Chris Lattner | 2006-07-11 | 1 | -2/+2 | |
| | | | | llvm-svn: 38700 | |||||
* | Implement "lparen scanning" for lexer buffers, by making "skipping lexing" | Chris Lattner | 2006-07-11 | 1 | -41/+71 | |
| | | | | | | | completely reversible. This implements tests 3/4 of test/Preprocessor/macro_fn_lparen_scan.c llvm-svn: 38699 | |||||
* | ext-warn on empty macro arguments if in pre-c99 mode | Chris Lattner | 2006-07-11 | 1 | -2/+9 | |
| | | | | llvm-svn: 38697 | |||||
* | Implement scanning-for-( more correctly. This implements | Chris Lattner | 2006-07-11 | 1 | -11/+53 | |
| | | | | | | | | | test/Preprocessor/macro_fn_lparen_scan.c, but is not yet complete. Add some FIXME's about missing diagnostics on empty macro args. Improve some comments. llvm-svn: 38694 | |||||
* | Only do an expensive walk over the entire identifier table if the diagnostic | Chris Lattner | 2006-07-10 | 1 | -2/+5 | |
| | | | | | | that needs it is enabled. llvm-svn: 38690 | |||||
* | Trivially expand macros like: | Chris Lattner | 2006-07-09 | 1 | -4/+7 | |
| | | | | | | #define ENOMEMORYFORYOU ENOMEMORYFORYOU llvm-svn: 38687 | |||||
* | Make trivial expansion detection more aggressive. Trivially expand macros | Chris Lattner | 2006-07-09 | 1 | -9/+30 | |
| | | | | | | like: #define IS_BLAH() 1 llvm-svn: 38686 | |||||
* | Read, remember, and validate the arguments provided the a function-style | Chris Lattner | 2006-07-09 | 1 | -38/+185 | |
| | | | | | | macro invocation. llvm-svn: 38685 | |||||
* | Diagnose C99 6.10.3.2p1 | Chris Lattner | 2006-07-08 | 1 | -7/+28 | |
| | | | | llvm-svn: 38683 | |||||
* | Add identifiers for macro arguments to MacroInfo, check for duplicates, | Chris Lattner | 2006-07-08 | 1 | -9/+28 | |
| | | | | | | enhance macro equality testing to verify argument lists match. llvm-svn: 38682 | |||||
* | Start reading/validating the argument list for a function-like macro. | Chris Lattner | 2006-07-08 | 1 | -4/+103 | |
| | | | | llvm-svn: 38681 | |||||
* | Implement checking for macro equality, C99 6.10.3.2 | Chris Lattner | 2006-07-08 | 1 | -2/+2 | |
| | | | | llvm-svn: 38680 | |||||
* | add infrastructure for warning if redef'd macro bodies differ, but don't | Chris Lattner | 2006-07-08 | 1 | -7/+14 | |
| | | | | | | | | fully implement it. Fix warning on #define __LINE__ to warn about redefinition, not #undef. llvm-svn: 38679 | |||||
* | Warn about __VA_ARGS__ when used outside of a macro expansion | Chris Lattner | 2006-07-06 | 1 | -2/+10 | |
| | | | | llvm-svn: 38678 | |||||
* | Diagnose erroneous macro definitions where a ## operator is at the start/end ↵ | Chris Lattner | 2006-07-06 | 1 | -2/+22 | |
| | | | | | | of the macro llvm-svn: 38677 | |||||
* | Add a fast-path in getSpelling for identifiers. | Chris Lattner | 2006-07-04 | 1 | -2/+8 | |
| | | | | llvm-svn: 38672 | |||||
* | Change the Preprocessor::getSpelling interface to let it be zero-copy in | Chris Lattner | 2006-07-04 | 1 | -9/+12 | |
| | | | | | | the common case. llvm-svn: 38671 | |||||
* | Rename IdentifierTokenInfo -> IdentifierInfo. | Chris Lattner | 2006-07-04 | 1 | -31/+31 | |
| | | | | llvm-svn: 38650 | |||||
* | Eliminate MultipleIncludeOpt::ReadDirective and all calls to it. Any directives | Chris Lattner | 2006-07-04 | 1 | -21/+14 | |
| | | | | | | | | | that are lexed are made up of tokens, so the calls are just ugly and redundant. Hook up the MIOpt for the #if case. PPCExpressions doesn't currently implement the hook though, so we still don't handle #if !defined(X) with the MIOpt. llvm-svn: 38649 | |||||
* | Implement the multiple-include file optimization. | Chris Lattner | 2006-07-04 | 1 | -3/+16 | |
| | | | | llvm-svn: 38647 | |||||
* | Implement the automaton for recognizing files with controlling macros. | Chris Lattner | 2006-07-04 | 1 | -12/+70 | |
| | | | | llvm-svn: 38646 |