Commit Graph

75586 Commits

Author SHA1 Message Date
Benjamin Kramer 2b45998b7b Kill dead store.
llvm-svn: 92920
2010-01-07 17:50:57 +00:00
Benjamin Kramer d64b952e5e Remove dead variable.
llvm-svn: 92919
2010-01-07 17:29:08 +00:00
Benjamin Kramer cdb3889791 Use pop_back_val instead of back()+pop_back.
llvm-svn: 92918
2010-01-07 17:27:56 +00:00
Kovarththanan Rajaratnam b53c7d4d9d Tigthen scope of local char array
llvm-svn: 92917
2010-01-07 16:01:54 +00:00
Benjamin Kramer 76e2766442 Use a do-while loop instead of while + boolean.
llvm-svn: 92912
2010-01-07 13:50:07 +00:00
Nuno Lopes 950d5b2cd3 fix PR5869: mangle static symbols like gcc does to make it easier to diff symbol tables
llvm-svn: 92911
2010-01-07 09:36:51 +00:00
Duncan Sands 1949de7b81 Correct spelling.
llvm-svn: 92910
2010-01-07 09:05:26 +00:00
Duncan Sands f117880ab0 Be less stingy as to how many selects and phi nodes we
are prepared to look through.

llvm-svn: 92898
2010-01-07 05:48:42 +00:00
Douglas Gregor 3a08dcc156 Test linkage of typeinfo and typeinfo names for class templates
llvm-svn: 92897
2010-01-07 04:09:30 +00:00
Douglas Gregor 47ed966813 More trivial optimizations to a function well outside the critical path
llvm-svn: 92896
2010-01-07 02:24:06 +00:00
John McCall 0237485287 Improve the lead diagnostic for C++ object subscript expressions with
no viable overloads.  Use a different message when the class provides
no operator[] overloads at all; use it for operator(), too.

Partially addresses PR 5900.

llvm-svn: 92894
2010-01-07 02:04:15 +00:00
Chris Lattner 9855a6bb7c handle ConstantVector while I'm in here.
llvm-svn: 92892
2010-01-07 01:20:20 +00:00
Ted Kremenek c7c6431860 Change ObjCContainerDecl to contain the entire range for the '@end'
piece of the declaration.  The '@' and the 'end' are separate tokens,
and require two SourceLocations to accurately track.

This change was motivated because ObjCContainerDecl::getSourceRange()
would previously not return the entire range of the declaration (the
'end' would be left off).

llvm-svn: 92891
2010-01-07 01:20:12 +00:00
Ted Kremenek b58514e613 Add FileCheck prefix to another location in the output of c-index-test.
llvm-svn: 92890
2010-01-07 01:17:12 +00:00
Chris Lattner 64ecc468bd fix a globalopt crash on 'bullet' (handling evaluation of a store
to an element of a vector in a static ctor) which occurs with an 
unrelated patch I'm testing.  Annoyingly, EvaluateStoreInto basically 
does exactly the same stuff as InsertElement constant folding, but it
now handles vectors, and you can't insertelement into a vector.  It
would be 'really nice' if GEP into a vector were not legal.

llvm-svn: 92889
2010-01-07 01:16:21 +00:00
Evan Cheng 90dc43fcf5 Fix a minor regression from my dag combiner changes. One more place which needs to look pass truncates.
llvm-svn: 92885
2010-01-07 00:54:06 +00:00
Douglas Gregor 09470e6a4e Switch StringRef::edit_distance over to using raw pointers, since both
std::vector and llvm::SmallVector have annoying performance
tradeoffs. No, I don't expect this to matter, and now it won't.

llvm-svn: 92884
2010-01-07 00:51:54 +00:00
Jakob Stoklund Olesen f1522d612f Add comments.
llvm-svn: 92883
2010-01-07 00:51:04 +00:00
Douglas Gregor 9134e737fc Add a test case for code-completion in the presence of tabs
llvm-svn: 92882
2010-01-07 00:40:35 +00:00
Chris Lattner 4debb32fdd _mm_xor_ps does a xor not a nxor. The other 'xor' builtins look fine,
but this one is wrong.  Thanks to Tanya for noticing this.

llvm-svn: 92881
2010-01-07 00:36:41 +00:00
Fariborz Jahanian 6722fc0c09 Make this test be ingored for linux.
llvm-svn: 92880
2010-01-07 00:31:48 +00:00
Douglas Gregor 712dcfe921 Fix the search for visible declarations within a Scope to ensure that
we look into a Scope that corresponds to a compound statement whose
scope was combined with the scope of the function that owns it. This
improves typo correction in many common cases.

llvm-svn: 92879
2010-01-07 00:31:29 +00:00
Douglas Gregor 43a0857631 When we typo-correct a base class initializer, point to the base class
specifier that we corrected to.

llvm-svn: 92878
2010-01-07 00:26:25 +00:00
Douglas Gregor 6da83624e4 Whenever we emit a typo-correction diagnostic, also emit a note
pointing to the declaration that we found that has that name (if it is
unique).

llvm-svn: 92877
2010-01-07 00:17:44 +00:00
Jim Grosbach b907a467e2 80 column violations
llvm-svn: 92876
2010-01-06 23:54:42 +00:00
Fariborz Jahanian bdf198bc59 Fixes the test.
llvm-svn: 92875
2010-01-06 23:54:34 +00:00
Jakob Stoklund Olesen 29c7234eb7 Allow double defs after tail duplication.
llvm-svn: 92874
2010-01-06 23:52:46 +00:00
Jakob Stoklund Olesen 29a64c9575 Add Target hook to duplicate machine instructions.
Some instructions refer to unique labels, and so cannot be trivially cloned
with CloneMachineInstr.

llvm-svn: 92873
2010-01-06 23:47:07 +00:00
Jim Grosbach 5fd6feb883 Addressing mode 6 (load/store) instructions can't encode an immediate offset
for stack references.

llvm-svn: 92871
2010-01-06 23:45:18 +00:00
Douglas Gregor 10f1e4dda8 When suggesting a typo correction for an @implementation without a
corresponding @interface, provide a note showing which interface we're
referring to. This note has the fix-it hint on it.

Also, don't automatically apply fix-it hints for notes. They're meant
to express fix-its that would change semantics.

llvm-svn: 92870
2010-01-06 23:44:25 +00:00
Ted Kremenek 2a43fd58ee Change clang_getDeclExtent() to have the endpoint point to the last character in the last token.
llvm-svn: 92869
2010-01-06 23:43:31 +00:00
Fariborz Jahanian 017a6067e5 Test case for rewriting of __weak byref objects.
llvm-svn: 92868
2010-01-06 23:31:34 +00:00
Douglas Gregor 03e8bdc07e Move the allocation of designators in DesignatedInitExpr to the
ASTContext. Fixes <rdar://problem/7495428>.

llvm-svn: 92867
2010-01-06 23:17:19 +00:00
John McCall 7443052652 Don't assert when dealing with unsigned casts of lvalues. Fixes PR5961.
llvm-svn: 92866
2010-01-06 22:57:21 +00:00
Jim Grosbach a7cef4fab5 Anti-dependency breaking needs to be careful regarding instructions with
multiple register definitions.

llvm-svn: 92864
2010-01-06 22:21:25 +00:00
Douglas Gregor b3d8deecbf Add test from PR5913, which has already been fixed
llvm-svn: 92863
2010-01-06 22:09:05 +00:00
John McCall 2ce81adbb3 Derive tighter ranges for & and >> in the conversion-checking code.
llvm-svn: 92862
2010-01-06 22:07:33 +00:00
Douglas Gregor dfdda291e0 Add testcase for PR5817, although the bug was already fixed
llvm-svn: 92858
2010-01-06 22:06:13 +00:00
Douglas Gregor 2a34df3264 Fix linkage for RTTI names by re-using the logic for computing the
linkage of vtables. Before this, we were emitting RTTI names for
template instantiations with strong external linkage rather than with
weak ODR linkage.

llvm-svn: 92857
2010-01-06 22:00:56 +00:00
Fariborz Jahanian 8e356bfe28 Fix a bug when property is redeclared in multiple
continuation classes and its original declaration
is imported from a protocol. This fixes radar 7509234.

llvm-svn: 92856
2010-01-06 21:38:30 +00:00
Douglas Gregor ccecc1bb43 Fix marking of virtual members for nested classes whose first non-pure virtual function has a body inlined in the class
llvm-svn: 92855
2010-01-06 20:27:16 +00:00
Eric Christopher 2cdb806fd8 Move the object size intrinsic optimization to inst-combine and make
it work for any integer size return type.

llvm-svn: 92853
2010-01-06 20:04:44 +00:00
Evan Cheng 746012a6c1 Comment.
llvm-svn: 92850
2010-01-06 19:43:21 +00:00
Evan Cheng 166a4e6caa Teach dag combine to fold the following transformation more aggressively:
(OP (trunc x), (trunc y)) -> (trunc (OP x, y))

Unfortunately this simple change causes dag combine to infinite looping. The problem is the shrink demanded ops optimization tend to canonicalize expressions in the opposite manner. That is badness. This patch disable those optimizations in dag combine but instead it is done as a late pass in sdisel.

This also exposes some deficiencies in dag combine and x86 setcc / brcond lowering. Teach them to look pass ISD::TRUNCATE in various places.

llvm-svn: 92849
2010-01-06 19:38:29 +00:00
David Chisnall 9a2073c035 Fix for PR5691
llvm-svn: 92846
2010-01-06 18:02:59 +00:00
Douglas Gregor 3e38656da4 Fix struct/class mismatch
llvm-svn: 92841
2010-01-06 17:16:00 +00:00
Douglas Gregor 859f0ae041 Make sure that the key-function computation produces the correct
result for a nested class whose first non-pure virtual member function
has an inline body. Previously, we were checking for the key function
before we had seen the (delayed) inline body. 

llvm-svn: 92839
2010-01-06 17:00:51 +00:00
Victor Hernandez 127286c58b When parsing function-local metadata, create a function-local MDNode
llvm-svn: 92838
2010-01-06 17:00:21 +00:00
Jim Grosbach eb431da074 80 column and whitespace cleanup
llvm-svn: 92837
2010-01-06 16:48:02 +00:00
Duncan Sands c8493da5b1 Fix a README item: have functionattrs look through selects and
phi nodes when deciding which pointers point to local memory.
I actually checked long ago how useful this is, and it isn't
very: it hardly ever fires in the testsuite, but since Chris
wants it here it is!

llvm-svn: 92836
2010-01-06 15:37:47 +00:00