Chris Lattner
5dc7ff1cf3
correctly parameterize long, patch by Nate.
...
llvm-svn: 50886
2008-05-09 05:47:41 +00:00
Chris Lattner
adb86418db
Fix rdar://5921025 a crash on the included testcase.
...
llvm-svn: 50885
2008-05-09 05:34:49 +00:00
Chris Lattner
2fdcddd78d
Don't call into objc front-end when not parsing objc code. This avoids
...
crashes because objc types aren't set up right.
llvm-svn: 50884
2008-05-09 05:28:21 +00:00
Chris Lattner
f2e4cfd7e2
add support for pattern matching 'neg'
...
llvm-svn: 50883
2008-05-09 05:20:27 +00:00
Chris Lattner
aaba10e843
Implement PR2298. This transforms:
...
~x < ~y --> y < x
-x == -y --> x == y
llvm-svn: 50882
2008-05-09 05:19:28 +00:00
Chris Lattner
e7f0afe168
restore doxygen comment.
...
llvm-svn: 50881
2008-05-09 04:43:13 +00:00
Nick Kledzik
63b6127a73
<rdar://problem/5917641> use getMemBufferCopy if supplied buffer is not already zero terminated
...
llvm-svn: 50880
2008-05-09 01:09:59 +00:00
Anton Korobeynikov
a50eed4af9
Check for validity of aliasee pointer before dereference.
...
llvm-svn: 50878
2008-05-08 23:11:06 +00:00
Evan Cheng
0360ecbec1
Use movq to move low half of XMM register and zero-extend the rest.
...
llvm-svn: 50874
2008-05-08 22:35:02 +00:00
Steve Naroff
2e4e385a58
Make sure the prototype for objc_msgSend_fpret() returns a double.
...
llvm-svn: 50873
2008-05-08 22:02:18 +00:00
Chris Lattner
954907aa6f
conservatively say that volatile stores read memory.
...
llvm-svn: 50872
2008-05-08 21:58:49 +00:00
Tanya Lattner
93cea9fd18
Revertin 50867 since it was breaking the build.
...
llvm-svn: 50871
2008-05-08 21:54:20 +00:00
Nate Begeman
c58373886d
Add the non-immediate-shift vector builtins
...
llvm-svn: 50870
2008-05-08 21:51:12 +00:00
Chris Lattner
c2e108430f
store can't read from memory.
...
llvm-svn: 50869
2008-05-08 21:47:43 +00:00
Mikhail Glushenkov
e75ac17eaa
Add -E and -S options
...
llvm-svn: 50868
2008-05-08 20:02:36 +00:00
Mikhail Glushenkov
d7e151f868
A small refactoring (extract method) + some comment fixes.
...
llvm-svn: 50867
2008-05-08 20:02:03 +00:00
Ted Kremenek
0ae11a6f2e
Added initial support for supporting __NSString__ in attribute "format".
...
Still need to iron out some of the semantics (fixmes are present).
This addresses <rdar://problem/5916348>
llvm-svn: 50866
2008-05-08 19:43:35 +00:00
Ted Kremenek
27a4ba66fd
Updated Xcode project.
...
llvm-svn: 50864
2008-05-08 19:20:24 +00:00
Chris Lattner
d12c519b74
Remove dead return. Thanks to Bill for the review!
...
llvm-svn: 50863
2008-05-08 18:26:56 +00:00
Steve Naroff
b1c02371cd
Fix <rdar://problem/5879237> clang objc rewriter: ivars not accessible in structure generated for class
...
llvm-svn: 50862
2008-05-08 17:52:16 +00:00
Gordon Henriksen
829046b0b4
Improve pass documentation and comments.
...
Patch by Matthijs Kooijman!
llvm-svn: 50861
2008-05-08 17:46:35 +00:00
Chris Lattner
49a594e6ab
More than just loads can read from memory: readonly calls like strlen
...
also need to be checked for memory modifying instructions before we
can sink them. THis fixes the second half of PR2297.
llvm-svn: 50860
2008-05-08 17:37:37 +00:00
Chris Lattner
4fa09669d8
Make instcombine's DSE respect loads as well as stores. It is not safe to
...
delete the first store in:
store x -> p
load p
store y -> p
This is for PR2297.
llvm-svn: 50859
2008-05-08 17:20:30 +00:00
Chris Lattner
8462711ce8
add a new Instruction::mayReadFromMemory predicate, make
...
Instruction::mayWriteToMemory stronger for invokes.
llvm-svn: 50858
2008-05-08 17:16:51 +00:00
Devang Patel
4758caa926
Check linkage.
...
llvm-svn: 50851
2008-05-08 15:08:39 +00:00
Duncan Sands
9897eee483
Get exception handling working again on 64 bit
...
Darwin. This is a hack of course, but it does
at least look at the right thing: gotpcrel means
that this is already an offset, so an explicit
offset is not needed (and wrong). I think this
is good enough for the moment: Anton is working
on something better.
llvm-svn: 50850
2008-05-08 12:33:11 +00:00
Sanjiv Gupta
15cb669039
Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo.
...
llvm-svn: 50848
2008-05-08 08:54:20 +00:00
Sanjiv Gupta
cd13ef01a2
Remove the ending "." from clang options descriptions.
...
llvm-svn: 50847
2008-05-08 08:28:14 +00:00
Chris Lattner
3c04ff00c2
start implementation of a macro rewriter, this is currently just stubbed out.
...
llvm-svn: 50845
2008-05-08 06:52:13 +00:00
Chris Lattner
b781dc79aa
Add basic support for the pic-* target triples and add support for
...
targets that do not support recursion (and thus codegen stack variables
as globals).
Patch contributed by Alireza Moshtaghi!
llvm-svn: 50844
2008-05-08 05:58:21 +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
Chris Lattner
d93ff087ba
new testcase.
...
llvm-svn: 50841
2008-05-08 04:55:51 +00:00
Chris Lattner
f4b42f545b
Add support for constant folding the 'offsetof' pattern even if the
...
base is not zero. This fixes test/C++Frontend/2008-05-07-CrazyOffsetOf.cpp
llvm-svn: 50840
2008-05-08 04:54:43 +00:00
Chris Lattner
2b88c1e4c4
Fix rdar://5919567: assertion failure: split didn't occur before erase!
...
llvm-svn: 50839
2008-05-08 03:23:46 +00:00
Evan Cheng
78af38c392
Handle vector move / load which zero the destination register top bits (i.e. movd, movq, movss (addr), movsd (addr)) with X86 specific dag combine.
...
llvm-svn: 50838
2008-05-08 00:57:18 +00:00
Evan Cheng
0d6311d46c
Add nounwind.
...
llvm-svn: 50837
2008-05-07 22:59:08 +00:00
Anton Korobeynikov
fc2edad4ae
Turn StripPointerCast() into a method
...
llvm-svn: 50836
2008-05-07 22:54:15 +00:00
Devang Patel
ac25fc6f2e
Begin handling union bitfields.
...
Note, this is just beginning.
llvm-svn: 50835
2008-05-07 22:28:29 +00:00
Mikhail Glushenkov
41318a15d0
Use Doxygen-style comments.
...
llvm-svn: 50833
2008-05-07 21:50:19 +00:00
Steve Naroff
30ac2225ee
Fix <rdar://problem/5887874> clang ObjC rewriter: Use a different name for 'offsetof' macro
...
llvm-svn: 50832
2008-05-07 21:23:49 +00:00
Ted Kremenek
bcdb46830b
Added support for "drain".
...
llvm-svn: 50831
2008-05-07 21:17:39 +00:00
Fariborz Jahanian
8983f17ba0
Synthesized getter/setter method declarations need not have
...
an implementation. This fixes couple of failing prperty tests
caused by my previous patch.
llvm-svn: 50830
2008-05-07 20:53:44 +00:00
Ted Kremenek
f958ec50c0
Expand the CF retain checker to allow the Create/Get rule to apply to any
...
function that returns a CFxxxRef, not just functions whose name begins with
CF. This implements <rdar://problem/5917879>.
Added test case for this feature.
Updated calls to CStrInCStrNoCase to swap their arguments, per compatibility
with strcasestr.
llvm-svn: 50829
2008-05-07 20:06:41 +00:00
Ted Kremenek
dac0391218
Make the interface of CStrInCStrNoCase be the same as strcasestr.
...
llvm-svn: 50828
2008-05-07 20:04:18 +00:00
Chris Lattner
621d33bbc0
Add a new LibCallAliasAnalysis pass, which is parameterized
...
by an instance of LibCallInfo to provide mod/ref info of
standard library functions. This is powerful enough to
say that 'sqrt' is readonly except that it modifies errno,
or that "printf doesn't store to memory unless the %n
constraint is present" etc.
llvm-svn: 50827
2008-05-07 19:53:05 +00:00
Ted Kremenek
7b66ad294b
Fix some serious logical errors in CStrInCStrNoCase pointed out by Bill.
...
llvm-svn: 50826
2008-05-07 19:22:36 +00:00
Duncan Sands
e2b0bf43a7
Output correct exception handling and frame info
...
on x86-64 linux. This causes no regressions on
32 bit linux and 32 bit ppc. More tests pass
on 64 bit ppc with no regressions. I didn't
turn on eh on 64 bit linux because the intrinsics
needed to compile the eh runtime aren't done
yet. But if you turn it on and link with the
mainline runtime then eh seems to work fine
on x86-64 linux with this patch. Thanks to
Dale for testing. The main point of the patch
is that if you output that some object is
encoded using 4 bytes you had better not output
8 bytes for it: the patch makes everything
consistent.
llvm-svn: 50825
2008-05-07 19:11:09 +00:00
Ted Kremenek
fcf060fd2f
Flip order of arguments to CStrInStrNoCase.
...
llvm-svn: 50824
2008-05-07 18:57:30 +00:00
Ted Kremenek
13bbdf2389
Guard for empty strings in CStrInCStrNoCase.
...
llvm-svn: 50823
2008-05-07 18:49:31 +00:00
Ted Kremenek
b6cbf28d82
Use llvm::CStrInCStrNoCase instead of strcasestr, since the latter is not portable.
...
Correctly check if the result of CStrInCStrNoCase is NULL to generate summaries; before we were inverting the condition.
llvm-svn: 50822
2008-05-07 18:36:45 +00:00