Commit Graph

84304 Commits

Author SHA1 Message Date
Daniel Dunbar 346782c12c tblgen/AsmMatcher: Change AsmOperandClass to allow a list of superclasses instead of just one.
llvm-svn: 104452
2010-05-22 21:02:29 +00:00
Anders Carlsson 5b94443b16 Really fix PR7139. There was one boost test that we still failed, and my first fix broke self-host.
llvm-svn: 104447
2010-05-22 17:45:10 +00:00
Anders Carlsson c0964b60e5 Re-land the fix for PR7139.
llvm-svn: 104446
2010-05-22 17:35:42 +00:00
Douglas Gregor 024d80e571 Don't look for a destructor in a dependent type. Fixes PR7198.
llvm-svn: 104445
2010-05-22 17:12:29 +00:00
Douglas Gregor 0c6f539564 When determining whether we can use "this", make sure to look through
enum contexts (along with block contexts, which we already did). Fixes
PR7196.

llvm-svn: 104444
2010-05-22 16:25:05 +00:00
Douglas Gregor 959d5a0cbd Implement support for variable length arrays in C++. VLAs are limited
in several important ways:

  - VLAs of non-POD types are not permitted.
  - VLAs cannot be used in conjunction with C++ templates.

These restrictions are intended to keep VLAs out of the parts of the
C++ type system where they cause the most trouble. Fixes PR5678 and
<rdar://problem/8013618>.

llvm-svn: 104443
2010-05-22 16:17:30 +00:00
Chris Lattner 33eee34230 minor updates
llvm-svn: 104436
2010-05-22 07:02:06 +00:00
Daniel Dunbar d459e29a0a MC/X86: Add alias for setz, setnz, jz, jnz.
llvm-svn: 104435
2010-05-22 06:37:33 +00:00
Douglas Gregor aae38d6610 Improve our handling of reference binding for subobjects of
temporaries. There are actually several interrelated fixes here:

  - When converting an object to a base class, it's only an lvalue
  cast when the original object was an lvalue and we aren't casting
  pointer-to-derived to pointer-to-base. Previously, we were
  misclassifying derived-to-base casts of class rvalues as lvalues,
  causing various oddities (including problems with reference binding
  not extending the lifetimes of some temporaries).

  - Teach the code for emitting a reference binding how to look
  through no-op casts and parentheses directly, since
  Expr::IgnoreParenNoOpCasts is just plain wrong for this. Also, make
  sure that we properly look through multiple levels of indirection
  from the temporary object, but destroy the actual temporary object;
  this fixes the reference-binding issue mentioned above.

  - Teach Objective-C message sends to bind the result as a temporary
    when needed. This is actually John's change, but it triggered the
    reference-binding problem above, so it's included here. Now John
    can actually test his return-slot improvements.

llvm-svn: 104434
2010-05-22 05:17:18 +00:00
John Mosby 987a1576d2 Trivial change to dump() function for SparseBitVector
llvm-svn: 104433
2010-05-22 05:13:17 +00:00
Daniel Dunbar bd3b1d40da Attempt to make MSVC happy.
llvm-svn: 104432
2010-05-22 05:05:12 +00:00
Chandler Carruth e039148801 Daniel re-educated me about what Alias does and does not do. Turn that off for
'-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn
off the driver in the lexer test for this madness and add a test to the driver
that the translation actually works.

llvm-svn: 104428
2010-05-22 02:21:53 +00:00
John McCall 78a151138a Push a return-value slot throughout ObjC message-send codegen. Will be
critical for ObjC++ correctness;  hard to test independently of various
required Sema changes, though.

llvm-svn: 104422
2010-05-22 01:48:05 +00:00
Evan Cheng 168ced94d8 Implement @llvm.returnaddress. rdar://8015977.
llvm-svn: 104421
2010-05-22 01:47:14 +00:00
Jim Grosbach bd9485db63 Implement eh.sjlj.longjmp for ARM. Clean up the intrinsic a bit.
Followups: docs patch for the builtin and eh.sjlj.setjmp cleanup to match
longjmp.

llvm-svn: 104419
2010-05-22 01:06:18 +00:00
Eric Christopher 64087cd346 This test is darwin only. Make it so(tm).
llvm-svn: 104418
2010-05-22 00:55:55 +00:00
Daniel Dunbar 07494795e5 Driver: When printing a "command was signalled" type of diagnostic, use the
short name of the tool in use, instead of the name of the action that created
the command. The practical impact is we now get:
  clang: error: clang frontend command failed due to signal 6 (use -v to see invocation)
instead of:
  clang: error: assembler command failed due to signal 6 (use -v to see invocation)
when clang crashes on a job that uses the integrated assembler.

llvm-svn: 104417
2010-05-22 00:37:20 +00:00
Daniel Dunbar 1cb532ca28 Driver: Add Tool::ShortName, intended to be a human readable name for the tool.
llvm-svn: 104416
2010-05-22 00:37:18 +00:00
Bob Wilson 91fdf68516 Recognize more BUILD_VECTORs and VECTOR_SHUFFLEs that can be implemented by
copying VFP subregs.  This exposed a bunch of dead code in the *spill-q.ll
tests, so I tweaked those tests to keep that code from being optimized away.
Radar 7872877.

llvm-svn: 104415
2010-05-22 00:23:12 +00:00
Eric Christopher 6fdea1bda8 Add full bss data support for darwin tls variables.
llvm-svn: 104414
2010-05-22 00:10:22 +00:00
Ted Kremenek ea465e1847 Make crashreport data in libclang a compile-time option.
llvm-svn: 104413
2010-05-22 00:06:46 +00:00
Devang Patel 4a8e6e83dc Collect variable information during endFunction() instead of beginFunction().
llvm-svn: 104412
2010-05-22 00:04:14 +00:00
Eric Christopher 75ed30b593 Add a new section and accessor for TLS data.
llvm-svn: 104411
2010-05-22 00:00:58 +00:00
Bob Wilson 61438fe064 Clean up extra whitespace.
llvm-svn: 104410
2010-05-21 23:53:55 +00:00
Douglas Gregor 20c38a7c58 Improve recovery when we see a dependent template name that is missing
the required "template" keyword, using the same heuristics we do for
dependent template names in member access expressions, e.g.,

test/SemaTemplate/dependent-template-recover.cpp:11:8: error: use 'template'
      keyword to treat 'getAs' as a dependent template name
    T::getAs<U>();
       ^
       template 

Fixes PR5404.

llvm-svn: 104409
2010-05-21 23:43:39 +00:00
Eric Christopher 53ff992dde Make this LookAheadLimit, not the uninitialized LookAheadLeft.
Evan please verify!

llvm-svn: 104408
2010-05-21 23:40:03 +00:00
Fariborz Jahanian 5981b04718 Clang missing warning about conflicting declaration vs. definition
for variable arguments list methods. (radar 8006060).

llvm-svn: 104407
2010-05-21 23:28:58 +00:00
Douglas Gregor 786123dc48 Improve parser recovery when we encounter a dependent template name
that is missing the 'template' keyword, e.g., 

  t->getAs<T>()

where getAs is a member of an unknown specialization. C++ requires
that we treat "getAs" as a value, but that would fail to parse since T
is the name of a type. We would then fail at the '>', since a type
cannot be followed by a '>'.

This is a very common error for C++ programmers to make, especially
since GCC occasionally allows it when it shouldn't (as does Visual
C++). So, when we are in this case, we use tentative parsing to see if
the tokens starting at "<" can only be parsed as a template argument
list. If so, we produce a diagnostic with a fix-it that states that
the 'template' keyword is needed:

test/SemaTemplate/dependent-template-recover.cpp:5:8: error: 'template' keyword
      is required to treat 'getAs' as a dependent template name
    t->getAs<T>();
       ^
       template 

This is just a start of this patch; I'd like to apply the same
approach to everywhere that a template-id with dependent template name
can be parsed.

llvm-svn: 104406
2010-05-21 23:18:07 +00:00
Chris Lattner 4dc833c607 add a note
llvm-svn: 104404
2010-05-21 23:16:21 +00:00
Nick Lewycky 271f8a69c3 Outdent this file by 2 spaces per the coding standards, and also clean up
whitespace at the end of lines since I'm already touching the whole file
anyways.

llvm-svn: 104403
2010-05-21 23:14:51 +00:00
Eric Christopher 09d47031b1 Expand on comment.
llvm-svn: 104396
2010-05-21 23:03:53 +00:00
Kevin Enderby 7e7482c80f Added retl for 32-bit x86 and added retq for 64-bit x86.
llvm-svn: 104394
2010-05-21 23:01:38 +00:00
Eric Christopher 0624d5226c Fix comment and whitespace.
llvm-svn: 104392
2010-05-21 22:39:11 +00:00
Chris Lattner 37c529ae68 expand on the llvm ir bitcode dox. Patch by Peter Housel!
llvm-svn: 104391
2010-05-21 22:20:54 +00:00
Anders Carlsson c866eb5ba9 Unbreak self-host.
llvm-svn: 104390
2010-05-21 22:17:48 +00:00
Ted Kremenek a2448b85be Update retain-release checker to understand changes to how 'super' is represented
in the ASTs.  Fixes <rdar://problem/8015556>.

llvm-svn: 104389
2010-05-21 21:57:00 +00:00
Ted Kremenek 5f03be9704 Pass around an error SourceRange instead of an Expr* when reporting errors
in the Objective-C memory checker.

llvm-svn: 104388
2010-05-21 21:56:53 +00:00
Anders Carlsson da1641cd12 Rename CodeGenFunction::EmitMemSetToZero to EmitNullInitialization. Handle setting null data member pointers correctly. Fixes PR7139.
llvm-svn: 104387
2010-05-21 21:45:41 +00:00
Douglas Gregor 9f44d1453b When instantiating a function declaration within a function template,
be sure to merge its parameter scope with its parent's scope. Fixes
PR7184.

llvm-svn: 104386
2010-05-21 21:25:08 +00:00
Evan Cheng 2c8bdead9e Allow machine cse to cse instructions which define physical registers. Controlled by option -machine-cse-phys-defs.
llvm-svn: 104385
2010-05-21 21:22:19 +00:00
Chris Lattner b9ea2c29a1 down with export.
llvm-svn: 104383
2010-05-21 21:16:21 +00:00
Abramo Bagnara f7eba5091c Improved TypeLoc::getSourceRange().
llvm-svn: 104382
2010-05-21 21:12:12 +00:00
Eric Christopher 3dca28d0e2 Fix section attribute name.
llvm-svn: 104381
2010-05-21 21:08:52 +00:00
Bob Wilson 51d9ee3ff6 Change CodeGen/ARM/2009-11-02-NegativeLane.ll to use 16-bit vector elements
so that it will continue to test what it was meant to test when I commit a
separate change for better support of BUILD_VECTOR and VECTOR_SHUFFLE for Neon.
Fix a DAG combiner crash exposed by this test change.

llvm-svn: 104380
2010-05-21 21:05:32 +00:00
Chris Lattner da9e3287f9 another unneeded line.
llvm-svn: 104379
2010-05-21 21:02:17 +00:00
Chris Lattner 6fe3748de4 major update to the C++ status page. C++ support is
now done and no more patches to it will be accepted.

llvm-svn: 104378
2010-05-21 20:59:40 +00:00
Evan Cheng 3858451e09 - Change MachineInstr::findRegisterDefOperandIdx so it can also look for defs
that are aliases of the specified register.
- Rename modifiesRegister to definesRegister since it's looking a def of the
specific register or one of its super-registers. It's not looking for def of a
sub-register or alias that could change the specified register.
- Added modifiesRegister to look for defs of aliases.

llvm-svn: 104377
2010-05-21 20:53:24 +00:00
John McCall b54367d2f8 Propagate access specifiers to anonymous union members nested within classes.
Fixes <rdar://problem/7987650>.

llvm-svn: 104376
2010-05-21 20:45:30 +00:00
Ted Kremenek 304a9537e1 Fix crash in CFG construction for 'break' statements appearing in statement expressions
within the increment code of a for loop.

llvm-svn: 104375
2010-05-21 20:30:15 +00:00
Douglas Gregor 27ac429624 Use CanQualType to enforce the use of a canonical type argument to
CXXBasePaths::isAmbiguous(), rather than just asserting that we have a
canonical type. Fixes PR7176.

llvm-svn: 104374
2010-05-21 20:29:55 +00:00