Chris Lattner
8a42586c54
more SourceLocation lexicon change: instead of referring to the
...
"logical" location, refer to the "instantiation" location.
llvm-svn: 62316
2009-01-16 07:36:28 +00:00
Ted Kremenek
6c7ea11300
Preprocessor: Allocate MacroInfo objects using a BumpPtrAllocator instead using new/delete. This speeds up -Eonly on Cocoa.h using the regular lexer by 1.8% and the PTHLexer by 3%.
...
llvm-svn: 61042
2008-12-15 19:56:42 +00:00
Ted Kremenek
cbc984169f
Handle another case where we should use PTHLexer as an alternative to the normal Lexer.
...
llvm-svn: 59736
2008-11-20 16:46:54 +00:00
Ted Kremenek
6552d259d4
Assign the result of getCurrentFileLexer() to a PreprocessorLexer* instead of Lexer* (narrower interface).
...
llvm-svn: 59691
2008-11-20 01:35:24 +00:00
Ted Kremenek
2861cf42fe
Use PreprocessorLexer::getFileID() instead of Lexer::getFileLoc(). This is an intermediate step to having getCurrentLexer() return a PreprocessorLexer* instead of a Lexer*.
...
llvm-svn: 59672
2008-11-19 22:55:25 +00:00
Ted Kremenek
a2c3c8d71c
Move more cases of using 'CurLexer' to 'CurPPLexer'.
...
Use PTHLexer::isNextPPTokenLParen() when using the PTHLexer.
llvm-svn: 59671
2008-11-19 22:43:49 +00:00
Ted Kremenek
76c3441a4e
When using a PTHLexer, use DiscardToEndOfLine() instead of ReadToEndOfLine().
...
llvm-svn: 59668
2008-11-19 22:21:33 +00:00
Ted Kremenek
551c82aa7b
Replace more uses of 'CurLexer->' with 'CurPPLexer->'. No performance change.
...
llvm-svn: 59482
2008-11-18 01:12:54 +00:00
Chris Lattner
fb8b8f298c
Fix the root cause of PR2750 instead of the side effect.
...
NumericLiteral parser is not careful about overrun because
it should never be possible. It implicitly expects that its
input matched the regex for pp-constant. Because of this, it
knows it can't be pointing to a prefix of something that
looks like a number. This is all fine, except that __LINE__
does not prevent implicit concatenation from happening. Fix
__LINE__ to not do this.
llvm-svn: 56818
2008-09-29 23:12:31 +00:00
Chris Lattner
d330036c06
The awesome GNU "comma elision extension" works with both the standard
...
__VA_ARGS__ syntax as well as with the amazingly awesome GNU "named
variadic macro" extension. Allow it with the GNU syntax as well.
llvm-svn: 50843
2008-05-08 05:10:33 +00:00
Sam Bishop
27654983dc
Plug a memory leak in the "this macro expands into a single trivially-
...
expanded token" case.
llvm-svn: 48637
2008-03-21 07:13:02 +00:00
Chris Lattner
0725a3e055
move #include to the file that needs it.
...
llvm-svn: 48485
2008-03-18 05:59:11 +00:00
Chris Lattner
7a51313d8a
Make a major restructuring of the clang tree: introduce a top-level
...
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.
llvm-svn: 48402
2008-03-15 23:59:48 +00:00