Commit Graph

247275 Commits

Author SHA1 Message Date
Zachary Turner fe11483b57 Make Options::SetOptionValue take a StringRef.
llvm-svn: 286723
2016-11-12 16:56:47 +00:00
Zachary Turner c351fb1607 Disable sanitizer tests on Windows.
llvm-svn: 286722
2016-11-12 16:56:13 +00:00
Serge Pavlov 3852637005 Use descriptive message if list initializer is incorrectly parenthesized.
If initializer contains parentheses around braced list where it is not allowed,
as in construct int({0}), clang issued message like `functional-style cast
from 'void' to 'int' is not allowed`, which does not help much. Both gcc and
msvc issue message `list-initializer for non-class type must not be
parenthesized`, which is more descriptive. This change implements similar
message for clang.

Differential Revision: https://reviews.llvm.org/D25816

llvm-svn: 286721
2016-11-12 15:38:55 +00:00
Michal Gorny a583be4e52 [OCaml] Clear cross-target test deps when building out-of-tree
Clear cross-target test dependencies when using LLVM_OCAML_OUT_OF_TREE,
in order to make it possible to run check-llvm-bindings-ocaml without
rebuilding the whole LLVM.

Differential Revision: https://reviews.llvm.org/D26580

llvm-svn: 286720
2016-11-12 14:58:30 +00:00
Sylvestre Ledru 8b59bb4da7 As we released 3.9, from the 4.0 release notes, points to version 3.9 instead of 3.8
llvm-svn: 286719
2016-11-12 10:39:09 +00:00
Sylvestre Ledru 503d95dafa As we released 3.9, from the 4.0 release notes, points to version 3.9 instead of 3.8
llvm-svn: 286718
2016-11-12 10:38:18 +00:00
Sylvestre Ledru f6b489797e Add the new option -Og in the release notes. See r286602 for more information
llvm-svn: 286717
2016-11-12 10:37:17 +00:00
Sylvestre Ledru f017451807 Add support of the next Ubuntu (17.04 - Zesty Zapus)
llvm-svn: 286716
2016-11-12 09:26:30 +00:00
Daniel Jasper fd36f0b504 clang-format: Support ObjC selectors with unnamed parameters.
This fixes llvm.org/PR28063.

llvm-svn: 286715
2016-11-12 07:38:22 +00:00
Craig Topper 1a44193afd [AVX-512] Convert the rest of the masked shift by immediate and by single element builtins over to the newly added unmasked builtins and a select.
This should also fix PR30691 since the new builtins are handled like the legacy builtins in the backend.

llvm-svn: 286714
2016-11-12 07:16:59 +00:00
George Rimar bb6c01e7c3 [ELF] - Add support for locals list in version script.
Previously we did not support anything except "local: *", patch changes that.

Actually GNU rules of proccessing wildcards are more complex than that (http://www.airs.com/blog/archives/300):
There are 2 iteration for wildcards, at first iteration "*" wildcards are ignored and handled at second iteration.

Since we previously decided not to implement such complex rules,
I suggest solution that is implemented in this patch. So for "local: *" case nothing changes,
but if we have wildcarded locals,
they are processed before wildcarded globals. 

This should fix several FreeBSD ports, one of them is jpeg-turbo-1.5.1 and
currently blocks about 5k of ports.

Differential revision: https://reviews.llvm.org/D26395

llvm-svn: 286713
2016-11-12 07:04:15 +00:00
George Rimar 117c933304 [ELF] - Fixed comment. NFC.
llvm-svn: 286712
2016-11-12 06:27:42 +00:00
Craig Topper 9d25c5e2fa [AVX-512] Add unmasked version of shift by immediate and shift by single element in XMM.
Summary:
This is the first step towards being able to add the avx512 shift by immediate intrinsics to InstCombineCalls where we aleady support the sse2 and avx2 intrinsics. We need to the unmasked versions so we can avoid having to teach InstCombineCalls that it would need to insert selects sometimes. Instead we'll just add the selects around the new instrinsics in the frontend.

This change should also enable the shift by i32 intrinsics to take a non-constant shift value just like the avx2 and sse intrinsics. This will enable us to fix PR30691 once we update clang.

Next I'll switch clang to use the new builtins. Then we'll come back to the backend and remove/autoupgrade the old intrinsics. Then I'll work on the same series for variable shifts.

Reviewers: RKSimon, zvi, delena

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D26333

llvm-svn: 286711
2016-11-12 05:28:24 +00:00
Craig Topper b0f480c380 CODE_OWNERS: Take ownership of the X86 backend.
llvm-svn: 286710
2016-11-12 05:16:06 +00:00
Craig Topper 5cb13062d2 [AVX-512] Add support for lowering shuffles to VALIGND/VALIGNQ
Summary: VALIGND and VALIGNQ are similar to PALIGNR but instead of working on a 128-bit lane they work on the entire vector register. This change leverages the shuffle rotate detection code used for PALIGNR to detect these cases.

Reviewers: delena, RKSimon

Subscribers: Farhana, llvm-commits

Differential Revision: https://reviews.llvm.org/D26297

llvm-svn: 286709
2016-11-12 05:05:27 +00:00
Vitaly Buka c557191b21 [asan] Fix strncmp and strncasecmp interceptors
Summary:
In non-strict mode we will check memory access for both strings from beginning
to either:
  1. 0-char
  2. size
  3. different chars

In strict mode we will check from beginning to either:
  1. 0-char
  2. size

Previously in strict mode we always checked up to the 0-char.

Reviewers: kcc, eugenis

Subscribers: llvm-commits, kubabrecka

Differential Revision: https://reviews.llvm.org/D26574

llvm-svn: 286708
2016-11-12 04:32:31 +00:00
Saleem Abdulrasool c1f8e1f35c build: add a dependency on llvm-strings
Since we now have tests for llvm-strings, add a dependency on the tool.

llvm-svn: 286707
2016-11-12 03:45:21 +00:00
Saleem Abdulrasool 2729786fff llvm-strings: ensure that the last string is correctly printed
We would ignore the last string that appeared if the file ended with a printable
character.  Ensure that we get the last string.

llvm-svn: 286706
2016-11-12 03:39:21 +00:00
whitequark 4dcf92a27e [OCaml] Adapt to the new attribute C API.
llvm-svn: 286705
2016-11-12 03:38:30 +00:00
whitequark ce9bb1097d [C API] Fix several null pointer dereferences.
llvm-svn: 286704
2016-11-12 03:38:23 +00:00
Kostya Serebryany 047485ef69 [libFuzzer] one more trophy
llvm-svn: 286703
2016-11-12 02:55:45 +00:00
Kostya Serebryany 53c894d257 [libFuzzer] use a valid ASCII string for a dummy seed corpus
llvm-svn: 286702
2016-11-12 02:27:21 +00:00
Lang Hames 03418af046 [ORC] Add a WrappedHandlerReturn type to map handler return types onto error
return types.

This class allows user provided handlers to return either error-wrapped types
or plain types. In the latter case, the plain type is wrapped with a success
value of Error or Expected<T> type to fit it into the rest of the serialization
machinery.

This patch allows us to remove the RPC unit-test workaround added in r286646.

llvm-svn: 286701
2016-11-12 02:19:31 +00:00
Devin Coughlin 8fa568d761 [analyzer] Update 'Automated' to 'Automatic' from r286694.
ARC is 'Automatic Reference Counting' and not 'Automated Reference Counting'.

llvm-svn: 286700
2016-11-12 01:50:04 +00:00
Richard Smith e950795a03 [c++1z] Support constant folding for __builtin_strchr and __builtin_memchr.
llvm-svn: 286699
2016-11-12 01:39:56 +00:00
Rui Ueyama da139f793c Remove dead code.
llvm-svn: 286698
2016-11-12 01:32:34 +00:00
Devin Coughlin 3dc29a52c7 [analyzer] Fix copy-pasta in NullableReturnedFromNonnullChecker checker name.
The name of the NullableReturnedFromNonnullChecker in Checkers.td
was accidentally "NullablePassedToNonnull", which made it impossible
to explicitly turn the checker on.

rdar://problem/28354459

llvm-svn: 286697
2016-11-12 01:23:01 +00:00
Mehdi Amini 0f5b90c0cc Add instructions in clang get_started page about working with a monorepo
llvm-svn: 286696
2016-11-12 01:18:17 +00:00
Mehdi Amini fbd2685c89 Improve `git llvm push` to suggest `git pull` when applying patch fails
Differential Revision: https://reviews.llvm.org/D26565

llvm-svn: 286695
2016-11-12 01:17:59 +00:00
Devin Coughlin d1fe08b8a9 [analyzer] Improve misleading RetainCountChcker diagnostic under ARC
Under automated reference counting the analyzer treats a methods -- even those
starting with  'copy' and friends -- as returning an unowned value. This is
because ownership of CoreFoundation objects must be transferred to ARC
with __bridge_transfer or CFBridgingRelease() before being returned as
ARC-managed bridged objects.

Unfortunately this could lead to a poor diagnostic inside copy methods under
ARC where the analyzer would complain about a leak of a returned CF value inside
a method "whose name does not start with 'copy'" -- even though the name did
start with 'copy'.

This commit improves the diagnostic under ARC to say inside a method "returned
from a method managed by Automated Reference Counting".

rdar://problem/28849667

llvm-svn: 286694
2016-11-12 01:03:06 +00:00
Anna Zaks 03136efd1b [tsan] Test that false races from ObjC's dealloc, .cxx_destruct, and initialize are ignored
Differential Revision: https://reviews.llvm.org/D26228

llvm-svn: 286693
2016-11-12 00:46:07 +00:00
Zachary Turner eced115aac One more set of changes to fix formatv() on linux.
llvm-svn: 286692
2016-11-12 00:35:58 +00:00
Zachary Turner f269973b2c Add missing #include.
llvm-svn: 286691
2016-11-12 00:30:37 +00:00
Zachary Turner a6f1678872 Fix another problem with formatv().
llvm-svn: 286690
2016-11-12 00:28:10 +00:00
Kostya Serebryany fc1c405f98 [libFuzzer] use less stack
llvm-svn: 286689
2016-11-12 00:24:35 +00:00
Rui Ueyama a8a68a993e Remove extra semicolon.
llvm-svn: 286688
2016-11-12 00:23:32 +00:00
Tom Stellard b4c8e8e30b AMDGPU/SI: Promote i16 = fp_[us]int f32 for VI
Summary: This fixes a regression caused by r286464.

Reviewers: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye

Differential Revision: https://reviews.llvm.org/D26570

llvm-svn: 286687
2016-11-12 00:19:11 +00:00
Zachary Turner 2f94a7a1fa Try to fix build after llvm::formatv() patch.
llvm-svn: 286686
2016-11-12 00:18:42 +00:00
Richard Smith 7e4e1aea15 [c++1z] std::byte didn't make it
llvm-svn: 286685
2016-11-12 00:15:24 +00:00
Rui Ueyama 09e0b5f2c9 Emit Section Contributions.
Differential Revision: https://reviews.llvm.org/D26211

llvm-svn: 286684
2016-11-12 00:00:51 +00:00
Zachary Turner 804d50286d Fix -Werror build with clang-cl.
llvm-svn: 286683
2016-11-11 23:58:11 +00:00
Zachary Turner 11db2642fb [Support] Introduce llvm::formatv() function.
This introduces a new type-safe general purpose formatting
library.  It provides compile-time type safety, does not require
a format specifier (since the type is deduced), and provides
mechanisms for extending the format capability to user defined
types, and overriding the formatting behavior for existing types.

This patch additionally adds documentation for the API to the
LLVM programmer's manual.

Mailing List Thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/105836.html

Differential Revision: https://reviews.llvm.org/D25587

llvm-svn: 286682
2016-11-11 23:57:40 +00:00
Richard Smith da6b5721b5 [c++1z] Two more features have been accepted.
llvm-svn: 286681
2016-11-11 23:51:47 +00:00
Argyrios Kyrtzidis db4698352e [index] Rename SymbolSubKind -> SymbolProperty, NFC.
This better reflects what it represents.

llvm-svn: 286680
2016-11-11 23:49:55 +00:00
Richard Smith e0c7500735 [c++1z] p0522 is approved.
llvm-svn: 286679
2016-11-11 23:46:25 +00:00
Richard Smith e151bab2fc [c++1z] Add constant-folding support for strcmp, strncmp, and memcmp, to
support constexpr char_traits.

llvm-svn: 286678
2016-11-11 23:43:35 +00:00
Rui Ueyama f7c9c3234c Define DbiStreamBuilder::addSectionContribs.
This patch defines a new function to add a SectionContribs stream
to a PDB file. Unlike SectionMap, SectionContribs contains a list
of input sections as opposed to output sections.

Note that this patch needs improving because currently we do not
set Module field in SectionContribs entries. In a follow-up patch,
I'll add Modules and then fix it after that.

Differential Revision: https://reviews.llvm.org/D26210

llvm-svn: 286677
2016-11-11 23:41:13 +00:00
Tom Stellard 9fdbec870c AMDGPU/SI: Fix visit order assumption in SIFixSGPRCopies
Summary:
This pass was assuming that when a PHI instruction defined a register
used by another PHI instruction that the defining insstruction would
be legalized before the using instruction.

This assumption was causing the pass to not legalize some PHI nodes
within divergent flow-control.

This fixes a bug that was uncovered by r285762.

Reviewers: nhaehnle, arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits

Differential Revision: https://reviews.llvm.org/D26303

llvm-svn: 286676
2016-11-11 23:35:42 +00:00
Richard Trieu d420224dac Print correct directory in merge script.
When providing the project directory to the merge script, print it out in the
commit instructions instead of the default project directory.

llvm-svn: 286675
2016-11-11 23:26:28 +00:00
Evgeniy Stepanov ececb37e39 [tsan] Fix typo in test.
llvm-svn: 286674
2016-11-11 23:25:09 +00:00