- Feb 02, 2018
-
-
Ben Hamilton authored
Summary: This is an alternative approach to D42014 after some investigation by stephanemoore@ and myself. Previously, the format parameter `BinPackParameters` controlled both C function parameter list bin-packing and Objective-C protocol conformance list bin-packing. We found in the Google style, some teams were changing `BinPackParameters` from its default (`true`) to `false` so they could lay out Objective-C protocol conformance list items one-per-line instead of bin-packing them into as few lines as possible. To allow teams to use one-per-line Objective-C protocol lists without changing bin-packing for other areas like C function parameter lists, this diff introduces a new LibFormat parameter `ObjCBinPackProtocolList` to control the behavior just for ObjC protocol conformance lists. The new parameter is an enum which defaults to `Auto` to keep the previous behavior (delegating to `BinPackParameters`). Depends On D42649 Test Plan: New tests added. make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: jolesiak, stephanemoore, djasper Reviewed By: stephanemoore Subscribers: Wizard, hokein, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D42650 llvm-svn: 324131
-
Craig Topper authored
[X86] Add avx512 command line to ptest.ll to demonstrate that 512-bit vectors are not handled by LowerVectorAllZeroTest. llvm-svn: 324130
-
Craig Topper authored
Partially revert r324124 [X86] Add tests for missed opportunities to use ptest for all ones comparison. Turns out I misunderstood the flag behavior of PTEST because I read the documentation for KORTEST which is different than PTEST/KTEST and made a bad assumption. Keep the test rename though cause that's useful. llvm-svn: 324129
-
Eric Fiselier authored
Summary: Previously, Clang only emitted label names in assert builds. However there is a CC1 option -discard-value-names that should have been used to control emission instead. This patch removes the NDEBUG preprocessor block and instead allows LLVM to handle removing the names in accordance with the option. Reviewers: erichkeane, aaron.ballman, majnemer Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42829 llvm-svn: 324127
-
Kuba Mracek authored
The "sleep(5)" sometimes times out on our bots, causing the test to fail. Let's use pthread_join. Differential Revision: https://reviews.llvm.org/D42862 llvm-svn: 324126
-
Aditya Nandakumar authored
llvm-svn: 324125
-
Craig Topper authored
Also rename the test from pr12312.ll to ptest.ll so its more recognizable. llvm-svn: 324124
-
Alex Denisov authored
llvm-svn: 324123
-
Sanjay Patel authored
llvm-svn: 324122
-
Kamil Rytarowski authored
llvm-svn: 324121
-
Kamil Rytarowski authored
Summary: devname, devname_r - get device name Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42053 llvm-svn: 324120
-
Jim Ingham authored
for run_to_{source,name}_breakpoint. llvm-svn: 324119
-
Sanjay Patel authored
llvm-svn: 324118
-
Adrian Prantl authored
llvm-svn: 324115
-
George Karpenkov authored
llvm-svn: 324114
-
Eric Liu authored
Reviewers: hokein, bkramer Reviewed By: bkramer Subscribers: bkramer, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42361 llvm-svn: 324113
-
Michael Kruse authored
llvm-svn: 324112
-
Erik Pilkington authored
This commit cleans up the expression parser, using a new style: - parse* functions now return Node pointers. - The mangled name is now held in Db and accessed with look() and consume() - LLVM coding style This style is meant to avoid the 2 most common types of bugs in the old demanger, namely misusing the Names stack (ie, calling back() on empty) and going out of bounds on the mangled name. I also think it makes the demangler a lot cleaner. Differential revision: https://reviews.llvm.org/D41887 llvm-svn: 324111
-
Amara Emerson authored
Differential Revision: https://reviews.llvm.org/D42832 llvm-svn: 324110
-
Sanjay Patel authored
llvm-svn: 324109
-
Rafael Espindola authored
This reverts commit r324107. I will have to test it on OS X. llvm-svn: 324108
-
Rafael Espindola authored
This starts adding dso_local to clang. The hope is to eventually have TargetMachine::shouldAssumeDsoLocal go away. My objective for now is to move enough of it to clang to remove the need for the TargetMachine one to handle PIE copy relocations and -fno-plt. With that it should then be easy to implement a -fno-copy-reloc in clang. This patch just adds the cases where we assume a symbol to be local based on the file being compiled for an executable or a shared library. llvm-svn: 324107
-
Craig Topper authored
[X86] Remove checks for FeatureAVX512 from the X86 assembly parser. Remove mcpu/mattr from assembly test command lines. Summary: We should always be able to accept AVX512 registers and instructions in llvm-mc. The only subtarget mode that should be checked is 16-bit vs 32-bit vs 64-bit mode. I've also removed all the mattr/mcpu lines from test RUN lines to be consistent with this. Most were due to AVX512, but a few were for other features. Fixes PR36202 Reviewers: RKSimon, echristo, bkramer Reviewed By: echristo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42824 llvm-svn: 324106
-
Sam McCall authored
llvm-svn: 324105
-
Fangrui Song authored
Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42674 llvm-svn: 324104
-
Yaxun Liu authored
This requires corresponding llvm change. Differential Revision: https://reviews.llvm.org/D40956 llvm-svn: 324102
-
Yaxun Liu authored
This requires corresponding clang change. Differential Revision: https://reviews.llvm.org/D40955 llvm-svn: 324101
-
Clement Courbet authored
See https://reviews.llvm.org/D42793#996098 for context. llvm-svn: 324099
-
Erich Keane authored
When trying to track down a different bug, we discovered that calling __builtin_va_arg on a vec3f type caused the SROA pass to issue a warning that there was an illegal access. Further research showed that the vec3f type is alloca'ed as size '12', but the _builtin_va_arg code on x86_64 was always loading this out of registers as {double, double}. Thus, the 2nd store into the vec3f was storing in bytes 12-15! This patch alters the original implementation which always assumed {double, double} to use the actual coerced type instead, so the LLVM-IR generated is a load/GEP/store of a <2 x float> and a float, rather than a double and a double. Tests were added for all combinations I could think of that would fit in 2 FP registers, and all work exactly as expected. Differential Revision: https://reviews.llvm.org/D42811 llvm-svn: 324098
-
Ben Hamilton authored
Summary: The following Objective-C code currently incorrectly triggers clang-tidy's performance-unnecessary-value-param check: ``` % cat /tmp/performance-unnecessary-value-param-arc.m void foo(id object) { } clang-tidy /tmp/performance-unnecessary-value-param-arc.m -checks=-\*,performance-unnecessary-value-param -- -xobjective-c -fobjc-abi-version=2 -fobjc-arc 1 warning generated. /src/llvm/tools/clang/tools/extra/test/clang-tidy/performance-unnecessary-value-param-arc.m:10:13: warning: the parameter 'object' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] void foo(id object) { } ~~ ^ const & ``` This is wrong for a few reasons: 1) Objective-C doesn't have references, so `const &` is not going to help 2) ARC heavily optimizes the "expensive" copy which triggers the warning This fixes the issue by disabling the warning for non-C++, as well as disabling it for objects under ARC memory management for Objective-C++. Fixes https://bugs.llvm.org/show_bug.cgi?id=32075 Test Plan: New tests added. Ran tests with `make -j12 check-clang-tools`. Reviewers: alexfh, hokein Reviewed By: hokein Subscribers: stephanemoore, klimek, xazax.hun, cfe-commits, Wizard Differential Revision: https://reviews.llvm.org/D42812 llvm-svn: 324097
-
James Henderson authored
llvm-svn: 324096
-
George Rimar authored
Was requested during review of D42798. llvm-svn: 324095
-
Simon Pilgrim authored
llvm-svn: 324094
-
Sam McCall authored
llvm-svn: 324093
-
Ivan A. Kosarev authored
This patch implements analysis for new-format TBAA access tags with aggregate types as their final access types. Differential Revision: https://reviews.llvm.org/D41501 llvm-svn: 324092
-
Kamil Rytarowski authored
Late fix for SVN r. 324034 Add new interceptors: strlcpy(3) and strlcat(3) There was forgotten an addition of len to the return value. llvm-svn: 324091
-
Benjamin Kramer authored
llvm-svn: 324084
-
Benjamin Kramer authored
The matchers in this check are prone to create ODR violations otherwise. No functionality change. llvm-svn: 324083
-
Sam McCall authored
llvm-svn: 324081
-
Benjamin Kramer authored
llvm-svn: 324080
-