summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-01-16[clang-tidy] bugprone-string-constructor: Catch string from nullptr.Clement Courbet
Summary: Context: https://twitter.com/willkirkby/status/1084219580799741953 Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D56657
2019-01-16[clang-tidy] Avoid fuchsia-overloaded-operator false positive with lambdas ↵Sam McCall
after r351047
2019-01-16[clangd] Fix XPC after rCTE351280Fangrui Song
2019-01-16[llvm-rc] Support '--' for delimiting options from input pathsMartin Storsjo
This allows avoiding conflicts between paths that begin with the same chars as some llvm-rc options (which can be used with either slashes or dashes). Differential Revision: https://reviews.llvm.org/D56743
2019-01-16[test] Disable Python binding tests w/ LLVM_ENABLE_PIC=OFFMichal Gorny
Disable Python binding tests when LLVM_ENABLE_PIC is disabled, as libclang.so is not being built in that case. Reported by Nico Weber. Differential Revision: https://reviews.llvm.org/D56732
2019-01-16[clang-tidy] Treat references to smart pointers correctly in use-after-move.Martin Bohme
Summary: Previously, we weren't recognizing these as smart pointers and thus weren't allowing non-dereference accesses as we should -- see new test cases which fail without the fix. Reviewers: alexfh, hokein, aaron.ballman, JonasToth Reviewed By: JonasToth Subscribers: xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D56585
2019-01-16[SEH] Pass the frame pointer from SEH finally to finally functionslinaro-local/ci/tcwg_kernel/llvm-master-arm-stable-allyesconfigSanjin Sijaric
Pass the frame pointer that the first finally block receives onto the nested finally block, instead of generating it using localaddr. Differential Revision: https://reviews.llvm.org/D56463
2019-01-16[X86] Correct the type string for __builtin_ia32_gathersiv16sf to make the ↵Craig Topper
indices an integer type not an FP type. The element count and width remain the same. This went unnoticed because default conversion from builtin to intrinsic will generate a bitcast if the types don't match.
2019-01-16[llvm-symbolizer] Add -C as a short alias to -demangleDmitry Venikov
Summary: Provides -C as alias to -demangle. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40069. Reviewers: jhenderson, ruiu, rnk, fjricci Reviewed By: jhenderson, ruiu Subscribers: rupprecht, erik.pilkington, llvm-commits Differential Revision: https://reviews.llvm.org/D56591
2019-01-16correct script name in generated testslinaro-local/ci/tcwg_kernel/llvm-master-arm-lts-allyesconfigEric Fiselier
2019-01-16[WebAssembly] COWS has been renamed to WASI.Dan Gohman
2019-01-16[WebAssembly] COWS has been renamed to WASI.Dan Gohman
2019-01-16Only promote args when function attributes are compatibleTom Stellard
Summary: Check to make sure that the caller and the callee have compatible function arguments before promoting arguments. This uses the same TargetTransformInfo queries that are used to determine if attributes are compatible for inlining. The goal here is to avoid breaking ABI when a called function's ABI depends on a target feature that is not enabled in the caller. This is a very conservative fix for PR37358. Ideally we would have a more sophisticated check for ABI compatiblity rather than checking if the attributes are compatible for inlining. Reviewers: echristo, chandlerc, eli.friedman, craig.topper Reviewed By: echristo, chandlerc Subscribers: nikic, xbolva00, rkruppe, alexcrichton, llvm-commits Differential Revision: https://reviews.llvm.org/D53554
2019-01-16[InstCombine]Avoid introduction of unaligned mem accesslinaro-local/ci/tcwg_kernel/llvm-master-arm-next-allmodconfiglinaro-local/ci/tcwg_kernel/llvm-master-aarch64-mainline-allnoconfigSerguei Katkov
InstCombine is able to transform mem transfer instrinsic to alone store or store/load pair. It might result in generation of unaligned atomic load/store which later in backend will be transformed to libcall. It is not an evident gain and it is better to keep intrinsic as is and handle it at backend. Reviewers: reames, anna, apilipenko, mkazantsev Reviewed By: reames Subscribers: t.p.northover, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D56582
2019-01-16[SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03linaro-local/ci/tcwg_kernel/llvm-master-arm-next-defconfiglinaro-local/ci/tcwg_kernel/llvm-master-arm-mainline-allyesconfiglinaro-local/ci/tcwg_kernel/llvm-master-aarch64-stable-defconfiglinaro-local/ci/tcwg_kernel/llvm-master-aarch64-lts-allyesconfiglinaro-local/ci/tcwg_kernel/llvm-master-aarch64-lts-allnoconfigEric Fiselier
When -faligned-allocation is specified in C++03 libc++ defines std::align_val_t as an unscoped enumeration type (because Clang didn't provide scoped enumerations as an extension until 8.0). Unfortunately Clang confuses the `align_val_t` overloads of delete with the sized deallocation overloads which aren't enabled. This caused Clang to call the aligned deallocation function as if it were the sized deallocation overload. For example: https://godbolt.org/z/xXJELh This patch fixes the confusion.
2019-01-16gn build: Merge r351283.Peter Collingbourne
2019-01-16Attempt to make test_macros.h even more minimallinaro-local/ci/tcwg_kernel/llvm-master-aarch64-lts-allmodconfigEric Fiselier
2019-01-16Fix feature test macros for atomics/mutexes without threadinglinaro-local/ci/tcwg_kernel/llvm-master-arm-lts-defconfigEric Fiselier
2019-01-16Fix PR40230 - std::pair may have padding on FreeBSD.Eric Fiselier
Summary: FreeBSD ships a very old and deprecated ABI for std::pair where the copy and move constructors are not allowed to be trivial. D25389 change how this was implemented by introducing a non-trivial base class. This patch, introduced in October 2016, introduced an ABI bug that caused nested `std::pair` instantiations to have padding. For example: ``` using PairT = std::pair< std::pair<char, char>, char >; static_assert(offsetof(PairT, first) == 0, "First member should exist at offset zero"); // Fails on FreeBSD! ``` The bug occurs because the base class for the first element (the nested pair) cannot be put at offset zero because the top-level pair already has the same base class laid out there. This patch fixes that ABI bug by templating the dummy base class on the same parameters as the pair. Technically this fix is an ABI break for users who depend on the "broken" ABI introduced in 2016. I'm putting this up for review so that the FreeBSD maintainers can sign off on fixing the ABI by breaking the ABI. Another option, since we have to "break" the ABI to fix it, would be to move FreeBSD off the deprecated non-trivial pair ABI instead. Also see: * https://llvm.org/PR40230 * https://reviews.llvm.org/D21329 Reviewers: rsmith, dim, emaste Reviewed By: rsmith Subscribers: mclow.lists, krytarowski, christof, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D56357
2019-01-16Move internal usages of `alignof`/`__alignof` to use `_LIBCPP_ALIGNOF`.Eric Fiselier
Summary: Starting in Clang 8.0 and GCC 8.0, `alignof` and `__alignof` return different values in same cases. Specifically `alignof` and `_Alignof` return the minimum alignment for a type, where as `__alignof` returns the preferred alignment. libc++ currently uses `__alignof` but means to use `alignof`. See llvm.org/PR39713 This patch introduces the macro `_LIBCPP_ALIGNOF` so we can control which spelling gets used. This patch does not introduce any ABI guard to provide the old behavior with newer compilers. However, if we decide that is needed, this patch makes it trivial to implement. I think we should commit this change immediately, and decide what we want to do about the ABI afterwards. Reviewers: ldionne, EricWF Reviewed By: ldionne, EricWF Subscribers: jyknight, christof, libcxx-commits Differential Revision: https://reviews.llvm.org/D54814
2019-01-16[TSan] Use switches when dealing with enumsJulian Lettner
Summary: Small refactoring: replace some if-else cascades with switches so that the compiler warns us about missing cases. Maybe found a small bug? Reviewers: dcoughlin, kubamracek, dvyukov, delcypher, jfb Reviewed By: dvyukov Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D56295
2019-01-16[WebAssembly] Store section alignment as a power of 2Sam Clegg
This change bumps for version number of the wasm object file metadata. See https://github.com/WebAssembly/tool-conventions/pull/92 Differential Revision: https://reviews.llvm.org/D56762
2019-01-16Implement feature test macros using a script.linaro-local/ci/tcwg_kernel/llvm-master-aarch64-next-allyesconfigEric Fiselier
Summary: This patch implements all the feature test macros libc++ currently supports, as specified by the standard or cppreference prior to C++2a. The tests and `<version>` header are generated using a script. The script contains a table of each feature test macro, the headers it should be accessible from, and its values of each dialect of C++. When a new feature test macro is added or needed, the table should be updated and the script re-run. Reviewers: mclow.lists, jfb, serge-sans-paille Reviewed By: mclow.lists Subscribers: arphaman, jfb, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D56750
2019-01-16[WebAssembly] Store section alignment as a power of 2Sam Clegg
This change bumps for version number of the wasm object file metadata. See https://github.com/WebAssembly/tool-conventions/pull/92 Differential Revision: https://reviews.llvm.org/D56758
2019-01-16[EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfpEli Friedman
This is the clang counterpart to D56747. Patch by Mandeep Singh Grang. Differential Revision: https://reviews.llvm.org/D56748
2019-01-16[GISel]: Add support for CSEing continuously during GISel passes.Aditya Nandakumar
https://reviews.llvm.org/D52803 This patch adds support to continuously CSE instructions during each of the GISel passes. It consists of a GISelCSEInfo analysis pass that can be used by the CSEMIRBuilder.
2019-01-16Revert "[Tooling] Make clang-tool find libc++ dir on mac when running on a ↵Vlad Tsyrklevich
file without compilation database." This reverts commits r351222 and r351229, they were causing ASan/MSan failures on the sanitizer bots.
2019-01-16[EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfpMandeep Singh Grang
Summary: Make recoverfp intrinsic target-independent so that it can be implemented for AArch64, etc. Refer D53541 for the context. Clang counterpart D56748. Reviewers: rnk, efriedma Reviewed By: rnk, efriedma Subscribers: javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D56747
2019-01-16[clangd] XPC transport layerJan Korous
- New transport layer for macOS. - XPC Framework - Test client Framework and client were written by Alex Lorenz. Differential Revision: https://reviews.llvm.org/D54428
2019-01-16[LangRef] Fix typo adress->address. NFCCraig Topper
2019-01-16[X86] Rename SHRUNKBLEND ISD node to BLENDV.Craig Topper
That's really what it is. If we didn't use intrinsics for BLENDVPS/BLENDVPD/PBLENDVB all the way to isel, this is the node we would use.
2019-01-16gn build: Add check-hwasan target.Peter Collingbourne
The Android sanitizer tests are currently some of the most difficult to run correctly, requiring at least 3 build directories which have to be configured in just the right way and built in the correct order (see e.g. [1] and the functions that it calls). This patch adds a check-hwasan target which greatly simplifies running the hwasan tests for gn users, taking advantage of its support for multiple toolchains. With this the tests can be run simply by setting an NDK path and running "ninja check-hwasan" with a compatible Android device connected. The Linux/x86_64 and Android/aarch64 targets are tested in parallel. [1] https://github.com/llvm/llvm-zorg/blob/master/zorg/buildbot/builders/sanitizers/buildbot_android.sh Differential Revision: https://reviews.llvm.org/D56713
2019-01-16[lldb-mi] Remove use of dialog boxAlex Langford
Summary: This really is only implemented on Windows, and it requires us to pull in User32. This was only useful when debugging on lldb-mi on Windows, and there doesn't seem to be a good reason why using a dialog box is better than what exists for other platforms. Reviewers: zturner, jingham, compnerd Subscribers: ki.stfu Differential Revision: https://reviews.llvm.org/D56755
2019-01-15[X86] Add avx512 scatter intrinsics that use a vXi1 mask instead of a scalar ↵Craig Topper
integer. We're trying to have the vXi1 types in IR as much as possible. This prevents the need for bitcasts when the producer of the mask was already a vXi1 value like an icmp. The bitcasts can be subject to code motion and interfere with basic block at a time isel in bad ways.
2019-01-15Remove redundant check.Adrian Prantl
2019-01-15AMDGPU: Raise the priority of MAD24 in instruction selection.linaro-local/ci/tcwg_kernel/llvm-master-arm-lts-allmodconfigChangpeng Fang
Summary: We have seen performance regression when v_add3 is generated. The major reason is that the v_mad pattern is broken when v_add3 is generated. We also see the register pressure increased. While we could not properly estimate register pressure during instruction selection, we can give mad a higher priority. In this work, we raise the priority for mad24 in selection and resolve the performance regression. Reviewers: rampitec Differential Revision: https://reviews.llvm.org/D56745
2019-01-15Re-order type param children of ObjC nodesStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55394
2019-01-15NFC: Some cleanups that I missed in the previous commitStephen Kelly
2019-01-15compiler-rt/test: Bring back -pie on Android.linaro-local/ci/tcwg_kernel/llvm-master-arm-mainline-defconfiglinaro-local/ci/tcwg_kernel/llvm-master-aarch64-stable-allyesconfigPeter Collingbourne
Looks like the sanitizer-x86_64-linux-android bot started failing because -pie is still needed when targeting API levels < 16 (which is the case by default for arm and i686).
2019-01-15Re-order overrides in FunctionDecl dumpStephen Kelly
Output all content which is local to the FunctionDecl before traversing to child AST nodes. This is necessary so that all of the part which is local to the FunctionDecl can be split into a different method. Reviewers: aaron.ballman Differential Revision: https://reviews.llvm.org/D55083
2019-01-15NFC: Replace iterator loop with cxx_range_forStephen Kelly
2019-01-15[VFS] Add getter for mapping entries.Jonas Devlieghere
When generating a reproducer in LLDB we build up the mapping but don't immediately copy over the files on the file system. Rather than keeping a separate data structure with real and virtual paths, we might as well reuse the entries already stored in the YAMLVFSWriter to lazily copy over the files when needed.
2019-01-15[VFS] Move RedirectingFileSystem interface into header (NFC)Jonas Devlieghere
This moves the RedirectingFileSystem into the header so it can be extended. This is needed in LLDB we need a way to obtain the external path to deal with FILE* and file descriptor APIs. Discussion on the mailing list: http://lists.llvm.org/pipermail/llvm-dev/2018-November/127755.html Differential revision: https://reviews.llvm.org/D54277
2019-01-15Simplify code by using Optional::getValueOr()Adrian Prantl
2019-01-15[debugserver][CMake] Remove commented out lineAlex Langford
This has been commented out since rL300111 (commit d742d081f3a1e7412cc609765139ba32d597ac15). Looks like it was committed as a commented out line, so I'm removing it.
2019-01-15[libFuzzer] Remove unstable edge handlingJonathan Metzman
Summary: Remove code for handling unstable edges from libFuzzer since it has not been found useful. Differential Revision: https://reviews.llvm.org/D56730
2019-01-15[clang-tidy] add options documentation to readability-identifier-naming checkerlinaro-local/ci/tcwg_kernel/llvm-master-arm-next-allyesconfigPaul Hoad
Summary: The documentation for this clang-checker did not explain what the options are. But this checkers only works with at least some options defined. To discover the options, you have to read the source code. This shouldn't be necessary for users who just have access to the clang-tidy binary. This revision, explains the options and gives an example. Patch by MyDeveloperDay. Reviewers: JonasToth, Eugene.Zelenko Reviewed By: JonasToth Subscribers: xazax.hun, Eugene.Zelenko Differential Revision: https://reviews.llvm.org/D56563
2019-01-15compiler-rt/test: Add a couple of convenience features for Android.Peter Collingbourne
Add a ANDROID_SERIAL_FOR_TESTING CMake variable. This lets you run the tests with multiple devices attached without having to set ANDROID_SERIAL. Add a mechanism for pushing files to the device. Currently most sanitizers require llvm-symbolizer and the sanitizer runtime to be pushed to the device. This lets the sanitizer make this happen automatically before running the tests by specifying the paths in the lit.site.cfg file. Differential Revision: https://reviews.llvm.org/D56712
2019-01-15[libObject] Tweak expected error output from llvm-arJordan Rupprecht
2019-01-15gn build: Add a stage2 host toolchain and make the hwasan runtime buildable ↵Peter Collingbourne
on x86_64 Linux. Differential Revision: https://reviews.llvm.org/D56711