Commit Graph

157041 Commits

Author SHA1 Message Date
Manuel Klimek 516e054c05 Implement parsing of blocks (^{ ... }) in the unwrapped line parser.
This patch makes sure we produce the right number of unwrapped lines,
a follow-up patch will make the whitespace formatting consistent.

Before:
 void f() {
   int i = {[operation setCompletionBlock : ^{ [self onOperationDone];
 }]
 }
 ;
 }

After:
 void f() {
   int i = {[operation setCompletionBlock : ^{
     [self onOperationDone];
   }] };
 }

llvm-svn: 189932
2013-09-04 13:25:30 +00:00
Tim Northover dc647a2603 InstCombine: allow unmasked icmps to be combined with logical ops
"(icmp op i8 A, B)" is equivalent to "(icmp op i8 (A & 0xff), B)" as a
degenerate case. Allowing this as a "masked" comparison when analysing "(icmp)
&/| (icmp)" allows us to combine them in more cases.

rdar://problem/7625728

llvm-svn: 189931
2013-09-04 11:57:17 +00:00
Tim Northover c0756c454c InstCombine: look for masked compares with subset relation
Even in cases which aren't universally optimisable like "(A & B) != 0 && (A &
C) != 0", the masks can make one of the comparisons completely redundant. In
this case, since we've gone to the effort of spotting masked comparisons we
should combine them.

rdar://problem/7625728

llvm-svn: 189930
2013-09-04 11:57:13 +00:00
Kostya Serebryany 1f13414d45 [asan] make use-after-return handle very deep recursion; fixes 483.xalancbmk in UAR mode
llvm-svn: 189929
2013-09-04 10:59:32 +00:00
Manuel Klimek a1a43abe38 More lambda formatting tests; update test comments.
llvm-svn: 189928
2013-09-04 10:06:46 +00:00
NAKAMURA Takumi ee9fba2042 clang/test/Driver/working-directory.c: Exclude msys bash rather than tweaking expressions.
llvm-svn: 189927
2013-09-04 09:37:12 +00:00
Hao Liu b1852eed38 Inplement aarch64 neon instructions in AdvSIMD(shift). About 24 shift instructions:
sshr,ushr,ssra,usra,srshr,urshr,srsra,ursra,sri,shl,sli,sqshlu,sqshl,uqshl,shrn,sqrshr$
 and 4 convert instructions:
      scvtf,ucvtf,fcvtzs,fcvtzu

llvm-svn: 189926
2013-09-04 09:29:13 +00:00
Hao Liu d4aede098f Inplement aarch64 neon instructions in AdvSIMD(shift). About 24 shift instructions:
sshr,ushr,ssra,usra,srshr,urshr,srsra,ursra,sri,shl,sli,sqshlu,sqshl,uqshl,shrn,sqrshrun,sqshrn,uqshr,sqrshrn,uqrshrn,sshll,ushll
 and 4 convert instructions:
      scvtf,ucvtf,fcvtzs,fcvtzu

llvm-svn: 189925
2013-09-04 09:28:24 +00:00
Manuel Klimek bab25fdfa5 Fix layout of lambda captures.
Before:
 int c = [ &, &a, a]{
   [ =, c, &d]{
     return b++;
   }();
 }();

After:
 int c = [&, &a, a] {
   [=, c, &d] {
     return b++;
   }();
 }();

llvm-svn: 189924
2013-09-04 08:20:47 +00:00
Alexey Samsonov 5b2000e4d9 Disable FindPathToBinary test on Android
llvm-svn: 189923
2013-09-04 06:40:48 +00:00
Eric Christopher 8c37b8d0b4 Attempt to silence some defined but not used warnings.
llvm-svn: 189922
2013-09-04 06:06:06 +00:00
Eric Christopher 913152fc64 Use Intrinsic::ID for the pattern match templates, fixing a signed/unsigned
comparison warning.

llvm-svn: 189921
2013-09-04 05:08:32 +00:00
Eric Christopher 8b6f708cda Only fail this on darwin since most other platforms should have a newer
gdb.

llvm-svn: 189920
2013-09-04 05:06:10 +00:00
Rafael Espindola b69b7fedbf Disable llvm optimizations, but keep -O1 to test available_externally.
llvm-svn: 189919
2013-09-04 04:59:11 +00:00
Rafael Espindola d120b89a77 Disable llvm optimizations, but keep -O1 to test available_externally.
llvm-svn: 189918
2013-09-04 04:55:03 +00:00
Rafael Espindola 01caeb80cd Use %clang_cc1.
llvm-svn: 189917
2013-09-04 04:51:39 +00:00
Serge Pavlov 8260530cb2 Clear LookupResult object if invalid candidate is found.
If source code is invalid, error recovery can lead to name lookup in a set containing invalid declaration. The lookup is stopped once found such declaration, but LookupResult object could remain in inconsistent state. Its destructor triggered a check, which caused assert violation.
This patch fixes PR16964 and PR12791.

llvm-svn: 189916
2013-09-04 04:50:29 +00:00
Michael Gottesman 9672fcf1e5 XFAILed the static-member.cpp test since we no longer support emitting debug info that support what Eric calls "the member hack".
llvm-svn: 189915
2013-09-04 04:44:05 +00:00
Michael Gottesman c89466fc22 Revert "Revert "Remove the darwin gdb option, that version of gdb is now dead and the rest of the compatibility should be done on a dwarf-N level.""
This reverts commit r189913.

Talked with Eric on IRC. I am going to XFAIL the failing test since it
is using what Eric described as "the member hack" which was needed on
that old GDB.

Sorry for the noise!

llvm-svn: 189914
2013-09-04 04:39:38 +00:00
Michael Gottesman a318370b8d Revert "Remove the darwin gdb option, that version of gdb is now dead and the rest of the compatibility should be done on a dwarf-N level."
This reverts commit r189903.

This commit broke the phase 1 buildbot for a while.

http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/6684

llvm-svn: 189913
2013-09-04 04:31:56 +00:00
Michael Gottesman c9f5859f81 Add llvm namespace to llvm::next.
llvm-svn: 189912
2013-09-04 04:26:09 +00:00
Michael Gottesman 114ac1a230 Use llvm::next() instead of incrementing begin iterators of std::vector.
Iterator of std::vector may be implemented as a raw pointer. In
this case begin iterators are rvalues and cannot be incremented.
For example, this is the case with STDCXX implementation of vector.

Patch by Konstantin Tokarev <annulen@yandex.ru>.

llvm-svn: 189911
2013-09-04 04:19:01 +00:00
Rafael Espindola ff7cea8c1a Don't pass -O0 to clang_cc1, it is the default.
llvm-svn: 189910
2013-09-04 04:12:25 +00:00
Reid Kleckner 1d1844a7c7 clang-cl: Use "clang cl.exe" when disambiguating the diagnostic prefix.
llvm-svn: 189909
2013-09-04 03:10:36 +00:00
James Dennett b52922b1c5 Documentation fix: remove advice to use cast/dyn_cast on TypeLocs, updating
it to refer to castAs/getAs.

The original change to remove the (broken) cast/dyn_cast support from TypeLoc
was in r175462.  (Thanks to David Blaikie for the reference.)

llvm-svn: 189908
2013-09-04 02:47:23 +00:00
Shankar Easwaran 8c705690ab [lld][ELF] Differentiate between Note sections(RW/RO)
It looks like there is a possibility of seeing RO/RW note sections
and we would need to create an appropriate RO/RW segment associated
with them.

Adds a test too.

llvm-svn: 189907
2013-09-04 02:42:02 +00:00
David Blaikie ab415a4b35 Revert "DebugInfo: Remove explicit declaration-emissiong handling now that we have a more principled approach (the 'requires complete type' callback)"
This reverts commit r189013.

This is causing a segfault crash in a test case I have. Reverting while
I investigate the issue.

llvm-svn: 189906
2013-09-04 02:12:12 +00:00
NAKAMURA Takumi 8270dcac33 MCDwarf.h: Prune a few stray \param(s). [-Wdocumentation]
\param should be used to describe individual parameters. Use a command like \a or \c for visual enhancements.

llvm-svn: 189905
2013-09-04 02:10:32 +00:00
NAKAMURA Takumi 3b6ef78954 Suppress test/modularize/NoProblemsDependencies.modularize on msvc, for now. Investigating.
llvm-svn: 189904
2013-09-04 02:03:03 +00:00
Eric Christopher 614dc83603 Remove the darwin gdb option, that version of gdb is now dead and
the rest of the compatibility should be done on a dwarf-N level.

llvm-svn: 189903
2013-09-04 02:02:10 +00:00
Eric Christopher 38f1c64098 Make the default dwarf version 3 for darwin when we can't find one
in the module. Add a FIXME with a comment about darwin's ld.

llvm-svn: 189902
2013-09-04 01:38:30 +00:00
Reid Kleckner dc74af1ab8 clang-cl: Avoid confusing diagnostics when clang-cl is called just cl.exe
llvm-svn: 189901
2013-09-04 01:37:22 +00:00
Marshall Clow 8bd0ac1135 Updated status for LSG issues 2122, 2169, 2177, 2140 and 2086.
llvm-svn: 189900
2013-09-04 01:06:59 +00:00
Eric Christopher a923e7b78d It's a very large constant. Say so.
llvm-svn: 189899
2013-09-04 00:58:10 +00:00
Reid Kleckner 2753324e82 Order initializers of static data members of explicit specializations
I tried to implement this properly in r189051, but I didn't have enough
test coverage.  Richard kindly provided more test cases than I could
possibly imagine and now we should have the correct condition.

llvm-svn: 189898
2013-09-04 00:54:24 +00:00
Rui Ueyama 959aebf873 [PECOFF] Ignore options starting with -?
The compiler is allowed to add a linker option starting with -?<name> to
.drectve section. If the linker can interpret -<name>, it's processed as if
there's no question mark there. If not, such option is silently ignored.

This is a COFF's feature to allow the compiler to emit new linker options
while keeping compatibility with older linkers.

llvm-svn: 189897
2013-09-04 00:51:51 +00:00
Shankar Easwaran b85f1857a1 [lld][ELF] Emit note sections
Emit note sections if the input contains a note section.

Also emit a note segment.

llvm-svn: 189896
2013-09-04 00:51:42 +00:00
Rui Ueyama 8ccf6da056 Rename *Options.td -> <flavor>Options.td.
Before this patch, name of driver implementation is not consistent with its
option table file. Specifically, LDOptions has a different prefix than
GnuLdDriver.

This patch renames option files, so that the option files have the same prefix
as the corresponding driver files.

Differential Revision: http://llvm-reviews.chandlerc.com/D1591

llvm-svn: 189895
2013-09-04 00:24:35 +00:00
Marshall Clow 3e2319e47a Update status of issues 2045, 2050, 2080, 2081, 2083, 2130, 2137 and 2177.
llvm-svn: 189894
2013-09-04 00:18:19 +00:00
Peter Collingbourne d0df6406fb Add a diagnostic group for the "ignoring (static|inline) keyword on
explicit template instantiation" warning.

llvm-svn: 189893
2013-09-04 00:10:25 +00:00
Fariborz Jahanian 89f6d100a4 ObjectiveC migrator: Cannot use bridging annotations for
ObjectiveC methods. Apply specific annotations for them
instead as determined by the static analyzer.

llvm-svn: 189892
2013-09-04 00:10:06 +00:00
Shankar Easwaran 2eaa47a008 [lld][Driver] remove return after llvm_unreachable
llvm-svn: 189891
2013-09-04 00:05:46 +00:00
Joerg Sonnenberger 37f50b7ccc Start a TODO list for the ELF backend.
llvm-svn: 189890
2013-09-04 00:00:48 +00:00
Ed Maste e544143f03 Clean up handling of FreeBSD thread list on Launch / Attach
Instead of directly manipulating the thread list in Launch and Attach,
just rely on RefreshStateAfterStop to populate the initial list.

Review: http://llvm-reviews.chandlerc.com/D1565
llvm-svn: 189889
2013-09-03 23:55:30 +00:00
Rafael Espindola cc7ee374e2 Fix the test on -Asserts build.
llvm-svn: 189888
2013-09-03 23:52:53 +00:00
Shankar Easwaran 3df170b84e [lld][Driver] The driver was creating linker inputs twice
Also add a llvm_unreachable call so that the linker will trip on unhandled
inputElement types.

llvm-svn: 189887
2013-09-03 23:52:05 +00:00
Rafael Espindola 5eb7df68bf Add r159136 back now that pr13124 has been fixed.
Original message:
If a constant or a function has linkonce_odr linkage and unnamed_addr, mark
hidden. Being linkonce_odr guarantees that it is available in every dso that
needs it. Being a constant/function with unnamed_addr guarantees that the
copies don't have to be merged.

llvm-svn: 189886
2013-09-03 23:34:36 +00:00
Daniel Dunbar dac381a323 [lit] Allow config files to pass arbitrary values to child configs.
- This aligns with how existing test suites end up wanting to use the local
   config files, conceptually it makes sense to consider them to be inherited.

llvm-svn: 189885
2013-09-03 23:32:55 +00:00
Rafael Espindola b8e430d695 Use -O0 in this test too.
llvm-svn: 189884
2013-09-03 23:31:28 +00:00
Joerg Sonnenberger 33a6d3aaed Recognize -rpath-link option and add arguments to ELFLinkingContext.
llvm-svn: 189883
2013-09-03 23:28:51 +00:00