Chris Lattner
22dc378630
Split LangOptions out into its own header
...
llvm-svn: 38806
2006-08-04 04:44:06 +00:00
Chris Lattner
b9093cd1d0
Add an initial cut at a datastructure for holding declspec's.
...
llvm-svn: 38805
2006-08-04 04:39:53 +00:00
Chris Lattner
c0acd3d621
Split declaration parsing out into Declarations.cpp
...
llvm-svn: 38804
2006-07-31 05:13:43 +00:00
Chris Lattner
70f32b7d68
Add initial very-incomplete support for parsing declarations. We just manage
...
to be able to parse "int x;" now.
llvm-svn: 38803
2006-07-31 05:09:04 +00:00
Chris Lattner
0bb5f835e4
initial support for parsing, right now just ;'s at the top level, but this
...
adds most simple scaffolding.
llvm-svn: 38802
2006-07-31 01:59:18 +00:00
Chris Lattner
34dfaee634
Misc cleanups
...
llvm-svn: 38801
2006-07-31 01:57:54 +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
b10969b9b2
new testcase
...
llvm-svn: 38799
2006-07-30 07:33:49 +00:00
Chris Lattner
022b62e941
new testcase
...
llvm-svn: 38798
2006-07-30 07:20:09 +00:00
Chris Lattner
a5722f5a56
add a note
...
llvm-svn: 38797
2006-07-29 17:59:42 +00:00
Chris Lattner
4beb0381ed
Trigraphs are not enabled in -fpreprocessed mode.
...
llvm-svn: 38796
2006-07-29 17:50:10 +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
8d31b5d1aa
new testcase
...
llvm-svn: 38794
2006-07-29 07:32:40 +00:00
Chris Lattner
07560ed0cf
Fix precedence bug
...
llvm-svn: 38793
2006-07-29 07:26:48 +00:00
Chris Lattner
2641bd549c
new testcase
...
llvm-svn: 38792
2006-07-29 07:19:41 +00:00
Chris Lattner
f76e62ecad
Implement support for #__VA_ARGS__
...
llvm-svn: 38791
2006-07-29 07:14:41 +00:00
Chris Lattner
5b123fde96
new testcase
...
llvm-svn: 38790
2006-07-29 07:08:39 +00:00
Chris Lattner
b631d7ce6c
new testcase
...
llvm-svn: 38789
2006-07-29 06:59:47 +00:00
Chris Lattner
232daf6834
testcase from the c99 standard
...
llvm-svn: 38788
2006-07-29 06:48:55 +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
15d6b28f09
new testcase
...
llvm-svn: 38786
2006-07-29 06:44:19 +00:00
Chris Lattner
f35d327a99
Testcases for comment saving modes, -C and -CC.
...
llvm-svn: 38785
2006-07-29 06:41:10 +00:00
Chris Lattner
cd028fc1f6
Fix -E mode to enter the main file *after* -E mode configures the preprocessor.
...
llvm-svn: 38784
2006-07-29 06:35:08 +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
2be4115465
add another missing feature
...
llvm-svn: 38782
2006-07-29 06:29:39 +00:00
Chris Lattner
24691eee6c
this item done
...
llvm-svn: 38781
2006-07-29 04:40:17 +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
d480b9c0ed
new testcase for the GNU comma swallow extension.
...
llvm-svn: 38779
2006-07-29 04:39:12 +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
63081842a7
new testcase for placemarker handling.
...
llvm-svn: 38777
2006-07-29 04:09:49 +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
2bc48570b7
new testcase for __VA_ARGS__
...
llvm-svn: 38775
2006-07-29 04:03:59 +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
f9771166ed
add method to unpoison something for __VA_ARGS__.
...
llvm-svn: 38772
2006-07-29 03:47:18 +00:00
Chris Lattner
3ce273025e
Remove __VA_ARGS__ "keyword".
...
llvm-svn: 38771
2006-07-29 03:47:08 +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
f30dcbe07e
new testcase
...
llvm-svn: 38768
2006-07-29 01:24:46 +00:00
Chris Lattner
331ad778b0
Implement paste avoidance, implementing Preprocessor/output_paste_avoid.c
...
llvm-svn: 38767
2006-07-28 06:56:01 +00:00
Chris Lattner
3961e60991
Tweak expected results do to paste avoidance.
...
llvm-svn: 38766
2006-07-28 06:55:35 +00:00
Chris Lattner
341c9a1615
new testcase for paste avoidance
...
llvm-svn: 38765
2006-07-28 06:54:07 +00:00
Chris Lattner
24fad1a82f
update notes. Function-style macros are largely done.
...
llvm-svn: 38764
2006-07-28 05:25:01 +00:00
Chris Lattner
b1d2594456
Add test for pasting empty formals
...
llvm-svn: 38763
2006-07-28 05:13:36 +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
fdc0abe619
new testcase
...
llvm-svn: 38759
2006-07-27 06:17:55 +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