Commit Graph

112201 Commits

Author SHA1 Message Date
Richard Smith 3ab15558d7 PR10867: Work around a bug in lit. Multiple RUN: lines are joined with &&, so:
RUN: foo
  RUN: bar || true

is equivalent to:

  RUN: foo && bar || true

which is equivalent to:

  RUN: (foo && bar) || true

This resulted in several of the fixit tests not really testing anything.

llvm-svn: 139132
2011-09-06 03:01:15 +00:00
Johnny Chen 8ed0ef9bae Change the signature of WatchpointLocation ctor so that the second param becomes
'size_t size', instead of 'lldb::tid_t tid'.  Pass size to the StoppointLocation
ctor as well.

llvm-svn: 139131
2011-09-06 02:52:28 +00:00
Nick Lewycky b1438c763a Revert r139126 due to selfhost failures reported by buildbots.
llvm-svn: 139130
2011-09-06 02:43:13 +00:00
Peter Collingbourne 2e8201422d Add missing dependency
Spotted by Ninja.

llvm-svn: 139129
2011-09-06 02:08:40 +00:00
Peter Collingbourne 15a26dacbc Fix typo
llvm-svn: 139128
2011-09-06 02:08:36 +00:00
Peter Collingbourne fa9771ffec Add the resource directory to the search path for Driver::GetFilePath,
as well as the search path printed by -print-search-dirs.

The main purpose of this change is to cause -print-file-name=include
to print the path to the include directory under Clang's resource
directory, instead of the system compiler's include directory, whose
header files Clang may not be able to parse.  Some build scripts will
do something like:
  $(CC) -nostdinc -I`$(CC) -print-file-name=include`
to exclude all header paths except the compiler's.

llvm-svn: 139127
2011-09-06 02:08:31 +00:00
Nick Lewycky c4c43fbb07 Teach SCEV to report a max backedge count in one interesting case in
HowFarToZero; the case for a canonical loop.

llvm-svn: 139126
2011-09-05 23:25:16 +00:00
Nick Lewycky 73df7e3830 Add a new MC bit for NaCl (Native Client) mode. NaCl requires that certain
instructions are more aligned than the CPU requires, and adds some additional
directives, to follow in future patches. Patch by David Meyer!

llvm-svn: 139125
2011-09-05 21:51:43 +00:00
Nick Lewycky df06b6e069 Update the C++ backend to use the new ArrayRef'ified APIs. Patch by arrowdodger!
llvm-svn: 139124
2011-09-05 18:50:59 +00:00
Nick Lewycky f1a5f57d2f Fix typo in comment.
llvm-svn: 139122
2011-09-05 18:35:03 +00:00
Benjamin Kramer 4b79c21ef2 InstSimplify: Don't try to replace an extractvalue/insertvalue pair with the original value if types don't match.
Fixes clang selfhost.

llvm-svn: 139120
2011-09-05 18:16:19 +00:00
Duncan Sands 29192d042e Delete trivial landing pads that just continue unwinding the caught
exception.

llvm-svn: 139117
2011-09-05 12:57:57 +00:00
Benjamin Kramer 17ff23c708 Speed up BCPL comment lexing by looking aggressively for newlines and then scannig backwards to see if the newline is escaped.
3% speedup in preprocessing all of clang with -Eonly. Also includes a small testcase for coverage.

llvm-svn: 139116
2011-09-05 07:19:39 +00:00
Benjamin Kramer dbfb18a0a9 Use the Lexer's definition of whitespace here.
llvm-svn: 139115
2011-09-05 07:19:35 +00:00
Benjamin Kramer e007e80fc0 Stop cluttering the test directory with temporary files.
llvm-svn: 139114
2011-09-05 07:19:32 +00:00
Duncan Sands fd26a954a8 Add some simple insertvalue simplifications, for the purpose of cleaning
up do-nothing exception handling code produced by dragonegg.

llvm-svn: 139113
2011-09-05 06:52:48 +00:00
Chandler Carruth 58b3749d6c Enable -Wdangling-fields by default in Clang. I've run this warning over
a very large chunk of code and found zero false positives. I've only
found a few bugs, but that likely is because bugs of this nature
actually do manifest. We've also identified several bugs that were
caught by Valgrind, but would have been caught faster and more easily
with this warning.

If anyone has concerns, or this causes fallout on any build bots, lemme
know. I'm happy to just put it under -Wmost.

llvm-svn: 139112
2011-09-05 05:47:35 +00:00
Richard Smith a528507418 Implement the suggested resolution of WG21 N3307 issue 19: When determining whether a class is an aggregate in C++0x, treat all functions which are neither deleted nor defaulted as user-provided, not just special member functions. The wording of the standard only defines the term "user-provided" for special member functions, but the intent seems to be that any function can be user-provided.
llvm-svn: 139111
2011-09-05 02:13:09 +00:00
Benjamin Kramer 0ca1ad0783 Use canonical forms for the branch probability zero heutistic.
- Drop support for X >u 0, it's equivalent to X != 0 and should be canonicalized into the latter.
- Add X < 1 -> unlikely, which is what instcombine canonicalizes X <= 0 into.
- Add X > -1 -> likely, which is what instcombine canonicalizes X >= 0 into.

llvm-svn: 139110
2011-09-04 23:53:04 +00:00
Richard Smith 3f9211d322 PR10506: Extend test for temporary cleanups in range-based for loop to cover the dependent case.
llvm-svn: 139109
2011-09-04 23:52:03 +00:00
Chandler Carruth 908abc3439 As a (rather delayed) followup to r136738 which stopped building the
edis shared library in the Makefile build, also stop building it in the
CMake build.

Patch by arrowdodger!

llvm-svn: 139108
2011-09-04 23:32:05 +00:00
Chandler Carruth ada9aa2b98 Complete the removal of FindBison from CMake. Noticed this when browsing
some CMake patch backlog...

llvm-svn: 139107
2011-09-04 23:29:12 +00:00
Chandler Carruth ceb4e6408a Update the CMake documentation to the correct variables.
Patch by arrowdodger!

llvm-svn: 139106
2011-09-04 23:24:13 +00:00
Francois Pichet 4391c7529a Pass 0 instead of a empty TemplateArgumentListInfo when creating a CXXDependentScopeMemberExpr to handle a "this->" fixit (lookup into dependent bases of class template)
Otherwise the fixit doesn't really work for subsequent lookup.

llvm-svn: 139105
2011-09-04 23:00:48 +00:00
Benjamin Kramer 60053cf547 Use const_cast to avoid warnings.
llvm-svn: 139104
2011-09-04 20:26:28 +00:00
Richard Smith 5065864151 PR10458: Last part of providing 'auto' type specifier as an extension in C++98: permit it within type-ids.
llvm-svn: 139103
2011-09-04 20:24:20 +00:00
Richard Smith 58c7433709 PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ExtWarn, and produce a -Wc++0x-compat warning in C++98 mode when auto is used as a storage class.
llvm-svn: 139102
2011-09-04 19:54:14 +00:00
Sebastian Redl e9c4e84f8e Add test case for defaulted copy and move structure validation.
Fix bug this uncovered.
Address minor comments from Doug.
Enable cxx_implicit_moves feature.

llvm-svn: 139101
2011-09-04 18:14:28 +00:00
Tobias Grosser c92151516f CodeGen: Support for Cast Operations in vector code generation
llvm-svn: 139097
2011-09-04 11:45:52 +00:00
Tobias Grosser 8b00a51164 CodeGen: Remove unused code
llvm-svn: 139096
2011-09-04 11:45:45 +00:00
Tobias Grosser 7551c3000a CodeGen: Better separate scalar and vector code generation.
llvm-svn: 139095
2011-09-04 11:45:41 +00:00
Tobias Grosser b06e71b95c CodeGeneration: Simplify code, fix style.
llvm-svn: 139094
2011-09-04 11:45:34 +00:00
Tobias Grosser 09c571008b CodeGen: Split large function in smaller ones.
llvm-svn: 139093
2011-09-04 11:45:29 +00:00
Tobias Grosser 8ae9aca5cc CodeGen: Improve naming of copied basic blocks
It may happen that we generate the code of a basic block from the original
scop is code generated several times. The new naming scheme reduces confusing
that earlier appeared as the version numbers of the new basic blocks could
have been interpreted as part of the name of the original basic block.

llvm-svn: 139092
2011-09-04 11:45:22 +00:00
Bill Wendling 321fb37773 Use Duncan's patch to delete the instructions in reverse order (minus the landingpad and terminator).
llvm-svn: 139090
2011-09-04 09:43:36 +00:00
Bill Wendling acaad83cd0 The insertion point for the loads is right before the llvm.eh.exception
call. The call may be in the same BB as the landingpad instruction. If that's
the case, then inserting the loads after the landingpad inst, but before the
extractvalues, causes undefined behavior.

llvm-svn: 139088
2011-09-04 09:02:18 +00:00
Argyrios Kyrtzidis b914e3bc5c Handle a code-completion token being passed to the macro stringify operator.
Fixes http://llvm.org/PR10826.

llvm-svn: 139087
2011-09-04 03:32:19 +00:00
Argyrios Kyrtzidis 5cec2aea3f Support code-completion for C++ inline methods and ObjC buffering methods.
Previously we would cut off the source file buffer at the code-completion
point; this impeded code-completion inside C++ inline methods and,
recently, with buffering ObjC methods.

Have the code-completion inserted into the source buffer so that it can
be buffered along with a method body. When we actually hit the code-completion
point the cut-off lexing or parsing.

Fixes rdar://10056932&8319466

llvm-svn: 139086
2011-09-04 03:32:15 +00:00
Argyrios Kyrtzidis a3deaeeb52 Fix Lexer::ComputePreamble when MaxLines parameter is non-zero.
The function was only counting lines that included tokens and not empty lines,
but MaxLines (mainly initiated to the line where the code-completion point resides)
is a count of overall lines (even empty ones).

llvm-svn: 139085
2011-09-04 03:32:04 +00:00
Benjamin Kramer 09ade9bb8b valgrind: Suppress glibc's optiized strcasecmp harder.
llvm-svn: 139084
2011-09-03 17:59:31 +00:00
Benjamin Kramer a66aaa93ee More unused variable removal.
llvm-svn: 139080
2011-09-03 08:46:20 +00:00
Benjamin Kramer 7859d2e148 Use internal storage for command line option.
llvm-svn: 139079
2011-09-03 03:45:06 +00:00
Benjamin Kramer 2667afa980 Make helpers static, remove unused variables.
llvm-svn: 139078
2011-09-03 03:30:59 +00:00
Chandler Carruth d551d4e1da Teach -Wdangling-field to warn about temporaries bound to references as
well.

Also, clean up the flow of the code a bit, and factor things more
nicely.

Finally, add the test case that was missing from my previous
commit (sorry), with new tests added to cover temporaries and other fun
cases.

llvm-svn: 139077
2011-09-03 02:21:57 +00:00
Bill Wendling 7c1d6358a2 Don't reload the values that are already there. The llvm.eh.resume uses the same
values that the resume instruction uses.
PR10850

llvm-svn: 139076
2011-09-03 01:38:17 +00:00
Chandler Carruth 599deef379 Add a simple new warning to catch blatantly dangling pointer and
reference members of classes. We've had several bugs reported because of
this, and there's no reason not to flag it right away in the compiler.

Comments especially welcome on the strategy for implementing this
warning (IE, what should trigger this?) and on the text of the warning
itself.

I'm going to extend this to cover obvious cases with temporaries and
beef up the test cases some in subsequent patches. I'll then run it over
a large codebase and make sure its not misbehaving before I add it to
-Wall or turn it on by default. I think this one might be a good
candidate for on by default.

llvm-svn: 139075
2011-09-03 01:14:15 +00:00
Andrew Trick 2f5420b225 Exclude more arm jit failures pending PR10783.
llvm-svn: 139074
2011-09-03 01:08:35 +00:00
Bruno Cardoso Lopes 07d9914620 Add AVX versions to match AESENC/AESDEC intrinsics. This hopefully ends
the cycle of missing AVX counterparts of already present SSE* patterns

llvm-svn: 139073
2011-09-03 00:47:08 +00:00
Bruno Cardoso Lopes 1d5c2d9227 Add AVX version of a SSE4.1 VPBLENDVB pattern
llvm-svn: 139072
2011-09-03 00:47:05 +00:00
Bruno Cardoso Lopes 212a8c4357 Add AVX versions of SSE4.1 EXTRACTPS patterns
llvm-svn: 139071
2011-09-03 00:47:03 +00:00