Ted Kremenek
e9a709a0c5
Moved "Rewriter" tests from test/Sema to test/Rewriter.
...
llvm-svn: 46640
2008-02-01 17:05:54 +00:00
Anders Carlsson
f4f3679eea
Generate correct code for __builtin_huge_val
...
llvm-svn: 46639
2008-02-01 16:06:34 +00:00
Anders Carlsson
59435b2f9a
getPrimaryDecl can return null.
...
llvm-svn: 46638
2008-02-01 16:01:31 +00:00
Evan Cheng
124c3525d1
Update llvm.dbg.func.start.
...
llvm-svn: 46636
2008-02-01 09:12:11 +00:00
Evan Cheng
d6e44ab5ec
Remove the nasty LABEL hack with a much less evil one. Now llvm.dbg.func.start implies a stoppoint is set. SelectionDAGISel records a new source line but does not create a ISD::LABEL node for this special stoppoint. Asm printer will magically print this label. This ensures nothing is emitted before.
...
llvm-svn: 46635
2008-02-01 09:10:45 +00:00
Anders Carlsson
806700f973
It is allowed to get the address of an array subscript, even if the array has the register qualifier, if the array is really a pointer.
...
llvm-svn: 46634
2008-02-01 07:15:58 +00:00
Chris Lattner
a347834869
make some diagnostics more terse, update testcases.
...
Fix Sema::ActOnInstanceMessage to correctly do things in terms of canonical
types, fixing bogus errors like:
NSDistantObject.m:10383:120: error: bad receiver type 'typeof((id<NSMutableCopying>)self)'
id mess = ({ id __inv__ = ((void *)0); id __mb__ = _NSMessageBuilder((id <NSMutableCopying>)self, &__inv__); (void)[(__typeof__((id <NSMutableCopying>)self))__mb__ mutableCopyWithZone:((void *)0)]; if (!objc_collecting_enabled()) object_dispose(__mb__); __inv__; });
llvm-svn: 46633
2008-02-01 06:57:39 +00:00
Chris Lattner
617bfc39ff
Sema::ActOnInstanceMessage is generally doing bad things with typedefs, but
...
here I fix just one. The loop that rips through pointers should use
getAsPointerType() not static_cast<PointerType*> to get the pointee. This
fixes a crash on a large testcase.
llvm-svn: 46632
2008-02-01 06:43:02 +00:00
Ted Kremenek
81f0550cdd
Added back 'CodeGen' to test suite (accidentally removed in my last patch).
...
llvm-svn: 46631
2008-02-01 06:37:46 +00:00
Ted Kremenek
effdafa62a
Implemented casts for ConcreteInt and ConcreteIntLValue.
...
Implemented '==' and '!=' for ConcreteIntLValue.
llvm-svn: 46630
2008-02-01 06:36:40 +00:00
Chris Lattner
1226188e0a
Fix PR1969. stdin has no FileEntry.
...
llvm-svn: 46629
2008-02-01 05:34:02 +00:00
Evan Cheng
263070ea2b
Rename RecordLabel to RecordSourceLine because that's what it is doing.
...
llvm-svn: 46628
2008-02-01 02:05:57 +00:00
Anders Carlsson
b49fdfb5f0
Implement __builtin_huge_val.
...
llvm-svn: 46627
2008-02-01 00:44:41 +00:00
Anders Carlsson
3d149daf50
Don't try to compile .a files.
...
llvm-svn: 46626
2008-01-31 23:48:19 +00:00
Anton Korobeynikov
d47eedb7e9
Add convenient std::string helpers to StringMap. Patch by Mikhail Glushenkov!
...
llvm-svn: 46625
2008-01-31 23:02:33 +00:00
Ted Kremenek
2820b9c893
Added skeleton for new LValue class ConcereteIntLValue.
...
llvm-svn: 46624
2008-01-31 22:17:03 +00:00
Evan Cheng
27b32b87ed
Revert 46556 and 46585. Dan please fix the PseudoSourceValue problem and re-commit.
...
llvm-svn: 46623
2008-01-31 21:00:00 +00:00
Chris Lattner
9cc55f5b1f
add some helper methods for removing and replacing text, this makes the
...
rewriter more robust.
llvm-svn: 46622
2008-01-31 19:51:04 +00:00
Chris Lattner
1780a85602
Add a new InsertText method that does the check to see if the insertion was valid. This
...
fixes crashes where the insertion point was in a macro. Instead of crashing, we want
to emit a warning.
llvm-svn: 46621
2008-01-31 19:42:41 +00:00
Chris Lattner
187f626a7c
move a large method out of line
...
llvm-svn: 46620
2008-01-31 19:38:44 +00:00
Chris Lattner
2e0d2600a2
Make rewriter::inserttext return a bool to indicate if it failed.
...
Add a RewriteTest::ReplaceStmt method to factor the 'checking for
rewrite failed + emitting diagnostic if so' code.
llvm-svn: 46619
2008-01-31 19:37:57 +00:00
Ted Kremenek
2838799859
Moved RValue code in GRConstants.cpp to RValue.[h,cpp].
...
Moved ValueKey/ValueMap declaration to ValueState.h.
llvm-svn: 46618
2008-01-31 19:34:24 +00:00
Dale Johannesen
8ef8f24c40
Chris' change to print an approximation to long doubles
...
exposed a bug in APFloat's long double->double conversion of
NaNs. Broke several things in the ieee part of gcc testsuite.
llvm-svn: 46617
2008-01-31 18:34:01 +00:00
Steve Naroff
e97c4ab30c
Fix http://llvm.org/bugs/show_bug.cgi?id=1967 .
...
llvm-svn: 46616
2008-01-31 18:29:10 +00:00
Anton Korobeynikov
bf5435b91d
Reapply the patch with fix.
...
llvm-svn: 46615
2008-01-31 17:43:25 +00:00
Chris Lattner
ed55b5bd97
revert anton's recent stringmap patch, which breaks clang.
...
llvm-svn: 46614
2008-01-31 17:24:51 +00:00
Lauro Ramos Venancio
bb733a2bdc
Implement review feedback. Use getAsPointerType instead of cast<PointerType>.
...
llvm-svn: 46613
2008-01-31 15:19:04 +00:00
Anton Korobeynikov
816bcaba2b
Make StringMap to be more STL'ish. Patch by Mikhail Glushenkov!
...
llvm-svn: 46612
2008-01-31 12:30:40 +00:00
Anton Korobeynikov
14dd514eff
Whitespace cleanup
...
llvm-svn: 46611
2008-01-31 12:10:41 +00:00
Evan Cheng
f4f1d44779
Add a comment for a nasty short term hack.
...
llvm-svn: 46610
2008-01-31 10:05:13 +00:00
Evan Cheng
1c6c16ea11
Add an extra operand to LABEL nodes which distinguishes between debug, EH, or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution.
...
llvm-svn: 46609
2008-01-31 09:59:15 +00:00
Christopher Lamb
0592cf7e74
Allow ComplexExpressions in InstrInfo.td files to be slightly more... complex! ComplexExpressions can now have attributes which affect how TableGen interprets
...
the pattern when generating matchin code.
The first (and currently, only) attribute causes the immediate parent node of the ComplexPattern operand to be passed into the matching code rather than the node at the root of the entire DAG containing the pattern.
llvm-svn: 46606
2008-01-31 07:27:46 +00:00
Christopher Lamb
58ffa8c57a
Add more thorough error checking for NULL register classes.
...
llvm-svn: 46605
2008-01-31 07:09:08 +00:00
Ted Kremenek
6f4a9ef4b6
Fixed misspelling of "LLVM" due to some editor+Ted madness.
...
llvm-svn: 46604
2008-01-31 06:49:09 +00:00
Chris Lattner
7f024fe0c6
Fix PR1965: missing diagnostics for parameters that are missing
...
type specifiers. This required updating some (buggy) tests, and the
testcase was previously accidentally committed.
llvm-svn: 46603
2008-01-31 06:10:07 +00:00
Chris Lattner
4973fb9273
Fix a bogus test
...
llvm-svn: 46602
2008-01-31 06:06:29 +00:00
Nate Begeman
4cd6689d1f
Remainder of the __builtin_overload feedback
...
llvm-svn: 46601
2008-01-31 05:38:29 +00:00
Chris Lattner
a779d69029
Fix a rewriter crash when the whole body of a foreach is itself
...
rewritten, as in Sema/rewrite-foreach-6.m. Fariborz/Steve,
please review this to see if it is sane.
llvm-svn: 46600
2008-01-31 05:10:40 +00:00
Chris Lattner
a94035bbb8
Fix PR1921 by promoting negative indices to intptrty.
...
llvm-svn: 46599
2008-01-31 04:12:50 +00:00
Evan Cheng
6332dbec69
Add x86 specific getFrameIndexOffset(). This fixes local variable debugging info.
...
llvm-svn: 46598
2008-01-31 04:06:00 +00:00
Evan Cheng
a41d3bcb12
MRegisterInfo::getLocation() is a really bad idea. Its function is to calculate the offset from frame pointer to a stack slot and then storing the delta in a MachineLocation object. The name is bad (it implies a getter), and MRegisterInfo doesn't need to know about MachineLocation.
...
Replace getLocation() with getFrameIndexOffset() which returns the delta from frame pointer to stack slot. Dwarf writer can then use the information for whatever it wants.
llvm-svn: 46597
2008-01-31 03:37:28 +00:00
Evan Cheng
3c0486fb38
Makes the same change in ppc backend: avoid inserting prologue before debug labels.
...
llvm-svn: 46596
2008-01-31 03:33:38 +00:00
Ted Kremenek
a0be8264b5
Added transfer function support for unary '&' and '*', providing basic
...
(local) aliasing support.
Modified ExplodedGraph pretty-printer (for GRConstants) to also print out the
pointer value of the state associated with a node. This way one can easily
see that two states are identical.
llvm-svn: 46595
2008-01-31 02:35:41 +00:00
Anders Carlsson
fbcf676a65
Make CallExpr::isBuiltinConstantExpr slightly more efficient.
...
llvm-svn: 46594
2008-01-31 02:13:57 +00:00
Steve Naroff
f6e3b32964
Add support for CallExpr::isBuiltinConstantExpr(). For now, this hook is used to support CFConstantStrings. Can be extended to support other built-in functions.
...
This allows the following code to compile without error...
#include <CoreFoundation/CoreFoundation.h>
#define CONST_STRING_DECL(S, V) const CFStringRef S = (const CFStringRef)__builtin___CFStringMakeConstantString(V);
CONST_STRING_DECL(kCFTimeZoneSystemTimeZoneDidChangeNotification, "kCFTimeZoneSystemTimeZoneDidChangeNotification")
llvm-svn: 46592
2008-01-31 01:07:12 +00:00
Dan Gohman
a65951fef0
Avoid unnecessarily casting away const, fixing a FIXME.
...
llvm-svn: 46591
2008-01-31 01:05:10 +00:00
Dan Gohman
ed346f2ed5
Avoid unnecessarily casting away const.
...
llvm-svn: 46590
2008-01-31 01:01:48 +00:00
Dan Gohman
c2fdeee1ed
Fix a typo in a comment.
...
llvm-svn: 46588
2008-01-31 00:44:33 +00:00
Dan Gohman
9ba4d76816
Rename ISD::FLT_ROUNDS to ISD::FLT_ROUNDS_ to avoid conflicting
...
with the real FLT_ROUNDS (defined in <float.h>).
llvm-svn: 46587
2008-01-31 00:41:03 +00:00
Evan Cheng
4863fcc3eb
Also avoid adding callee save code before debug labels.
...
llvm-svn: 46586
2008-01-31 00:27:49 +00:00