Commit Graph

75723 Commits

Author SHA1 Message Date
Benjamin Kramer 59617be4a5 Remove trailing semicolons and silence MSVC warning about C linkage.
warning C4190: 'GetEntity' has C-linkage specified, but returns UDT
'clang::idx::Entity' which is incompatible with C

llvm-svn: 93237
2010-01-12 11:32:40 +00:00
Duncan Sands 0067d6bbbe Fix typo.
llvm-svn: 93235
2010-01-12 08:30:46 +00:00
Duncan Sands fd75e12954 Tweak commit 91745, which changed target data for both Mingw and Cygwin,
to not touch Cygwin: the change caused llvm-gcc build failures due to
long double getting the wrong size.  Patch by Aaron Gray.

llvm-svn: 93234
2010-01-12 08:21:07 +00:00
John McCall ad907777e8 So I was sitting around, trying vainly to think of something to commit, and then
I said to myself, self, why don't you go add a couple of parameters to a method
and then fail to use them, and I thought that sounded like a pretty good idea,
so I did it.

llvm-svn: 93233
2010-01-12 07:18:19 +00:00
Douglas Gregor 6a80393385 Use horizontal-space markers in code-completion results rather than
embedding single space characters. <rdar://problem/7485503>

llvm-svn: 93231
2010-01-12 06:38:28 +00:00
Dan Gohman 9059833de6 Make several tests less fragile.
llvm-svn: 93230
2010-01-12 04:52:47 +00:00
Dan Gohman c119580307 Reapply the MOV64r0 patch, with a fix: MOV64r0 clobbers EFLAGS.
llvm-svn: 93229
2010-01-12 04:42:54 +00:00
Dan Gohman d49763d200 Update a partially obsolete comment.
llvm-svn: 93228
2010-01-12 04:32:35 +00:00
Dan Gohman f9d6d53823 Fix a typo in a comment.
llvm-svn: 93227
2010-01-12 04:30:26 +00:00
Mike Stump edd224743c Add covariance tester.
llvm-svn: 93226
2010-01-12 03:01:18 +00:00
Daniel Dunbar abd3686f49 Remove duplicate class name, MSVC doesn't like this.
llvm-svn: 93225
2010-01-12 02:34:07 +00:00
John McCall 53262c96d9 Reorganize some of the code to note overload candidates. Improves the
fidelity with which we note them as functions/constructors and templates
thereof.  Also will be helpful when reporting bad conversions (next).

llvm-svn: 93224
2010-01-12 02:15:36 +00:00
Ted Kremenek 5631d2d1a1 Add a boilerplate implementation for clang_getUSR(). WIP.
llvm-svn: 93223
2010-01-12 02:07:58 +00:00
Chris Lattner af7855d571 tidy up
llvm-svn: 93222
2010-01-12 02:07:50 +00:00
Chris Lattner eb73bdb2e1 Teach jump threading to duplicate small blocks when the branch
condition is a xor with a phi node.  This eliminates nonsense
like this from 176.gcc in several places:

 LBB166_84:
        testl   %eax, %eax
-       setne   %al
-       xorb    %cl, %al
-       notb    %al
-       testb   $1, %al
-       je      LBB166_85
+       je      LBB166_69
+       jmp     LBB166_85

This is rdar://7391699

llvm-svn: 93221
2010-01-12 02:07:17 +00:00
Dale Johannesen 585f82b6f6 Add MO_Metadata as an operand kind. Not used yet.
llvm-svn: 93220
2010-01-12 02:01:53 +00:00
Fariborz Jahanian 5951609ac2 Fix rewriting of MacOS sjlj based eh.
Fixes radar 7522880.

llvm-svn: 93219
2010-01-12 01:22:23 +00:00
Douglas Gregor 3c96a46fc3 Name lookup should know better than to look into a class before it's defined
llvm-svn: 93217
2010-01-12 01:17:50 +00:00
John McCall c54cf7373f Chris thinks these diagnostics are better now. :)
llvm-svn: 93216
2010-01-12 01:09:12 +00:00
John McCall ad2587a394 Sort overload results by viability.
llvm-svn: 93215
2010-01-12 00:48:53 +00:00
John McCall 0d1da2298a Introduce a specific representation for the ambiguous implicit conversion
sequence.  Lots of small relevant changes.  Fixes some serious problems with
ambiguous conversions;  also possibly improves associated diagnostics.

llvm-svn: 93214
2010-01-12 00:44:57 +00:00
Ted Kremenek 87be3617e3 Change clang_getUSR() to return a CXString instead of a 'const char *'.
llvm-svn: 93213
2010-01-12 00:38:53 +00:00
Ted Kremenek 46157971e9 Make createCXString() a static member function of class CIndex.
llvm-svn: 93212
2010-01-12 00:36:38 +00:00
Mike Stump ee6dfe55a5 Allow N_FIELDS to be 0.
llvm-svn: 93211
2010-01-12 00:28:59 +00:00
Evan Cheng 4216615f99 Add TargetInstrInfo::isCoalescableInstr. It returns true if the specified
instruction is copy like where the source and destination registers can
overlap. This is to be used by the coalescable to coalesce the source and
destination registers of instructions like X86::MOVSX64rr32. Apparently
some crazy people believe the coalescer is too simple.

llvm-svn: 93210
2010-01-12 00:09:37 +00:00
Ted Kremenek e5f86be138 CIndex:
- Remove unused (and unimplemented) clang_getDeclarationName().
- Remove unused (and unimplemented) clang_getEntity().
- Add clang_getEntityFromDecl(): maps from a CXDecl to a CXEntity)
- Add clang_getDeclaration(): maps from a (CXEntity, CXTranslationUnit) to a CXDecl).

llvm-svn: 93209
2010-01-11 23:56:39 +00:00
Chris Lattner 6a19ed0b86 some cleanup, and make it obvious that ProcessJumpOnPHI only works
on branches by renaming it and checking for a branch at the call site.

llvm-svn: 93208
2010-01-11 23:41:09 +00:00
Douglas Gregor 411e5acce1 Eliminate an embarrassing performance regression in C/ObjC, where we
were performing name lookup for template names in C/ObjC and always
finding nothing. Turn off such lookup unless we're in C++ mode, along
with the check that determines whether the given identifier is a
"current class name", and assert that we don't make this mistake
again.

llvm-svn: 93207
2010-01-11 23:29:10 +00:00
Chris Lattner 2d2c0a00ad disable this testcase, PR5997
llvm-svn: 93206
2010-01-11 23:18:33 +00:00
David Chisnall a354f12be2 Reverted r93198; done without reading relevant PR.
llvm-svn: 93205
2010-01-11 23:08:08 +00:00
Evan Cheng 42b07e9600 Add manual ISD::OR fastisel selection routines. TableGen is no longer autogen them after 93152 and 93191.
llvm-svn: 93204
2010-01-11 22:59:27 +00:00
Victor Hernandez 0b62cc6dc4 Add documentation for llvm.dbg.value intrinsic
llvm-svn: 93203
2010-01-11 22:53:48 +00:00
Chris Lattner d1a3efedd8 reenable the piece that turns trunc(zext(x)) -> x even if zext has multiple uses,
codegen has no apparent problem with the trunc version of this, because it turns
into a simple subreg idiom

llvm-svn: 93202
2010-01-11 22:49:40 +00:00
Fariborz Jahanian 1c2cb6df9e Fix rewriting for forward class declaration.
(fixes radar 6969189).

llvm-svn: 93201
2010-01-11 22:48:40 +00:00
Chris Lattner a6b1356cf9 Disable folding sext(trunc(x)) -> x (and other similar cast/cast cases) when the
trunc has multiple uses.  Codegen is not able to coalesce the subreg case 
correctly and so this leads to higher register pressure and spilling (see PR5997).

This speeds up 256.bzip2 from 8.60 -> 8.04s on my machine, ~7%.

llvm-svn: 93200
2010-01-11 22:45:25 +00:00
Douglas Gregor 88f3eb898a When performing name lookup into a scope, check that its entity is
non-NULL before looking at the entity itself.

llvm-svn: 93199
2010-01-11 22:40:45 +00:00
David Chisnall 394bf0d0ba Allow VLAs in C++ if in GNU mode (GNU C++ permits them). Clang can now compile LanguageKit, although the resulting code crashes (although not in any of the functions that use VLAs).
llvm-svn: 93198
2010-01-11 22:33:19 +00:00
Victor Hernandez 9d75c966e0 Consolidate ConvertGlobalValIDToValue, ConvertGlobalOrMetadataValIDToValue, and ConvertValIDToValue into a more powerful ConvertValIDToValue() that does all three's work
llvm-svn: 93197
2010-01-11 22:31:58 +00:00
Douglas Gregor d615026e8d C++0x [dcl.typedef]p4, take 3, where we actually figure out what "that
is not also a typedef-name" actually means. For anyone keeping score,
that's John: 2, Doug: 0.

llvm-svn: 93196
2010-01-11 22:30:10 +00:00
Tobias Grosser b53e826103 Remove trailing white spaces in post dominators header file
llvm-svn: 93195
2010-01-11 22:22:46 +00:00
Tobias Grosser 829e8a75a1 Add getNode() to post dominators.
Implement the same interface as already available for dominators.

llvm-svn: 93194
2010-01-11 22:22:32 +00:00
Douglas Gregor 323ade5ac8 Use isa<ElaboratedType> rather than getAs<ElaboratedType>, since the
latter may (eventually) perform multiple levels of desugaring (thus
breaking the newly-added tests) and the former is faster. Thanks, John!

llvm-svn: 93192
2010-01-11 22:04:54 +00:00
Evan Cheng 99789a7a76 Extend r93152 to work on OR r, r. If the source set bits are known not to overlap, then select as an ADD instead.
llvm-svn: 93191
2010-01-11 22:03:29 +00:00
Douglas Gregor 7419ce72ae Add test case from PR5763
llvm-svn: 93190
2010-01-11 21:58:49 +00:00
Chris Lattner f0d26d4b74 reduce this to a sensible testcase.
llvm-svn: 93189
2010-01-11 21:58:19 +00:00
Douglas Gregor 9dd13ab202 Allow redefinitions of typedef-names within class scope when the type
they redefine is a class-name but not a typedef-name, per C++0x
[dcl.typedef]p4. The code in the test was valid C++98 and is valid
C++0x, but an unintended consequence of DR56 made it ill-formed in
C++03 (which we were luck enough to implement). Fixes PR5455.

llvm-svn: 93188
2010-01-11 21:54:40 +00:00
David Greene eb103c404b Shorten up this testcase.
llvm-svn: 93187
2010-01-11 21:50:35 +00:00
Fariborz Jahanian 2990c029ad Fix a problem related to rewrite of anonymous unions.
(fixes radar 6948022)

llvm-svn: 93186
2010-01-11 21:17:32 +00:00
Evan Cheng 7bdf339602 Revert 93158. It's breaking quite a few x86_64 tests.
llvm-svn: 93185
2010-01-11 21:13:41 +00:00
Jakob Stoklund Olesen d2a1bee2d4 Avoid adding PHI arguments for a predecessor that has gone away when a BRCOND was constant folded.
This fixes PR5980.

llvm-svn: 93184
2010-01-11 21:02:33 +00:00