Chris Lattner
b19f796e97
llvm has no EH by default, no need for these flags.
...
llvm-svn: 39047
2006-10-25 05:09:05 +00:00
Chris Lattner
0ba3dc4ec3
Start removing LexerToken from the actions interface.
...
llvm-svn: 39043
2006-10-25 03:38:23 +00:00
Chris Lattner
3c98fd3af3
Switch to using a bitwise and instead of modulus.
...
llvm-svn: 39038
2006-10-22 17:48:27 +00:00
Chris Lattner
07b019a1bc
add #include
...
llvm-svn: 39034
2006-10-22 07:28:56 +00:00
Chris Lattner
5ed76da296
Implement framework filesystem caching.
...
llvm-svn: 39031
2006-10-22 07:24:13 +00:00
Chris Lattner
641a0be31b
count # framework lookups
...
llvm-svn: 39026
2006-10-20 06:23:14 +00:00
Chris Lattner
a4271e4a51
rename
...
llvm-svn: 39024
2006-10-20 06:13:26 +00:00
Chris Lattner
5c683b2b4b
Fix a regression introduced when adding subframework support
...
llvm-svn: 39022
2006-10-20 05:12:14 +00:00
Chris Lattner
62aa0d4c9f
Implement test/Preprocessor/macro_arg_keyword.c
...
llvm-svn: 39021
2006-10-20 05:08:24 +00:00
Chris Lattner
577377e847
Speed up [sub]framework searching
...
llvm-svn: 39017
2006-10-20 04:55:45 +00:00
Chris Lattner
63dd32b656
Implement subframework lookup
...
llvm-svn: 39015
2006-10-20 04:42:40 +00:00
Chris Lattner
25e0d54a0e
Move keyword setup from the preprocessor into the IdentifierTable class.
...
llvm-svn: 39014
2006-10-18 06:07:05 +00:00
Chris Lattner
59a9ebdb17
refactor header searching stuff out of the main Preprocessor object into
...
it's own HeaderSearch object. This makes Preprocessor simpler and easier
to understand.
llvm-svn: 39012
2006-10-18 05:34:33 +00:00
Chris Lattner
ff777c38dc
silence warning, add hacky patch for framework lookup
...
llvm-svn: 39011
2006-10-18 04:03:13 +00:00
Chris Lattner
720f2700b1
Make the identifier table track objc keywords
...
llvm-svn: 39003
2006-10-17 04:03:44 +00:00
Chris Lattner
87d3bec423
Make preprocessor keywords like 'define' first class citizens in the
...
IdentifierTable, instead of making them resort to strcmp'ing.
llvm-svn: 39002
2006-10-17 03:44:32 +00:00
Chris Lattner
dd0b7cbf0b
Oversight: fixes test/Lexer/number.c
...
llvm-svn: 38998
2006-10-17 02:53:51 +00:00
Chris Lattner
6e5b2a084e
ignore '#line' and '# 123' for now.
...
llvm-svn: 38997
2006-10-17 02:53:32 +00:00
Chris Lattner
063400e46e
Implement the #define_other_target directive.
...
llvm-svn: 38984
2006-10-14 19:54:15 +00:00
Chris Lattner
81278c6356
Implement the #define_target preprocessor directive.
...
llvm-svn: 38980
2006-10-14 19:03:49 +00:00
Chris Lattner
02dffbda3b
Write up TargetInfo so that use of wchar_t strings results in a warning if
...
used in a target set where the size is not identical.
llvm-svn: 38975
2006-10-14 07:50:21 +00:00
Chris Lattner
8c2048710d
Rename LexerToken methods to be more consistent.
...
llvm-svn: 38969
2006-10-14 05:19:21 +00:00
Chris Lattner
d3e9895b9a
Initial support for semantic analysis and AST building for StringExpr nodes.
...
llvm-svn: 38960
2006-10-06 05:22:26 +00:00
Chris Lattner
6d998556de
Fix precedence problem
...
llvm-svn: 38809
2006-08-04 06:11:48 +00:00
Chris Lattner
95a06b34f7
Simplify implementation of varargs macros by adding the __VA_ARGS__ token
...
to the formal argument list of a C99 varargs macro.
llvm-svn: 38800
2006-07-30 08:40:43 +00:00
Chris Lattner
273ddd5c57
The optimized case has to treat __VA_ARGS__ as an argument. This fixes
...
test/Preprocessor/macro_rescan_varargs.c
llvm-svn: 38795
2006-07-29 07:33:01 +00:00
Chris Lattner
07560ed0cf
Fix precedence bug
...
llvm-svn: 38793
2006-07-29 07:26:48 +00:00
Chris Lattner
f76e62ecad
Implement support for #__VA_ARGS__
...
llvm-svn: 38791
2006-07-29 07:14:41 +00:00
Chris Lattner
d97d2e780c
Fix a crash on Preprocessor/macro_paste_none.c
...
llvm-svn: 38787
2006-07-29 06:44:29 +00:00
Chris Lattner
457fc15bc5
Implement comment saving mode: the -C and -CC options.
...
llvm-svn: 38783
2006-07-29 06:30:25 +00:00
Chris Lattner
775d832110
Implement the GNU comma swallowing extension. This implements
...
test/Preprocessor/macro_fn_comma_swallow.c
llvm-svn: 38780
2006-07-29 04:39:41 +00:00
Chris Lattner
479b0af31d
Improve placemarker handling, implementing Preprocessor/macro_fn_placemarker.c
...
llvm-svn: 38778
2006-07-29 04:16:20 +00:00
Chris Lattner
21c8b8f71e
Implement support for __VA_ARGS__, allowing test/Preprocessor/macro_fn_varargs_iso.c
...
to pass.
llvm-svn: 38776
2006-07-29 04:04:22 +00:00
Chris Lattner
02f1f4f28b
Fix a bug in previous commit
...
llvm-svn: 38774
2006-07-29 03:52:46 +00:00
Chris Lattner
6d9f8ed3b6
No need for explicit underscore anymore.
...
llvm-svn: 38773
2006-07-29 03:52:06 +00:00
Chris Lattner
7e37483f14
Poison and unpoison __VA_ARGS__ when appropriate
...
llvm-svn: 38770
2006-07-29 03:46:57 +00:00
Chris Lattner
e7a5130dff
If the varargs token is missing, add an empty argument to represent it. This
...
fixes Preprocessor/macro_fn_varargs_named.c
llvm-svn: 38769
2006-07-29 01:25:12 +00:00
Chris Lattner
f3f1c709cf
Use a continue to avoid indentation of a bunch of code
...
llvm-svn: 38762
2006-07-28 05:10:36 +00:00
Chris Lattner
a9dc597fca
Implement pasting of arguments that expand to no tokens. This handles the
...
C99 "placemarker" concept.
llvm-svn: 38761
2006-07-28 05:07:04 +00:00
Chris Lattner
6e4bf523e6
Implement C99 6.10.3.4p2, testcase here: Preprocessor/macro_disable3.c.
...
llvm-svn: 38760
2006-07-27 06:59:25 +00:00
Chris Lattner
b57aa46e41
Switch ExpandFunctionArguments to use a smallvector instead of a vector,
...
speeding up my macro expansion torture test from .75s to .5s (33%!)
llvm-svn: 38758
2006-07-27 03:42:15 +00:00
Chris Lattner
7a4af3b73d
Change Preprocessor::ReadFunctionLikeMacroArgs to use a SmallVector to lex
...
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
2006-07-26 06:26:52 +00:00
Chris Lattner
c1410dc1e6
Change MacroArgs to allocate space for the unexpanded tokens immediately after
...
the MacroArgs object itself. This is a bit more efficient and will be even more
so shortly.
llvm-svn: 38756
2006-07-26 05:22:49 +00:00
Chris Lattner
6fc08bc77d
Add a new getArgLength method and refactor some code to use it
...
llvm-svn: 38755
2006-07-26 04:55:32 +00:00
Chris Lattner
7021657a0f
Implement a FIXME: don't copy token array into a token vector, instead, macroexpander should expand from an array directly.
...
llvm-svn: 38754
2006-07-26 03:50:40 +00:00
Chris Lattner
36b6e8134e
speed up a brutal macro-expansion torture test by about 30% (1.5 -> 1.0s)
...
by turning vectors of vectors into a single vector, reducing pressure on
malloc. This can still be improved.
llvm-svn: 38753
2006-07-21 06:38:30 +00:00
Chris Lattner
a5f4c882e2
disable malformed string/character errors when in raw mode. This fixes
...
test/Lexer/badstring_in_if0.c
llvm-svn: 38751
2006-07-20 06:08:47 +00:00
Chris Lattner
5a78a02ea2
If an invalid string or character is read, return the invalid part as a tok::unknown token.
...
llvm-svn: 38749
2006-07-20 06:02:19 +00:00
Chris Lattner
08ba4c015f
fix obvious bug that caused Preprocessor/macro_paste_bad.c to fail.
...
llvm-svn: 38748
2006-07-20 04:52:59 +00:00
Chris Lattner
510ab61fd3
Add optimization for identifier##identifier -> identifier, the most common case of token pasting.
...
llvm-svn: 38747
2006-07-20 04:47:30 +00:00