summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merging r345839:upstream/release_70Tom Stellard2018-12-082-13/+14
| | | | | | | | | | | | | | | ------------------------------------------------------------------------ r345839 | erichkeane | 2018-11-01 08:11:43 -0700 (Thu, 01 Nov 2018) | 6 lines Multiversioning- Ensure all MV functions are emitted. Multiverson function versions are always used (by the resolver), so ensure that they are always emitted. Change-Id: I5d2e0841fddf0d18918b3fb92ae76814add7ee96 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@348686 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r345838:Tom Stellard2018-12-081-0/+17
| | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r345838 | erichkeane | 2018-11-01 08:11:41 -0700 (Thu, 01 Nov 2018) | 8 lines CPU-Dispatch- Fix type of a member function, prevent deferrals The member type creation for a cpu-dispatch function was not correctly including the 'this' parameter, so ensure that the type is properly determined. Also, disable defer in the cases of emitting the functoins, as it can end up resulting in the wrong version being emitted. Change-Id: I0b8fc5e0b0d1ae1a9d98fd54f35f27f6e5d5d083 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@348684 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r345826:Tom Stellard2018-12-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r345826 | erichkeane | 2018-11-01 05:50:37 -0700 (Thu, 01 Nov 2018) | 15 lines CPU-Dispatch-- Fix conflict between 'generic' and 'pentium' When a dispatch function was being emitted that had both a generic and a pentium configuration listed, we would assert. This is because neither configuration has any 'features' associated with it so they were both considered the 'default' version. 'pentium' lacks any features because we implement it in terms of __builtin_cpu_supports (instead of Intel proprietary checks), which is unable to decern between the two. The fix for this is to omit the 'generic' version from the dispatcher if both are present. This permits existing code to compile, and still will choose the 'best' version available (since 'pentium' is technically better than 'generic'). Change-Id: I4b69f3e0344e74cbdbb04497845d5895dd05fda0 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@348682 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r340386 and r344190:Tom Stellard2018-12-071-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r340386 | inouehrs | 2018-08-21 22:43:27 -0700 (Tue, 21 Aug 2018) | 10 lines [AST] correct the behavior of -fvisibility-inlines-hidden option (don't make static local variables hidden) The command line option -fvisibility-inlines-hidden makes inlined method hidden, but it is expected not to affect the visibility of static local variables in the function. However, Clang makes the static local variables in the function also hidden as reported in PR37595. This problem causes LLVM bootstarp failure on Fedora 28 if configured with -DBUILD_SHARED_LIBS=ON. This patch makes the behavior of -fvisibility-inlines-hidden option to be consistent with that of gcc; the option does not change the visibility of the static local variables if the containing function does not associated with explicit visibility attribute and becomes hidden due to this option. Differential Revision: https://reviews.llvm.org/D50968 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r344190 | rnk | 2018-10-10 14:59:56 -0700 (Wed, 10 Oct 2018) | 19 lines [AST] Use -fvisibility value when ignoring -fv-i-h* inline static locals Summary: In r340386 we added code to give static locals in inline functions default visibility. Instead, we should use the "default" visibility passed on the command line, which could be hidden or protected, as GCC does. Some code bases use both -fvisibility=hidden and -fvisibility-inlines-hidden to hide inline functions of classes that are explicitly marked with default visibility. Fixes PR39236 Reviewers: hans, thakis Subscribers: eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D53052 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@348554 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r345470:Tom Stellard2018-12-051-1/+1
| | | | | | | | | | | ------------------------------------------------------------------------ r345470 | brad | 2018-10-27 20:30:18 -0700 (Sat, 27 Oct 2018) | 2 lines Reapply Pass the nopie flag to the linker when linking with -pg. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@348405 91177308-0d34-0410-b5e6-96231b3b80d8
* [Analyzer] [HOTFIX!] SValBuilder crash when ↵Adam Balogh2018-12-051-0/+14
| | | | | | | | | | | | | | | `aggressive-binary-operation-simplification` enabled During the review of D41938 a condition check with an early exit accidentally slipped into a branch, leaving the other branch unprotected. This may result in an assertion later on. This hotfix moves this contition check outside of the branch. Differential Revision: https://reviews.llvm.org/D55051 git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@348362 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r344100:Tom Stellard2018-11-301-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r344100 | emaste | 2018-10-09 17:34:17 -0700 (Tue, 09 Oct 2018) | 16 lines clang: Allow ifunc resolvers to accept arguments When ifunc support was added to Clang (r265917) it did not allow resolvers to take function arguments. This was based on GCC's documentation, which states resolvers return a pointer and take no arguments. However, GCC actually allows resolvers to take arguments, and glibc (on non-x86 platforms) and FreeBSD (on x86 and arm64) pass some CPU identification information as arguments to ifunc resolvers. I believe GCC's documentation is simply incorrect / out-of-date. FreeBSD already removed the prohibition in their in-tree Clang copy. Differential Revision: https://reviews.llvm.org/D52703 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@348012 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r347556:Tom Stellard2018-11-303-76/+76
| | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r347556 | nemanjai | 2018-11-26 06:35:38 -0800 (Mon, 26 Nov 2018) | 11 lines [PowerPC] Vector load/store builtins overstate alignment of pointers A number of builtins in altivec.h load/store vectors from pointers to scalar types. Currently they just cast the pointer to a vector pointer, but expressions like that have the alignment of the target type. Of course, the input pointer did not have that alignment so this triggers UBSan (and rightly so). This resolves https://bugs.llvm.org/show_bug.cgi?id=39704 Differential revision: https://reviews.llvm.org/D54787 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@347935 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r345497:Tom Stellard2018-11-292-35/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r345497 | asavonic | 2018-10-29 04:14:01 -0700 (Mon, 29 Oct 2018) | 29 lines [OpenCL] Fix serialization of OpenCLExtensionDecls Summary: I recently discovered that adding the following code into `opencl-c.h` causes failure of `test/Headers/opencl-c-header.cl`: ``` #pragma OPENCL EXTENSION cl_my_ext : begin void cl_my_ext_foobarbaz(); #pragma OPENCL EXTENSIOn cl_my_ext : end ``` Clang crashes at the assertion is `ASTReader::getGlobalSubmoduleID()`: ``` assert(I != M.SubmoduleRemap.end() && "Invalid index into submodule index remap"); ``` The root cause of the problem that to deserialize `OPENCL_EXTENSION_DECLS` section `ASTReader` needs to deserialize a Decl contained in it. In turn, deserializing a Decl requires information about whether this declaration is part of a (sub)module, but this information is not read yet because it is located further in a module file. Reviewers: Anastasia, yaxunl, JDevlieghere Reviewed By: Anastasia Subscribers: sidorovd, cfe-commits, asavonic Differential Revision: https://reviews.llvm.org/D53200 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@347834 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r347179:Tom Stellard2018-11-291-0/+5
| | | | | | | | | | | | | ------------------------------------------------------------------------ r347179 | brad | 2018-11-18 16:21:06 -0800 (Sun, 18 Nov 2018) | 4 lines [PowerPC] Set the default PLT mode on OpenBSD/powerpc to Secure PLT. OpenBSD/powerpc only supports Secure PLT. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@347822 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r347262:Tom Stellard2018-11-281-0/+10
| | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r347262 | vedantk | 2018-11-19 12:10:22 -0800 (Mon, 19 Nov 2018) | 8 lines [Coverage] Fix PR39258: support coverage regions that start deeper than they end popRegions used to assume that the start location of a region can't be nested deeper than the end location, which is not always true. Patch by Orivej Desh! Differential Revision: https://reviews.llvm.org/D53244 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@347798 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r347261:Tom Stellard2018-11-281-0/+7
| | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r347261 | vedantk | 2018-11-19 12:10:21 -0800 (Mon, 19 Nov 2018) | 11 lines [Sema] Fix PR38987: keep end location of a direct initializer list If PerformConstructorInitialization of a direct initializer list constructor is called while instantiating a template, it has brace locations in its BraceLoc arguments but not in the Kind argument. This reverts the hunk https://reviews.llvm.org/D41921#inline-468844. Patch by Orivej Desh! Differential Revision: https://reviews.llvm.org/D53231 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@347797 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r341697:Tom Stellard2018-11-201-1/+1
| | | | | | | | | | | | | ------------------------------------------------------------------------ r341697 | arphaman | 2018-09-07 11:59:45 -0700 (Fri, 07 Sep 2018) | 4 lines warn_stdlibcxx_not_found: suggest '-stdlib=libc++' instead of '-std' Addresses first post-commit feedback for r335081 from Nico ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@347276 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r341312:Tom Stellard2018-11-021-0/+8
| | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r341312 | psmith | 2018-09-03 05:36:32 -0700 (Mon, 03 Sep 2018) | 13 lines [Aarch64] Fix linker emulation for Aarch64 big endian This patch fixes target linker emulation for aarch64 big endian. aarch64_be_linux is not recognized by gnu ld. The equivalent emulation mode supported by gnu ld is aarch64linuxb. Patch by: Bharathi Seshadri Reviewed by: Peter Smith Differential Revision: https://reviews.llvm.org/D42930 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@345920 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r341778:Tom Stellard2018-10-261-0/+70
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r341778 | rsmith | 2018-09-09 23:35:32 -0700 (Sun, 09 Sep 2018) | 5 lines PR33222: Require the declared return type not the actual return type to match when checking for redeclaration of a function template. This properly handles differences in deduced return types, particularly when performing redeclaration checks for a friend function template. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@345412 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r341775:Tom Stellard2018-10-261-0/+23
| | | | | | | | | | | ------------------------------------------------------------------------ r341775 | rsmith | 2018-09-09 22:32:13 -0700 (Sun, 09 Sep 2018) | 2 lines Part of PR33222: defer enforcing return type mismatch for dependent friend function declarations of class templates. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@345409 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r340025:Tom Stellard2018-10-254-0/+32
| | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r340025 | erichkeane | 2018-08-17 06:43:39 -0700 (Fri, 17 Aug 2018) | 8 lines Fix for bug 38508 - Don't do PCH processing when only generating preprocessor output This clang-cl driver change removes the PCH options when we are only generating preprocessed output. This is similar to the behavior of Y-. Patch by: mikerice Differential Revision: https://reviews.llvm.org/D50640 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@345311 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r339424:Tom Stellard2018-10-251-0/+1
| | | | | | | | | | ------------------------------------------------------------------------ r339424 | hans | 2018-08-10 04:40:50 -0700 (Fri, 10 Aug 2018) | 1 line clang-cl: accept -fcrash-diagnostics-dir= ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@345304 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r344824:Tom Stellard2018-10-222-2/+17
| | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r344824 | ctopper | 2018-10-19 18:30:00 -0700 (Fri, 19 Oct 2018) | 14 lines [X86] When checking the bits in cpu_features for function multiversioning dispatcher in the resolver, make sure all the required bits are set. Not just one of them Summary: The multiversioning code repurposed the code from __builtin_cpu_supports for checking if a single feature is enabled. That code essentially performed (_cpu_features & (1 << C)) != 0. But with the multiversioning path, the mask is no longer guaranteed to be a power of 2. So we return true anytime any one of the bits in the mask is set not just all of the bits. The correct check is (_cpu_features & mask) == mask Reviewers: erichkeane, echristo Reviewed By: echristo Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D53460 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@344923 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r340666:Hans Wennborg2018-08-241-59/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r340666 | hans | 2018-08-25 00:46:33 +0200 (Sat, 25 Aug 2018) | 21 lines Revert r323281 "Adjust MaxAtomicInlineWidth for i386/i486 targets." As reported on http://lists.llvm.org/pipermail/cfe-dev/2018-August/058760.html, this broke i386-freebsd11 due to its lack of atomic 64 bit primitives. While that's not really this commit's fault, let's revert back to the old behaviour until this can be fixed. This means generating cmpxchg8b etc for i386 and i486 which don't technically support those, but that's been the behaviour for a long time, so a little longer probably doesn't hurt that much. > Adjust MaxAtomicInlineWidth for i386/i486 targets. > > This is to fix the bug reported in https://bugs.llvm.org/show_bug.cgi?id=34347#c6. > Currently, all MaxAtomicInlineWidth of x86-32 targets are set to 64. However, > i386 doesn't support any cmpxchg related instructions. i486 only supports cmpxchg. > So in this patch MaxAtomicInlineWidth is reset as follows: > For i386, the MaxAtomicInlineWidth should be 0 because no cmpxchg is supported. > For i486, the MaxAtomicInlineWidth should be 32 because it supports cmpxchg. > For others 32 bits x86 cpu, the MaxAtomicInlineWidth should be 64 because of cmpxchg8b. > > Differential Revision: https://reviews.llvm.org/D42154 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@340667 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r340181:Hans Wennborg2018-08-211-0/+15
| | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r340181 | abataev | 2018-08-20 18:00:22 +0200 (Mon, 20 Aug 2018) | 7 lines [OPENMP][BLOCKS]Fix PR38923: reference to a global variable is captured by a block. Added checks for capturing of the variable in the block when trying to emit correct address for the variable with the reference type. This extra check allows correctly identify the variables that are not captured in the block context. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@340352 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r340191:Hans Wennborg2018-08-211-0/+14
| | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r340191 | abataev | 2018-08-20 20:03:40 +0200 (Mon, 20 Aug 2018) | 6 lines [OPENMP] Fix crash on the emission of the weak function declaration. If the function is actually a weak reference, it should not be marked as deferred definition as this is only a declaration. Patch adds checks for the definitions if they must be emitted. Otherwise, only declaration is emitted. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@340351 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r340048:Hans Wennborg2018-08-212-3/+31
| | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r340048 | nico | 2018-08-17 19:19:06 +0200 (Fri, 17 Aug 2018) | 10 lines Make __shiftleft128 / __shiftright128 real compiler built-ins. r337619 added __shiftleft128 / __shiftright128 as functions in intrin.h. Microsoft's STL plans on using these functions, and they're using intrin0.h which just has declarations of built-ins to not pull in the huge intrin.h header in the standard library headers. That requires that these functions are real built-ins. https://reviews.llvm.org/D50907 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@340289 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r340101:Reid Kleckner2018-08-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r340101 | rnk | 2018-08-17 15:11:31 -0700 (Fri, 17 Aug 2018) | 14 lines Don't warn on returning the address of a label from a statement expression Summary: There isn't anything inherently wrong with returning a label from a statement expression. In practice, the Linux kernel uses this pattern to materialize PCs. Fixes PR38569 Reviewers: niravd, rsmith, nickdesaulniers Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50805 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@340103 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r340079:Reid Kleckner2018-08-1713-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r340079 | rnk | 2018-08-17 13:59:27 -0700 (Fri, 17 Aug 2018) | 20 lines [MS] Mangle a hash of the main file path into anonymous namespaces Summary: This is needed to avoid conflicts in mangled names for codeview types in anonymous namespaces. In CodeView, types refer to each other typically through forward declarations, which contain mangled names. These names have to be unique, otherwise the debugger will look up the mangled name and find the wrong definition. Furthermore, ThinLTO will deduplicate the types, and debug info verification can fail when the types have the wrong sizes. This is PR38608. Fixes PR38609. Reviewers: majnemer, inglorion, hans Subscribers: mehdi_amini, aprantl, JDevlieghere, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50877 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@340087 91177308-0d34-0410-b5e6-96231b3b80d8
* Backport r339704 to 7.0 for PR38598Hans Wennborg2018-08-171-0/+24
| | | | | | | | | | | | | | | | > Author: abataev > Date: Tue Aug 14 11:31:20 2018 > New Revision: 339704 > > URL: http://llvm.org/viewvc/llvm-project?rev=339704&view=rev > Log: > [OPENMP] Fix processing of declare target construct. > > The attribute marked as inheritable since OpenMP 5.0 supports it + > additional fixes to support new functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339998 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r339603:Hans Wennborg2018-08-163-37/+100
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r339603 | abataev | 2018-08-13 21:04:24 +0200 (Mon, 13 Aug 2018) | 4 lines [OPENMP] Fix emission of the loop doacross constructs. The number of loops associated with the OpenMP loop constructs should not be considered as the number loops to collapse. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339851 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r339597:Hans Wennborg2018-08-141-2/+10
| | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r339597 | erichkeane | 2018-08-13 20:33:20 +0200 (Mon, 13 Aug 2018) | 7 lines Enforce instantiation of template multiversion functions Multiversioned member functions inside of a template type were not properly being emitted. The solution to this is to simply ensure that their bodies are correctly evaluated/assigned during template instantiation. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339663 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r338934:Hans Wennborg2018-08-142-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r338934 | vsapsai | 2018-08-04 01:12:37 +0200 (Sat, 04 Aug 2018) | 29 lines [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable. Libc++ needs to know when aligned allocation is supported by clang, but is otherwise unavailable at link time. Otherwise, libc++ will incorrectly end up generating calls to `__builtin_operator_new`/`__builtin_operator_delete` with alignment arguments. This patch implements the following changes: * The `__cpp_aligned_new` feature test macro to no longer be defined when aligned allocation is otherwise enabled but unavailable. * The Darwin driver no longer passes `-faligned-alloc-unavailable` when the user manually specifies `-faligned-allocation` or `-fno-aligned-allocation`. * Instead of a warning Clang now generates a hard error when an aligned allocation or deallocation function is referenced but unavailable. Patch by Eric Fiselier. Reviewers: rsmith, vsapsai, erik.pilkington, ahatanak, dexonsmith Reviewed By: rsmith Subscribers: Quuxplusone, cfe-commits Differential Revision: https://reviews.llvm.org/D45015 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339660 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r339074:Hans Wennborg2018-08-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r339074 | stella.stamenova | 2018-08-07 00:37:45 +0200 (Tue, 07 Aug 2018) | 12 lines [lit, python] Always add quotes around the python path in lit Summary: The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the path to python needs to be surrounded by quotes. This is a companion change to: https://reviews.llvm.org/D50206 Reviewers: asmith, zturner Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50281 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339554 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r339428 and r339494:Hans Wennborg2018-08-136-83/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r339428 | theraven | 2018-08-10 14:53:13 +0200 (Fri, 10 Aug 2018) | 18 lines Add Windows support for the GNUstep Objective-C ABI V2. Summary: Introduces funclet-based unwinding for Objective-C and fixes an issue where global blocks can't have their isa pointers initialised on Windows. After discussion with Dustin, this changes the name mangling of Objective-C types to prevent a C++ catch statement of type struct X* from catching an Objective-C object of type X*. Reviewers: rjmccall, DHowett-MSFT Reviewed By: rjmccall, DHowett-MSFT Subscribers: mgrang, mstorsjo, smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D50144 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r339494 | dyung | 2018-08-11 04:46:47 +0200 (Sat, 11 Aug 2018) | 2 lines Make the section boundary checks on Windows not depend on the order as they are emitted in reverse when the compiler is built by Visual C++. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339538 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r339317:Hans Wennborg2018-08-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r339317 | theraven | 2018-08-09 10:02:42 +0200 (Thu, 09 Aug 2018) | 15 lines Correctly initialise global blocks on Windows. Summary: Windows does not allow globals to be initialised to point to globals in another DLL. Exported globals may be referenced only from code. Work around this by creating an initialiser that runs in early library initialisation and sets the isa pointer. Reviewers: rjmccall Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50436 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339339 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r339210:Hans Wennborg2018-08-081-0/+11
| | | | | | | | | | | | ------------------------------------------------------------------------ r339210 | rsmith | 2018-08-08 02:42:42 +0200 (Wed, 08 Aug 2018) | 2 lines PR38286: Don't crash when attempting to define a constructor for an incomplete class template. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339236 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r338627:Hans Wennborg2018-08-071-1/+1
| | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r338627 | mgorny | 2018-08-01 22:38:22 +0200 (Wed, 01 Aug 2018) | 7 lines [test] Fix %hmaptool path for standalone builds Fix %hmaptool path to refer to clang_tools_dir instead of llvm_tools_dir, in order to fix standalone builds. The tool is built as part of clang, so it won't be found in installed LLVM tools. Differential Revision: https://reviews.llvm.org/D50156 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339102 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r338553:Hans Wennborg2018-08-021-1/+1
| | | | | | | | | | | ------------------------------------------------------------------------ r338553 | filcab | 2018-08-01 15:41:42 +0200 (Wed, 01 Aug 2018) | 1 line Use a dummy target so the test passes when default target is for a toolchain implements useIntegratedAs() -> true ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@338688 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r338552:Hans Wennborg2018-08-021-1/+1
| | | | | | | | | | | ------------------------------------------------------------------------ r338552 | filcab | 2018-08-01 15:41:11 +0200 (Wed, 01 Aug 2018) | 1 line Add REQUIRES: native to a test that assumes it ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@338687 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r338602:Hans Wennborg2018-08-022-159/+6
| | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r338602 | hans | 2018-08-01 19:51:23 +0200 (Wed, 01 Aug 2018) | 11 lines Revert r338455 "[constexpr] Support for constant evaluation of __builtin_memcpy and __builtin_memmove (in non-type-punning cases)." It caused asserts during Chromium builds, see reply on the cfe-commits thread. > This is intended to permit libc++ to make std::copy etc constexpr > without sacrificing the optimization that uses memcpy on > trivially-copyable types. > > __builtin_strcpy and __builtin_wcscpy are not handled by this change. > They'd be straightforward to add, but we haven't encountered a need for > them just yet. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@338674 91177308-0d34-0410-b5e6-96231b3b80d8
* Make test/Frontend/clang-abi-compat.cpp pass when the version goes to 8Hans Wennborg2018-08-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338534 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64][ARM] Add Armv8.4-A testsSjoerd Meijer2018-08-012-0/+122
| | | | | | | | | | This adds tests for Armv8.4-A, and also some v8.2 and v8.3 tests that were missing. Differential Revision: https://reviews.llvm.org/D50068 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338525 91177308-0d34-0410-b5e6-96231b3b80d8
* [Modules] Do not emit relocation error when -fno-validate-pch is setYuka Takahashi2018-08-011-0/+2
| | | | | | | | | | | | Summary: Clang emits error when implicit modules was relocated from the first build directory. However this was biting our usecase where we copy the contents of build directory to another directory in order to distribute. Differential Revision: https://reviews.llvm.org/D49852 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338503 91177308-0d34-0410-b5e6-96231b3b80d8
* [AST] CastExpr: BasePathSize is not large enough.Roman Lebedev2018-08-011-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | Summary: rC337815 / D49508 had to cannibalize one bit of `CastExprBitfields::BasePathSize` in order to squeeze `PartOfExplicitCast` boolean. That reduced the maximal value of `PartOfExplicitCast` from 9 bits (~512) down to 8 bits (~256). Apparently, that mattered. Too bad there weren't any tests. It caused [[ https://bugs.llvm.org/show_bug.cgi?id=38356 | PR38356 ]]. So we need to increase `PartOfExplicitCast` back at least to 9 bits, or a bit more. For obvious reasons, we can't do that in `CastExprBitfields` - that would blow up the size of every `Expr`. So we need to either just add a variable into the `CastExpr` (as done here), or use `llvm::TrailingObjects`. The latter does not seem to be straight-forward. Perhaps, that needs to be done not for the `CastExpr` itself, but for all of it's `final` children. Reviewers: rjmccall, rsmith, erichkeane Reviewed By: rjmccall Subscribers: bricci, hans, cfe-commits, waddlesplash Differential Revision: https://reviews.llvm.org/D50050 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338489 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenEmbedded] Explicitly specify -rtlib in testsPetr Hosek2018-08-011-2/+2
| | | | | | | | | | | Tests added in r338294 implicitly assume that libgcc is the runtime library, but that's not the case when the user configures Clang to use compiler-rt in which case these tests will break. Explicitly request libgcc when invoking clang in these tests to avoid that. Differential Revision: https://reviews.llvm.org/D50123 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338482 91177308-0d34-0410-b5e6-96231b3b80d8
* AMDGPU: Add clamp bit to dot builtinsKonstantin Zhuravlyov2018-08-013-21/+76
| | | | | | | Differential Revision: https://reviews.llvm.org/D50011 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338471 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid exposing name for range-based for '__range' variables in lifetime ↵Richard Smith2018-08-011-1/+1
| | | | | | warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338467 91177308-0d34-0410-b5e6-96231b3b80d8
* [P0936R0] add [[clang::lifetimebound]] attributeRichard Smith2018-08-011-0/+115
| | | | | | | | | | | | | | | | | | | | This patch adds support for a new attribute, [[clang::lifetimebound]], that indicates that the lifetime of a function result is related to one of the function arguments. When walking an initializer to make sure that the lifetime of the initial value is at least as long as the lifetime of the initialized object, we step through parameters (including the implicit object parameter of a non-static member function) that are marked with this attribute. There's nowhere to write an attribute on the implicit object parameter, so in lieu of that, it may be applied to a function type (where it appears immediately after the cv-qualifiers and ref-qualifier, which is as close to a declaration of the implicit object parameter as we have). I'm currently modeling this in the AST as the attribute appertaining to the function type. Differential Revision: https://reviews.llvm.org/D49922 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338464 91177308-0d34-0410-b5e6-96231b3b80d8
* [constexpr] Support for constant evaluation of __builtin_memcpy andRichard Smith2018-07-312-6/+159
| | | | | | | | | | | | | | __builtin_memmove (in non-type-punning cases). This is intended to permit libc++ to make std::copy etc constexpr without sacrificing the optimization that uses memcpy on trivially-copyable types. __builtin_strcpy and __builtin_wcscpy are not handled by this change. They'd be straightforward to add, but we haven't encountered a need for them just yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338455 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r337635 "[Driver] Sanitizer support based on runtime library presence"Reid Kleckner2018-07-3120-41/+19
| | | | | | | | This change causes issues with distributed build systems, which may only have compiler binaries without any runtime libraries. See discussion about this on https://reviews.llvm.org/D15225. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338444 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Fix eliding the same destructor twice due to buggy default arguments.Artem Dergachev2018-07-311-0/+15
| | | | | | | | | | | | Because of incomplete support for CXXDefaultArgExpr, we cannot yet commit to asserting that the same destructor won't be elided twice. Suppress the assertion failure for now. Proper support is still an open problem. Differential Revision: https://reviews.llvm.org/D49213 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338441 91177308-0d34-0410-b5e6-96231b3b80d8
* [serialization] PR34728: Don't assume that only a suffix of templateRichard Smith2018-07-312-0/+51
| | | | | | | | | | | | | parameters can have default arguments. At least for function templates and class template partial specializations, it's possible for a template parameter with a default argument to be followed by a non-pack template parameter with no default argument, and this case was not properly handled here. Testcase by Steve O'Brien! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338438 91177308-0d34-0410-b5e6-96231b3b80d8
* [CFG] [analyzer] Implement function argument construction contexts.Artem Dergachev2018-07-312-16/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In r330377 and r338425 we have already identified what constitutes function argument constructors and added stubs in order to prevent confusing them with other temporary object constructors. Now we implement a ConstructionContext sub-class to carry all the necessary information about the construction site, namely call expression and argument index. On the analyzer side, the patch interacts with the recently implemented pre-C++17 copy elision support in an interesting manner. If on the CFG side we didn't find a construction context for the elidable constructor, we build the CFG as if the elidable constructor is not elided, and the non-elided constructor within it is a simple temporary. But the same problem may occur in the analyzer: if the elidable constructor has a construction context but the analyzer doesn't implement such context yet, the analyzer should also try to skip copy elision and still inline the non-elided temporary constructor. This was implemented by adding a "roll back" mechanism: when elision fails, roll back the changes and proceed as if it's a simple temporary. The approach is wonky, but i'm fine with that as long as it's merely a defensive mechanism that should eventually go away once all construction contexts become supported. Differential Revision: https://reviews.llvm.org/D48681. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338436 91177308-0d34-0410-b5e6-96231b3b80d8