Chris Lattner
1782da2f84
Add a new -rewrite-test option, which is basically a
...
playground to experiment with some new rewriter approaches. For now
it is probably the most complex version of 'cat' ever invented.
llvm-svn: 57406
2008-10-12 05:29:20 +00:00
Chris Lattner
fc7d4a3bd2
Add a new -dump-raw-tokens option, which allows us to see raw tokens.
...
Rename -dumptokens to -dump-tokens.
llvm-svn: 57405
2008-10-12 05:03:36 +00:00
Chris Lattner
b11c3233d8
Change FormTokenWithChars to take the token kind to form, since all clients
...
were setting a kind and then forming it. This is just a minor API cleanup,
no functionality change.
llvm-svn: 57404
2008-10-12 04:51:35 +00:00
Chris Lattner
99e7d23455
When in keep whitespace mode, make sure to return block comments that are
...
unterminated.
llvm-svn: 57403
2008-10-12 04:19:49 +00:00
Chris Lattner
e01e758e11
Change SkipBlockComment and SkipBCPLComment to return true when in
...
keep comment mode, instead of returning false. This matches SkipWhitespace.
llvm-svn: 57402
2008-10-12 04:15:42 +00:00
Chris Lattner
4d96344c19
Add a new mode to the lexer which enables it to return all characters,
...
even whitespace, as tokens from the file. This is enabled with
L->SetKeepWhitespaceMode(true) on a raw lexer. In this mode, you too
can use clang as a really complex version of 'cat' with code like this:
Lexer RawLex(SourceLocation::getFileLoc(SM.getMainFileID(), 0),
PP.getLangOptions(), File.first, File.second);
RawLex.SetKeepWhitespaceMode(true);
Token RawTok;
RawLex.LexFromRawLexer(RawTok);
while (RawTok.isNot(tok::eof)) {
std::cout << PP.getSpelling(RawTok);
RawLex.LexFromRawLexer(RawTok);
}
This will emit exactly the input file, with no canonicalization or other
translation. Realistic clients actually do something with the tokens of
course :)
llvm-svn: 57401
2008-10-12 04:05:48 +00:00
Owen Anderson
36b48de43c
Duncan convinced me that it's not possible to transform control-based escapes into
...
data-based ones. Just be conservative when analyzing control-based escapes.
llvm-svn: 57400
2008-10-12 03:59:45 +00:00
Chris Lattner
924efdf623
Stop the preprocessor from poking the lexer's private parts.
...
llvm-svn: 57399
2008-10-12 03:31:33 +00:00
Chris Lattner
097a8b8777
Fix a couple more places that poke KeepCommentMode unnecesarily.
...
llvm-svn: 57398
2008-10-12 03:27:19 +00:00
Chris Lattner
8637abd333
add a new inKeepCommentMode() accessor to abstract the KeepCommentMode
...
ivar.
llvm-svn: 57397
2008-10-12 03:22:02 +00:00
Chris Lattner
e3f863a388
fix misleading comment.
...
llvm-svn: 57396
2008-10-12 01:34:51 +00:00
Chris Lattner
7c2e9809b1
Simplify raw mode lexing by treating an unterminate /**/ comment the
...
same we we do an unterminated string or character literal. This makes
it so we can guarantee that the lexer never calls into the
preprocessor (which would be suicide for a raw lexer).
llvm-svn: 57395
2008-10-12 01:31:51 +00:00
Chris Lattner
6b0c5ad096
add a comment.
...
llvm-svn: 57394
2008-10-12 01:23:27 +00:00
Chris Lattner
50c9050037
Change how raw lexers are handled: instead of creating them and then
...
using LexRawToken, create one and use LexFromRawLexer. This avoids
twiddling the RawLexer flag around and simplifies some code (even
speeding raw lexing up a tiny bit).
This change also improves the token paster to use a Lexer on the stack
instead of new/deleting it.
llvm-svn: 57393
2008-10-12 01:15:46 +00:00
Chris Lattner
5d3e26a4f6
silence release-assert warnings.
...
llvm-svn: 57392
2008-10-12 00:31:50 +00:00
Chris Lattner
79ef843533
silence some release-assert warnings.
...
llvm-svn: 57391
2008-10-12 00:28:42 +00:00
Chris Lattner
e05f534628
silence a bunch of warnings in a release-assert build.
...
llvm-svn: 57390
2008-10-12 00:26:57 +00:00
Chris Lattner
87e97ea7b8
improve a comment.
...
llvm-svn: 57389
2008-10-12 00:23:07 +00:00
Chris Lattner
c46186e890
fix typo
...
llvm-svn: 57388
2008-10-11 23:59:03 +00:00
Chris Lattner
da435910e8
Fix PR2697 by rewriting the '(X / pos) op neg' logic. This also changes
...
a couple other cases for clarity, but shouldn't affect correctness.
Patch by Eli Friedman!
llvm-svn: 57387
2008-10-11 22:55:00 +00:00
Chris Lattner
f94e1bc53a
update win32 project file, patch provided by OvermindDL1 on llvmdev.
...
llvm-svn: 57386
2008-10-11 22:14:59 +00:00
Chris Lattner
2753955fc0
Change CALLSEQ_BEGIN and CALLSEQ_END to take TargetConstant's as
...
parameters instead of raw Constants. This prevents the constants from
being selected by the isel pass, fixing PR2735.
llvm-svn: 57385
2008-10-11 22:08:30 +00:00
Chris Lattner
d57b7603f9
rearrange some code.
...
llvm-svn: 57384
2008-10-11 22:07:19 +00:00
Chris Lattner
bea568f612
random cleanup
...
llvm-svn: 57383
2008-10-11 22:06:50 +00:00
Daniel Dunbar
a4a0813fb4
Add API changes which affected me to release notes:
...
- DbgStopPointInst
- Attributes (needs filling in)
llvm-svn: 57382
2008-10-11 21:26:56 +00:00
Duncan Sands
23ee981e8e
Fix comment typo.
...
llvm-svn: 57381
2008-10-11 19:34:24 +00:00
Anton Korobeynikov
2589777f3f
Add ability to override segment (mostly for code emitter purposes).
...
llvm-svn: 57380
2008-10-11 19:09:15 +00:00
Daniel Dunbar
2a5754521d
Add GCC 4.1.2 from Debian to known bad GCC list.
...
llvm-svn: 57379
2008-10-11 18:40:33 +00:00
Anton Korobeynikov
28f08aa041
Note EH stuff for x86-64/linux
...
llvm-svn: 57378
2008-10-11 18:27:16 +00:00
Anton Korobeynikov
e57220a5d1
We do support PIC on x86-64/linux
...
llvm-svn: 57377
2008-10-11 18:27:00 +00:00
Chris Lattner
d8b33e0af6
Strip out 2.3 info, make space for 2.4 info. I'd appreciate it if
...
various component owners could look through and update their areas
in the known-problems section.
llvm-svn: 57376
2008-10-11 18:18:28 +00:00
Daniel Dunbar
d94184395f
Unbreak DbgStopPointInst::getFileName().
...
llvm-svn: 57373
2008-10-11 06:40:56 +00:00
Chris Lattner
fb1f4a1329
simplify comparison
...
llvm-svn: 57371
2008-10-11 00:08:02 +00:00
Dale Johannesen
05b54c2af4
Fix SSE4.1 roundss, roundsd. While the instructions have
...
the same pattern as roundpd/roundps, the Intel compiler
builtins do not: rounds* has an extra operand. Fixes
gcc.target/i386/sse4_1-rounds[sd]-[1234].c
llvm-svn: 57370
2008-10-10 23:51:03 +00:00
Devang Patel
647a1e532b
Check loop exit predicate properly while eliminating one iteration loop.
...
This patch fixes PR 2869
llvm-svn: 57369
2008-10-10 22:02:57 +00:00
Anton Korobeynikov
58deb69040
Fix a thinko and unbreak sparc default CC
...
llvm-svn: 57368
2008-10-10 21:47:37 +00:00
Dale Johannesen
4f2791617e
Remove some overzealous checks that were rejecting
...
valid comments in inline assembly.
gcc.target/i386/20011009-1.c
llvm-svn: 57365
2008-10-10 21:04:42 +00:00
Anton Korobeynikov
f8a4a0e959
Extend set of return registers on sparc until someone will implement MRV support there. At least, this will allow libgcc compile, however we are not ABI-compatible with stuff compiled with native gcc.
...
llvm-svn: 57364
2008-10-10 20:30:14 +00:00
Anton Korobeynikov
b80b485264
Ignore extra 'r' modifier for now
...
llvm-svn: 57363
2008-10-10 20:29:50 +00:00
Anton Korobeynikov
76baad1ffc
Use expand for smul_lohi for now
...
llvm-svn: 57362
2008-10-10 20:29:31 +00:00
Anton Korobeynikov
a0cce200c5
Add testcase for 'r' inline asm operand
...
llvm-svn: 57361
2008-10-10 20:28:59 +00:00
Anton Korobeynikov
b36d3b2bb7
This does not fail anymore
...
llvm-svn: 57360
2008-10-10 20:28:32 +00:00
Anton Korobeynikov
281cf247a5
Add rudimentary support for 'r' register operand
...
llvm-svn: 57359
2008-10-10 20:28:10 +00:00
Anton Korobeynikov
b8736566c2
Cleanup
...
llvm-svn: 57358
2008-10-10 20:27:31 +00:00
Oscar Fuentes
45fde6fc4f
CMake: updated lib/Analysis/CMakeLists.txt.
...
llvm-svn: 57357
2008-10-10 18:51:36 +00:00
Mon P Wang
297364cd3b
Revert r57340 move guard mutex in getPointerToFunction as this can cause
...
deadlock issues with java
llvm-svn: 57356
2008-10-10 18:07:10 +00:00
Devang Patel
796bc4e6ce
Fix build failure.
...
Patch by Erick Tryzelaar.
llvm-svn: 57355
2008-10-10 17:57:50 +00:00
Steve Naroff
b2b5540c40
Add DeclGroup.cpp.
...
llvm-svn: 57354
2008-10-10 16:41:38 +00:00
Nuno Lopes
e3127f3f80
fix memleak by cleaning the global sets on pass exit
...
llvm-svn: 57353
2008-10-10 16:25:50 +00:00
Steve Naroff
8022c30aaa
Fix/simplify RewriteBlocks::RewriteBlockPointerFunctionArgs().
...
This completes the fix for <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?.
llvm-svn: 57350
2008-10-10 15:33:34 +00:00