]> granicus.if.org Git - clang/log
clang
4 years agoMerging r354633: release_80 origin/release_80
Tom Stellard [Wed, 26 Jun 2019 23:02:24 +0000 (23:02 +0000)]
Merging r354633:

------------------------------------------------------------------------
r354633 | rsmith | 2019-02-21 15:04:35 -0800 (Thu, 21 Feb 2019) | 3 lines

Use _Q as MS ABI mangling for char8_t.

Thanks to Yuriy Solodkyy for letting us know the mangling here.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@364487 91177308-0d34-0410-b5e6-96231b3b80d8

4 years agoMerging r359809:
Reid Kleckner [Wed, 26 Jun 2019 21:59:19 +0000 (21:59 +0000)]
Merging r359809:
------------------------------------------------------------------------
r359809 | rnk | 2019-05-02 10:45:54 -0700 (Thu, 02 May 2019) | 27 lines

Use primary template parameter names for variable template debug info

Summary:
Fixes PR41677

Consider:
  template <typename LHS, typename RHS> constexpr bool is_same_v = false;
  template <typename T> constexpr bool is_same_v<T, T> = true;
  template constexpr bool is_same_v<int, int>;

Before this change, when emitting debug info for the
`is_same_v<int, int>` global variable, clang would crash because it
would try to use the template parameter list from the partial
specialization to give parameter names to template arguments. This
doesn't work in general, since a partial specialization can have fewer
arguments than the primary template. Therefore, always use the primary
template. Hypothetically we could try to use the parameter names from
the partial specialization when possible, but it's not clear this really
helps debugging in practice.

Reviewers: JDevlieghere, aprantl, ormris, dblaikie

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61408
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@364483 91177308-0d34-0410-b5e6-96231b3b80d8

4 years agoMerging r355033:
Tom Stellard [Tue, 25 Jun 2019 00:37:55 +0000 (00:37 +0000)]
Merging r355033:

------------------------------------------------------------------------
r355033 | joerg | 2019-02-27 13:46:01 -0800 (Wed, 27 Feb 2019) | 2 lines

Use Secure PLT as default on NetBSD/PowerPC.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@364258 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r360674:
Tom Stellard [Thu, 16 May 2019 00:07:53 +0000 (00:07 +0000)]
Merging r360674:

------------------------------------------------------------------------
r360674 | russell_gallop | 2019-05-14 07:01:40 -0700 (Tue, 14 May 2019) | 7 lines

[Driver][Windows] Add dependent lib argument for profile instr generate

This is needed so lld-link can find clang_rt.profile when self hosting
on Windows with PGO. Using clang-cl as a linker knows to add the library
but self hosting, using -DCMAKE_LINKER=<...>/lld-link.exe doesn't.

Differential Revision: https://reviews.llvm.org/D61742
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@360828 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r357506:
Tom Stellard [Tue, 23 Apr 2019 03:32:01 +0000 (03:32 +0000)]
Merging r357506:

------------------------------------------------------------------------
r357506 | atanasyan | 2019-04-02 11:03:31 -0700 (Tue, 02 Apr 2019) | 7 lines

[driver][mips] Check both `gnuabi64` and `gnu` suffixes in `getMultiarchTriple`

In case of N64 ABI toolchain paths migth have `mips-linux-gnuabi64`
or `mips-linux-gnu` directory regardless of selected environment.
Check both variants while detecting a multiarch triple.

Fix for the bug https://bugs.llvm.org/show_bug.cgi?id=41204
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@358947 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r356198:
Tom Stellard [Mon, 22 Apr 2019 22:12:21 +0000 (22:12 +0000)]
Merging r356198:

------------------------------------------------------------------------
r356198 | abataev | 2019-03-14 13:36:00 -0700 (Thu, 14 Mar 2019) | 5 lines

[OPENMP]Fix crash for the ordered(n) clause.

If the doacross lop construct is used and the loop counter is declare
outside of the loop, the compiler might crash trying to get the address
of the loop counter. Patch fixes this problem.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@358923 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRe-generate DiagnosticsReference.rst (PR41080)
Hans Wennborg [Fri, 15 Mar 2019 08:44:10 +0000 (08:44 +0000)]
Re-generate DiagnosticsReference.rst (PR41080)

  $ bin/clang-tblgen -gen-diag-docs -I../cfe.src/include
  -I../cfe.src/include/clang/Basic/
  ../cfe.src/include/clang/Basic/Diagnostic.td -o
  ../cfe.src/docs/DiagnosticsReference.rst

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@356240 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r355743:
Hans Wennborg [Tue, 12 Mar 2019 08:29:08 +0000 (08:29 +0000)]
Merging r355743:
------------------------------------------------------------------------
r355743 | ericwf | 2019-03-08 23:06:48 +0100 (Fri, 08 Mar 2019) | 26 lines

[8.0 Regression] Fix handling of `__builtin_constant_p` inside template arguments, enumerators, case statements, and the enable_if attribute.

Summary:
The following code is accepted by Clang 7 and prior but rejected by the upcoming 8 release and in trunk [1]

```
// error {{never produces a constant expression}}
void foo(const char* s) __attribute__((enable_if(__builtin_constant_p(*s) == false, "trap"))) {}
void test() { foo("abc"); }
```

Prior to Clang 8, the call to `__builtin_constant_p` was a constant expression returning false. Currently, it's not a valid constant expression.

The bug is caused because we failed to set `InConstantContext` when attempting to evaluate unevaluated constant expressions.

[1]  https://godbolt.org/z/ksAjmq

Reviewers: rsmith, hans, sbenza

Reviewed By: rsmith

Subscribers: kristina, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D59038
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@355898 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r355489:
Hans Wennborg [Fri, 8 Mar 2019 09:27:18 +0000 (09:27 +0000)]
Merging r355489:
------------------------------------------------------------------------
r355489 | hans | 2019-03-06 10:38:04 +0100 (Wed, 06 Mar 2019) | 1 line

clang-cl: Parse /Qspectre and a few other missing options (PR40964)
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@355677 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352119:
Hans Wennborg [Fri, 8 Mar 2019 09:25:36 +0000 (09:25 +0000)]
Merging r352119:
------------------------------------------------------------------------
r352119 | rnk | 2019-01-24 23:26:51 +0100 (Thu, 24 Jan 2019) | 7 lines

[clang-cl] Ignore space-separated /AI arguments

The /AI flag is for #using directives, which I don't think we support.
This is consistent with how the /I flag is handled by MSVC.  Add a test
for it.

Differential Revision: https://reviews.llvm.org/D57189
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@355675 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r355491:
Hans Wennborg [Fri, 8 Mar 2019 09:16:31 +0000 (09:16 +0000)]
Merging r355491:
------------------------------------------------------------------------
r355491 | hans | 2019-03-06 11:26:19 +0100 (Wed, 06 Mar 2019) | 9 lines

Inline asm constraints: allow ICE-like pointers for the "n" constraint (PR40890)

Apparently GCC allows this, and there's code relying on it (see bug).

The idea is to allow expression that would have been allowed if they
were cast to int. So I based the code on how such a cast would be done
(the CK_PointerToIntegral case in IntExprEvaluator::VisitCastExpr()).

Differential Revision: https://reviews.llvm.org/D58821
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@355674 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r354937:
Hans Wennborg [Fri, 8 Mar 2019 09:09:28 +0000 (09:09 +0000)]
Merging r354937:
------------------------------------------------------------------------
r354937 | joerg | 2019-02-27 01:40:59 +0100 (Wed, 27 Feb 2019) | 9 lines

Fix inline assembler constraint validation

The current constraint logic is both too lax and too strict. It fails
for input outside the [INT_MIN..INT_MAX] range, but it also implicitly
accepts 0 as value when it should not. Adjust logic to handle both
correctly.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@355673 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReleaseNotes: tidy up
Hans Wennborg [Wed, 27 Feb 2019 14:29:40 +0000 (14:29 +0000)]
ReleaseNotes: tidy up

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354977 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRe-generate AttributeReference.rst again
Hans Wennborg [Wed, 27 Feb 2019 13:12:48 +0000 (13:12 +0000)]
Re-generate AttributeReference.rst again

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354971 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r354968:
Hans Wennborg [Wed, 27 Feb 2019 13:12:14 +0000 (13:12 +0000)]
Merging r354968:
------------------------------------------------------------------------
r354968 | hans | 2019-02-27 14:11:37 +0100 (Wed, 27 Feb 2019) | 1 line

AttrDocs.td: fix broken bullet-point indentation
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354970 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRe-generate attribute docs
Hans Wennborg [Wed, 27 Feb 2019 13:02:26 +0000 (13:02 +0000)]
Re-generate attribute docs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354967 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r354723:
Hans Wennborg [Tue, 26 Feb 2019 10:28:10 +0000 (10:28 +0000)]
Merging r354723:
------------------------------------------------------------------------
r354723 | brad | 2019-02-23 08:21:19 +0100 (Sat, 23 Feb 2019) | 3 lines

Remove OpenBSD case for old system libstdc++ header path as OpenBSD
has switched to libc++.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354859 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r354721:
Hans Wennborg [Tue, 26 Feb 2019 10:25:44 +0000 (10:25 +0000)]
Merging r354721:
------------------------------------------------------------------------
r354721 | brad | 2019-02-23 07:19:28 +0100 (Sat, 23 Feb 2019) | 4 lines

Remove sanitizer context workaround no longer necessary

The base linker is now lld.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354858 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReleaseNotes: ARM64 SEH, pointed out by David Major
Hans Wennborg [Tue, 26 Feb 2019 09:54:36 +0000 (09:54 +0000)]
ReleaseNotes: ARM64 SEH, pointed out by David Major

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354855 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRelease notes for OpenCL
Anastasia Stulova [Mon, 25 Feb 2019 17:07:58 +0000 (17:07 +0000)]
Release notes for OpenCL

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354799 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReleaseNotes: drop mention of -ftrivial-auto-var-init=zero
Hans Wennborg [Mon, 25 Feb 2019 16:06:37 +0000 (16:06 +0000)]
ReleaseNotes: drop mention of -ftrivial-auto-var-init=zero

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354794 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReleaseNotes: -ftrivial-auto-var-init
Hans Wennborg [Fri, 22 Feb 2019 08:45:10 +0000 (08:45 +0000)]
ReleaseNotes: -ftrivial-auto-var-init

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354660 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReleaseNotes: speculative load hardening; text by Kristof
Hans Wennborg [Thu, 21 Feb 2019 14:19:52 +0000 (14:19 +0000)]
ReleaseNotes: speculative load hardening; text by Kristof

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354583 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r354351:
Hans Wennborg [Wed, 20 Feb 2019 12:51:02 +0000 (12:51 +0000)]
Merging r354351:
------------------------------------------------------------------------
r354351 | hans | 2019-02-19 17:58:25 +0100 (Tue, 19 Feb 2019) | 12 lines

Remove extraneous space in MSVC-style diagnostic output

There was an extra space between the file location and the diagnostic
message:

  /tmp/a.c(1,12):  warning: unused parameter 'unused'

the tests didn't catch this due to FileCheck not running in --strict-whitespace mode.

Reported by Marco: http://lists.llvm.org/pipermail/cfe-dev/2019-February/061326.html

Differential revision: https://reviews.llvm.org/D58377
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354459 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReleaseNotes: mention the new rotation builtins, text by Sanjay
Hans Wennborg [Wed, 20 Feb 2019 11:40:19 +0000 (11:40 +0000)]
ReleaseNotes: mention the new rotation builtins, text by Sanjay

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354450 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReleaseNotes: remove in-progress warning, and minor tweaks
Hans Wennborg [Tue, 19 Feb 2019 13:53:16 +0000 (13:53 +0000)]
ReleaseNotes: remove in-progress warning, and minor tweaks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354326 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r354147:
Hans Wennborg [Mon, 18 Feb 2019 09:33:35 +0000 (09:33 +0000)]
Merging r354147:
------------------------------------------------------------------------
r354147 | jfb | 2019-02-15 18:26:29 +0100 (Fri, 15 Feb 2019) | 27 lines

Variable auto-init of blocks capturing self after init bugfix

Summary:
Blocks that capture themselves (and escape) after initialization currently codegen wrong because this:

  bool capturedByInit =
      Init && emission.IsEscapingByRef && isCapturedBy(D, Init);

  Address Loc =
      capturedByInit ? emission.Addr : emission.getObjectAddress(*this);

Already adjusts Loc from thr alloca to a GEP. This code:

    if (emission.IsEscapingByRef)
      Loc = emitBlockByrefAddress(Loc, &D, /*follow=*/false);

Was trying to do the same adjustment, and a GEP on a GEP (returning an int) triggers an assertion.

<rdar://problem/47943027>

Reviewers: ahatanak

Subscribers: jkorous, dexonsmith, cfe-commits, rjmccall

Tags: #clang

Differential Revision: https://reviews.llvm.org/D58218
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354248 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r354035:
Hans Wennborg [Mon, 18 Feb 2019 09:31:05 +0000 (09:31 +0000)]
Merging r354035:
------------------------------------------------------------------------
r354035 | brunoricci | 2019-02-14 16:43:17 +0100 (Thu, 14 Feb 2019) | 23 lines

[Sema] Fix a regression introduced in "[AST][Sema] Remove CallExpr::setNumArgs"

D54902 removed CallExpr::setNumArgs in preparation of tail-allocating the
arguments of CallExpr. It did this by allocating storage for
max(number of arguments, number of parameters in the prototype). The
temporarily nulled arguments however causes issues in BuildResolvedCallExpr
when typo correction is done just after the creation of the call expression.

This was unfortunately missed by the tests /:

To fix this, delay setting the number of arguments to
max(number of arguments, number of parameters in the prototype) until we are
ready for it. It would be nice to have this encapsulated in CallExpr but this
is the best I can come up with under the constraint that we cannot add
anything the CallExpr.

Fixes PR40286.

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

Reviewed By: aaron.ballman

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354247 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r353943:
Hans Wennborg [Fri, 15 Feb 2019 14:00:25 +0000 (14:00 +0000)]
Merging r353943:
------------------------------------------------------------------------
r353943 | baloghadamsoftware | 2019-02-13 13:25:47 +0100 (Wed, 13 Feb 2019) | 22 lines

[Analyzer] Crash fix for FindLastStoreBRVisitor

FindLastStoreBRVisitor tries to find the first node in the exploded graph where
the current value was assigned to a region. This node is called the "store
site". It is identified by a pair of Pred and Succ nodes where Succ already has
the binding for the value while Pred does not have it. However the visitor
mistakenly identifies a node pair as the store site where the value is a
`LazyCompoundVal` and `Pred` does not have a store yet but `Succ` has it. In
this case the `LazyCompoundVal` is different in the `Pred` node because it also
contains the store which is different in the two nodes. This error may lead to
crashes (a declaration is cast to a parameter declaration without check) or
misleading bug path notes.

In this patch we fix this problem by checking for unequal `LazyCompoundVals`: if
their region is equal, and their store is the same as the store of their nodes
we consider them as equal when looking for the "store site". This is an
approximation because we do not check for differences of the subvalues
(structure members or array elements) in the stores.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354130 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r354074:
Hans Wennborg [Fri, 15 Feb 2019 13:54:42 +0000 (13:54 +0000)]
Merging r354074:
------------------------------------------------------------------------
r354074 | epilk | 2019-02-14 23:48:01 +0100 (Thu, 14 Feb 2019) | 9 lines

[Sema] Fix-up a -Wfloat-conversion diagnostic

We were warning on valid ObjC property reference exprs, and passing
in the wrong arguments to DiagnoseFloatingImpCast (leading to a badly
worded diagnostic).

rdar://47644670

Differential revision: https://reviews.llvm.org/D58145
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354129 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r353976:
Hans Wennborg [Thu, 14 Feb 2019 10:47:35 +0000 (10:47 +0000)]
Merging r353976:
------------------------------------------------------------------------
r353976 | epilk | 2019-02-13 21:32:37 +0100 (Wed, 13 Feb 2019) | 11 lines

[Sema] Delay checking whether objc_designated_initializer is being applied to an init method

This fixes a regression that was caused by r335084, which reversed
the order that attributes are applied. objc_method_family can change
whether a method is an init method, so the order that these
attributes are applied matters. The commit fixes this by delaying the
init check until after all attributes have been applied.

rdar://47829358

Differential revision: https://reviews.llvm.org/D58152
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354015 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert r350404
Hans Wennborg [Wed, 13 Feb 2019 10:47:50 +0000 (10:47 +0000)]
Revert r350404

This caused https://bugs.llvm.org/show_bug.cgi?id=40642:
"After 350404, clang drops volatile load"

> Refactor the way we handle diagnosing unused expression results.
>
> Rather than sprinkle calls to DiagnoseUnusedExprResult() around in places
> where we want diagnostics, we now diagnose unused expression statements and
> full expressions in a more generic way when acting on the final expression
> statement. This results in more appropriate diagnostics for [[nodiscard]] where
> we were previously lacking them, such as when the body of a for loop is not a
> compound statement.
>
> This patch fixes PR39837.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353935 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[WebAssembly] Backport custom import name changes for clang to 8.0.
Hans Wennborg [Tue, 12 Feb 2019 12:26:10 +0000 (12:26 +0000)]
[WebAssembly] Backport custom import name changes for clang to 8.0.

Specifically, this backports r352106, r352108, r352930, and r352936
to the 8.0 branch. The trunk patches don't apply cleanly to 8.0 due to
some contemporaneous mass-rename and mass-clang-tidy patches, so
this merges them to simplify rebasing.

r352106 [WebAssembly] Add an import_module function attribute
r352108 [WebAssembly] Add WebAssemblyImportModule to pragma-attribute-supported-attributes-list.test
r352930 [WebAssembly] Add an import_field function attribute
r352936 [WebAssembly] Fix ImportName's position in this test.

By Dan Gohman!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353834 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r353656:
Hans Wennborg [Tue, 12 Feb 2019 11:19:21 +0000 (11:19 +0000)]
Merging r353656:
------------------------------------------------------------------------
r353656 | brad | 2019-02-11 03:53:16 +0100 (Mon, 11 Feb 2019) | 4 lines

long double is double on OpenBSD/NetBSD/PPC.

Patch by George Koehler.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353831 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r353402:
Hans Wennborg [Tue, 12 Feb 2019 11:12:23 +0000 (11:12 +0000)]
Merging r353402:
------------------------------------------------------------------------
r353402 | mstorsjo | 2019-02-07 13:46:49 +0100 (Thu, 07 Feb 2019) | 7 lines

[clang-cl] support /Oy- on aarch64

MSVC supports /Oy- on aarch64, so clang-cl should too.

Patch by Nathan Froyd!

Differential Revision: https://reviews.llvm.org/D57838
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353829 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r353493:
Hans Wennborg [Tue, 12 Feb 2019 11:09:24 +0000 (11:09 +0000)]
Merging r353493:
------------------------------------------------------------------------
r353493 | efriedma | 2019-02-08 02:17:49 +0100 (Fri, 08 Feb 2019) | 9 lines

[COFF, ARM64] Fix types for _ReadStatusReg, _WriteStatusReg

r344765 added those intrinsics, but used the wrong types.

Patch by Mike Hommey

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353828 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r353431:
Hans Wennborg [Tue, 12 Feb 2019 11:02:43 +0000 (11:02 +0000)]
Merging r353431:
------------------------------------------------------------------------
r353431 | stulova | 2019-02-07 18:32:37 +0100 (Thu, 07 Feb 2019) | 9 lines

[OpenCL][PR40603] In C++ preserve compatibility with OpenCL C v2.0

Valid OpenCL C code should still compile in C++ mode.

This change enables extensions and OpenCL types.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353826 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r353411:
Hans Wennborg [Tue, 12 Feb 2019 10:56:21 +0000 (10:56 +0000)]
Merging r353411:
------------------------------------------------------------------------
r353411 | erichkeane | 2019-02-07 16:14:11 +0100 (Thu, 07 Feb 2019) | 7 lines

Fix r350643 to limit COFF emission to <= 32 BYTES instead of BITS.

The patch in r350643 incorrectly sets the COFF emission based on bits
instead of bytes. This patch converts the 32 via CharUnits to bits to
compare the correct values.

Change-Id: Icf38a16470ad5ae3531374969c033557ddb0d323
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353825 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r353142:
Hans Wennborg [Tue, 12 Feb 2019 10:14:10 +0000 (10:14 +0000)]
Merging r353142:
------------------------------------------------------------------------
r353142 | ctopper | 2019-02-05 07:13:14 +0100 (Tue, 05 Feb 2019) | 13 lines

[X86] Change MS inline asm clobber list filter to check for 'fpsr' instead of 'fpsw' after D57641.

Summary: The backend used to print the x87 FPSW register as 'fpsw', but gcc inline asm uses 'fpsr'. After D57641, the backend now uses 'fpsr' to match.

Reviewers: rnk

Reviewed By: rnk

Subscribers: eraman, cfe-commits, llvm-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D57642
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353819 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r353495:
Hans Wennborg [Tue, 12 Feb 2019 08:35:38 +0000 (08:35 +0000)]
Merging r353495:
------------------------------------------------------------------------
r353495 | jfb | 2019-02-08 02:29:17 +0100 (Fri, 08 Feb 2019) | 32 lines

Variable auto-init: fix __block initialization

Summary:
Automatic initialization [1] of __block variables was trampling over the block's
headers after they'd been initialized, which caused self-init usage to crash,
such as here:

  typedef struct XYZ { void (^block)(); } *xyz_t;
  __attribute__((noinline))
  xyz_t create(void (^block)()) {
    xyz_t myself = malloc(sizeof(struct XYZ));
    myself->block = block;
    return myself;
  }
  int main() {
    __block xyz_t captured = create(^(){ (void)captured; });
  }

This type of code shouldn't be broken by variable auto-init, even if it's
sketchy.

[1] With -ftrivial-auto-var-init=pattern

<rdar://problem/47798396>

Reviewers: rjmccall, pcc, kcc

Subscribers: jkorous, dexonsmith, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D57797
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353807 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoGenerate docs/AttributeReference.rst
Hans Wennborg [Thu, 7 Feb 2019 11:16:32 +0000 (11:16 +0000)]
Generate docs/AttributeReference.rst

$ bin/clang-tblgen -gen-attr-docs -I../cfe.src/include
    ../cfe.src/include/clang/Basic/Attr.td -o
    ../cfe.src/docs/AttributeReference.rst

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353396 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRe-generate docs/ClangCommandLineReference.rst
Hans Wennborg [Thu, 7 Feb 2019 11:15:27 +0000 (11:15 +0000)]
Re-generate docs/ClangCommandLineReference.rst

$ bin/clang-tblgen -gen-opt-docs -I../cfe.src/include
    -I../cfe.src/include/clang/Driver -I../llvm.src/include
    ../cfe.src/include/clang/Driver/ClangOptionDocs.td -o
    ../cfe.src/docs/ClangCommandLineReference.rst

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353395 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r353393:
Hans Wennborg [Thu, 7 Feb 2019 11:14:24 +0000 (11:14 +0000)]
Merging r353393:
------------------------------------------------------------------------
r353393 | hans | 2019-02-07 12:13:28 +0100 (Thu, 07 Feb 2019) | 1 line

Typo: s/follwing/following
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353394 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352307:
Hans Wennborg [Mon, 4 Feb 2019 09:52:31 +0000 (09:52 +0000)]
Merging r352307:
------------------------------------------------------------------------
r352307 | void | 2019-01-27 08:24:03 +0100 (Sun, 27 Jan 2019) | 11 lines

Remove Expr sugar decorating the CXXUuidofExpr node.

Summary: Sugar, like ConstantExpr, causes an infinite expansion of the template object.

Reviewers: rsmith, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: riccibruno, aaron.ballman, cfe-commits, tzik, rnk

Differential Revision: https://reviews.llvm.org/D57114
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353031 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352463:
Hans Wennborg [Fri, 1 Feb 2019 11:13:56 +0000 (11:13 +0000)]
Merging r352463:
------------------------------------------------------------------------
r352463 | sam_parker | 2019-01-29 10:04:03 +0100 (Tue, 29 Jan 2019) | 6 lines

[AArch64] Update int64_t ACLE builtin arguments

Re-applying r351740 with fixes (changing LL to W).

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352860 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352156:
Hans Wennborg [Fri, 1 Feb 2019 11:12:06 +0000 (11:12 +0000)]
Merging r352156:
------------------------------------------------------------------------
r352156 | phosek | 2019-01-25 03:42:30 +0100 (Fri, 25 Jan 2019) | 12 lines

[AArch64] Make the test for rsr and rsr64 stricter

ACLE specifies that return type for rsr and rsr64 is uint32_t and
uint64_t respectively. D56852 change the return type of rsr64 from
unsigned long to unsigned long long which at least on Linux doesn't
match uint64_t, but the test isn't strict enough to detect that
because compiler implicitly converts unsigned long long to uint64_t,
but it breaks other uses such as printf with PRIx64 type specifier.
This change makes the test stricter enforcing that the return type
of rsr and rsr64 builtins is what is actually specified in ACLE.

Differential Revision: https://reviews.llvm.org/D57210
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352859 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352822:
Hans Wennborg [Fri, 1 Feb 2019 10:57:17 +0000 (10:57 +0000)]
Merging r352822:
------------------------------------------------------------------------
r352822 | ahatanak | 2019-02-01 01:12:06 +0100 (Fri, 01 Feb 2019) | 8 lines

Revert "[Sema] Make canPassInRegisters return true if the CXXRecordDecl passed"

This reverts commit r350920 as it is not clear whether we should force a
class to be returned in registers when copy and move constructors are
both deleted.

For more background, see the following discussion:
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190128/259907.html
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352855 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352672:
Hans Wennborg [Fri, 1 Feb 2019 10:50:43 +0000 (10:50 +0000)]
Merging r352672:
------------------------------------------------------------------------
r352672 | epilk | 2019-01-30 22:14:08 +0100 (Wed, 30 Jan 2019) | 4 lines

Don't define __has_feature(objc_fixed_enum) in non-objc mode

This is only a formal language feature in ObjC, otherwise its just an
extension. Making this change was also an ABI break.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352854 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[docs][mips] Clang 8.0 Release notes
Simon Atanasyan [Wed, 30 Jan 2019 21:19:40 +0000 (21:19 +0000)]
[docs][mips] Clang 8.0 Release notes

MIPS specific part of Clang 8.0 Release notes. Feel free to add more
notes if I miss something.

Differential Revision: http://reviews.llvm.org/D57458

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352675 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352610:
Hans Wennborg [Wed, 30 Jan 2019 19:13:49 +0000 (19:13 +0000)]
Merging r352610:
------------------------------------------------------------------------
r352610 | mgorny | 2019-01-30 09:20:24 +0100 (Wed, 30 Jan 2019) | 9 lines

[clang] [Driver] [NetBSD] Append -rpath for shared compiler-rt runtimes

Append appropriate -rpath when using shared compiler-rt runtimes,
e.g. '-fsanitize=address -shared-libasan'.  There's already a similar
logic in CommonArgs.cpp but it uses non-standard arch-suffixed
installation directory while we want our driver to work with standard
installation paths.

Differential Revision: https://reviews.llvm.org/D57303
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352650 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352539:
Hans Wennborg [Tue, 29 Jan 2019 21:30:42 +0000 (21:30 +0000)]
Merging r352539:
------------------------------------------------------------------------
r352539 | arsenm | 2019-01-29 21:49:47 +0100 (Tue, 29 Jan 2019) | 9 lines

Revert "OpenCL: Extend argument promotion rules to vector types"

This reverts r348083. This was based on a misreading of the spec
for printf specifiers.

Also revert r343653, as without a subsequent patch, a correctly
specified format for a vector will incorrectly warn.

Fixes bug 40491.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352547 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352229:
Hans Wennborg [Mon, 28 Jan 2019 14:10:30 +0000 (14:10 +0000)]
Merging r352229:
Redirecting to URL 'https://llvm.org/svn/llvm-project/cfe/trunk':
------------------------------------------------------------------------
r352229 | erichkeane | 2019-01-25 19:36:20 +0100 (Fri, 25 Jan 2019) | 7 lines

Remove F16 literal support based on Float16 support.

Float16 support was disabled recently on many platforms, however that
commit still allowed literals of Float16 type to work.  This commit
removes those based on the same logic as Float16 disable.

Change-Id: I72243048ae2db3dc47bd3d699843e3edf9c395ea
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352365 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352221 and r352222:
Hans Wennborg [Mon, 28 Jan 2019 14:07:41 +0000 (14:07 +0000)]
Merging r352221 and r352222:

------------------------------------------------------------------------
r352221 | erichkeane | 2019-01-25 18:27:57 +0100 (Fri, 25 Jan 2019) | 12 lines

Disable _Float16 for non ARM/SPIR Targets

As Discussed here:
http://lists.llvm.org/pipermail/llvm-dev/2019-January/129543.html

There are problems exposing the _Float16 type on architectures that
haven't defined the ABI/ISel for the type yet, so we're temporarily
disabling the type and making it opt-in.

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

Change-Id: I5db7366dedf1deb9485adb8948b1deb7e612a736
------------------------------------------------------------------------

------------------------------------------------------------------------
r352222 | erichkeane | 2019-01-25 18:39:57 +0100 (Fri, 25 Jan 2019) | 3 lines

Fix incorrect indent from r352221

Change-Id: I0a7b1443eb6912ef7bea1a4cf2f696fc01726557
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352363 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352105:
Hans Wennborg [Mon, 28 Jan 2019 13:54:22 +0000 (13:54 +0000)]
Merging r352105:
Redirecting to URL 'https://llvm.org/svn/llvm-project/cfe/trunk':
------------------------------------------------------------------------
r352105 | djg | 2019-01-24 22:05:11 +0100 (Thu, 24 Jan 2019) | 7 lines

[WebAssembly] Add a __wasi__ target macro

This adds a `__wasi__` macro for the wasi OS, similar to `__linux__` etc. for
other OS's.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352360 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352099:
Hans Wennborg [Mon, 28 Jan 2019 13:52:09 +0000 (13:52 +0000)]
Merging r352099:
Redirecting to URL 'https://llvm.org/svn/llvm-project/cfe/trunk':
------------------------------------------------------------------------
r352099 | djg | 2019-01-24 21:31:11 +0100 (Thu, 24 Jan 2019) | 7 lines

[WebAssembly] Factor commonality between wasm32 and wasm64 in test/Preprocessor/init.c

Use the -check-prefixes= feature to merge most of the WEBASSEMBLY32 and
WEBASSEMBLY64 test checks into a shared WEBASSEMBLY test check.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352359 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352323:
Hans Wennborg [Mon, 28 Jan 2019 13:47:09 +0000 (13:47 +0000)]
Merging r352323:
Redirecting to URL 'https://llvm.org/svn/llvm-project/cfe/trunk':
------------------------------------------------------------------------
r352323 | rakete1111 | 2019-01-27 20:19:59 +0100 (Sun, 27 Jan 2019) | 31 lines

[SemaCXX] Fix ICE with structure bindings to members of template

Summary:
Trying to use structure binding with a structure that doesn't implement
std::tuple_size, should unpack the data members. When the struct is a
template though, clang might hit an assertion (if the type has not been
completed before), because CXXRecordDecl::DefinitionData is nullptr.

This commit fixes the problem by completing the type while trying to
decompose the structured binding.

The ICE happens in real world code, for example, when trying to iterate
a protobuf generated map with a range-based for loop and structure
bindings (because google::protobuf::MapPair is a template and doesn't
support std::tuple_size).

Reported-by: nicholas.sun@nlsun.com
Patch by Daniele Di Proietto

Reviewers: #clang, rsmith

Reviewed By: #clang, rsmith

Subscribers: cpplearner, Rakete1111, cfe-commits

Tags: #clang

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352356 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352079:
Hans Wennborg [Fri, 25 Jan 2019 18:18:53 +0000 (18:18 +0000)]
Merging r352079:
------------------------------------------------------------------------
r352079 | sammccall | 2019-01-24 19:55:24 +0100 (Thu, 24 Jan 2019) | 33 lines

[FileManager] Revert r347205 to avoid PCH file-descriptor leak.

Summary:
r347205 fixed a bug in FileManager: first calling
getFile(shouldOpen=false) and then getFile(shouldOpen=true) results in
the file not being open.

Unfortunately, some code was (inadvertently?) relying on this bug: when
building with a PCH, the file entries are obtained first by passing
shouldOpen=false, and then later shouldOpen=true, without any intention
of reading them. After r347205, they do get unneccesarily opened.
Aside from extra operations, this means they need to be closed. Normally
files are closed when their contents are read. As these files are never
read, they stay open until clang exits. On platforms with a low
open-files limit (e.g. Mac), this can lead to spurious file-not-found
errors when building large projects with PCH enabled, e.g.
  https://bugs.chromium.org/p/chromium/issues/detail?id=924225

Fixing the callsites to pass shouldOpen=false when the file won't be
read is not quite trivial (that info isn't available at the direct
callsite), and passing shouldOpen=false is a performance regression (it
results in open+fstat pairs being replaced by stat+open).

So an ideal fix is going to be a little risky and we need some fix soon
(especially for the llvm 8 branch).
The problem addressed by r347205 is rare and has only been observed in
clangd. It was present in llvm-7, so we can live with it for now.

Reviewers: bkramer, thakis

Subscribers: ilya-biryukov, ioeric, kadircet, cfe-commits

Differential Revision: https://reviews.llvm.org/D57165
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352225 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r351579:
Hans Wennborg [Fri, 25 Jan 2019 00:15:41 +0000 (00:15 +0000)]
Merging r351579:
------------------------------------------------------------------------
r351579 | vstefanovic | 2019-01-18 20:54:51 +0100 (Fri, 18 Jan 2019) | 9 lines

[mips] Add '-mrelax-pic-calls', '-mno-relax-pic-calls'

These two options enable/disable emission of R_{MICRO}MIPS_JALR fixups along
with PIC calls. The linker may then try to turn PIC calls into direct jumps.
By default, these fixups do get emitted by the backend, use
'-mno-relax-pic-calls' to omit them.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352139 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352102:
Hans Wennborg [Thu, 24 Jan 2019 23:44:31 +0000 (23:44 +0000)]
Merging r352102:
------------------------------------------------------------------------
r352102 | rsmith | 2019-01-24 21:52:56 +0100 (Thu, 24 Jan 2019) | 2 lines

Add a triple to this test so it passes for targets where alignof(double)
really should be equal to alignof(float).
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352132 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r352040:
Hans Wennborg [Thu, 24 Jan 2019 22:26:09 +0000 (22:26 +0000)]
Merging r352040:
------------------------------------------------------------------------
r352040 | ibiryukov | 2019-01-24 11:41:43 +0100 (Thu, 24 Jan 2019) | 9 lines

[CodeComplete] [clangd] Fix crash on ValueDecl with a null type

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits

Differential Revision: https://reviews.llvm.org/D57093
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@352118 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r351531:
Hans Wennborg [Wed, 23 Jan 2019 16:18:07 +0000 (16:18 +0000)]
Merging r351531:
------------------------------------------------------------------------
r351531 | kadircet | 2019-01-18 10:00:31 +0100 (Fri, 18 Jan 2019) | 11 lines

[tooling] Add a new argument adjuster for deleting plugin related command line args

Summary:
Currently both clangd and clang-tidy makes use of this mechanism so
putting it into tooling so that all tools can make use of it.

Reviewers: ilya-biryukov, sammccall

Subscribers: ioeric, cfe-commits

Differential Revision: https://reviews.llvm.org/D56856
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@351961 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[docs] Add release notes for notable things I've contributed since last release
Martin Storsjo [Tue, 22 Jan 2019 20:41:51 +0000 (20:41 +0000)]
[docs] Add release notes for notable things I've contributed since last release

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@351872 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r351580:
Hans Wennborg [Tue, 22 Jan 2019 16:59:31 +0000 (16:59 +0000)]
Merging r351580:
------------------------------------------------------------------------
r351580 | kli | 2019-01-18 20:57:37 +0100 (Fri, 18 Jan 2019) | 4 lines

[OPENMP][DOCS] Release notes/OpenMP support updates, NFC.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@351839 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r351459:
Hans Wennborg [Fri, 18 Jan 2019 09:52:52 +0000 (09:52 +0000)]
Merging r351459:
------------------------------------------------------------------------
r351459 | arphaman | 2019-01-17 19:12:45 +0100 (Thu, 17 Jan 2019) | 13 lines

[ObjC] Follow-up r350768 and allow the use of unavailable methods that are
declared in a parent class from within the @implementation context

This commit extends r350768 and allows the use of methods marked as unavailable
that are declared in a parent class/category from within the @implementation of
the class where the method is marked as unavailable.
This allows users to call init that's marked as unavailable even if they don't
define it.

rdar://47134898

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@351535 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r351457:
Hans Wennborg [Fri, 18 Jan 2019 09:32:52 +0000 (09:32 +0000)]
Merging r351457:
------------------------------------------------------------------------
r351457 | vlad.tsyrklevich | 2019-01-17 18:53:45 +0100 (Thu, 17 Jan 2019) | 15 lines

TLS: Respect visibility for thread_local variables on Darwin (PR40327)

Summary:
Teach clang to mark thread wrappers for thread_local variables with
hidden visibility when the original variable is marked with hidden
visibility. This is necessary on Darwin which exposes the thread wrapper
instead of the thread variable. The thread wrapper would previously
always be created with default visibility unless it had
linkonce*/weak_odr linkage.

Reviewers: rjmccall

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D56818
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@351533 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r351344:
Hans Wennborg [Thu, 17 Jan 2019 13:31:58 +0000 (13:31 +0000)]
Merging r351344:
------------------------------------------------------------------------
r351344 | asl | 2019-01-16 14:44:01 +0100 (Wed, 16 Jan 2019) | 10 lines

[MSP430] Improve support of 'interrupt' attribute

* Accept as an argument constants in range 0..63 (aligned with TI headers and linker scripts provided with TI GCC toolchain).
* Emit function attribute 'interrupt'='xx' instead of aliases (used in the backend to create a section for particular interrupt vector).
* Add more diagnostics.

Patch by Kristina Bessonova!

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@351441 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r351340:
Hans Wennborg [Thu, 17 Jan 2019 09:24:42 +0000 (09:24 +0000)]
Merging r351340:
------------------------------------------------------------------------
r351340 | asl | 2019-01-16 14:28:30 +0100 (Wed, 16 Jan 2019) | 7 lines

[MSP430] Fix msp430-toolchain.c on Windows (added in r351228)

Patch by Kristina Bessonova!

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@351420 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r351360:
Hans Wennborg [Thu, 17 Jan 2019 09:18:40 +0000 (09:18 +0000)]
Merging r351360:
------------------------------------------------------------------------
r351360 | jmorse | 2019-01-16 18:41:29 +0100 (Wed, 16 Jan 2019) | 6 lines

Add a REQUIRES: darwin line for a mac test.

This test, apparently for macs, fails on Windows as lit can't emulate
the shell subprocess $(which...) correctly. Some other netbsd and linux
buildbots also fail here. Limit to macs as a temporary workaround.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@351419 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMerging r351334:
Hans Wennborg [Wed, 16 Jan 2019 13:42:45 +0000 (13:42 +0000)]
Merging r351334:
------------------------------------------------------------------------
r351334 | ibiryukov | 2019-01-16 14:18:59 +0100 (Wed, 16 Jan 2019) | 8 lines

Set '-target' flag in the test checking the MacOS include dir

To fix a buildbot failure on PS4, see
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/42251

The test was added in r351222 and aims to check only a particular
Mac configuration. However it relied on the default compiler target
by default, therefore unintentionally failing on PS4.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@351343 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoCreating release_80 branch off revision 351319
Hans Wennborg [Wed, 16 Jan 2019 11:00:55 +0000 (11:00 +0000)]
Creating release_80 branch off revision 351319

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@351321 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Support] Remove error return value from one overload of fs::make_absolute
Pavel Labath [Wed, 16 Jan 2019 09:55:32 +0000 (09:55 +0000)]
[Support] Remove error return value from one overload of fs::make_absolute

Summary:
The version of make_absolute which accepted a specific directory to use
as the "base" for the computation could never fail, even though it
returned a std::error_code. The reason for that seems to be historical
-- the CWD flavour (which can fail due to failure to retrieve CWD) was
there first, and the new version was implemented by extending that.

This removes the error return value from the non-CWD overload and
reimplements the CWD version on top of that. This enables us to remove
some dead code where people were pessimistically trying to handle the
errors returned from this function.

Reviewers: zturner, sammccall

Subscribers: hiraditya, kristina, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351317 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReapply [Tooling] Make clang-tool find libc++ dir on mac when running on a file witho...
Sam McCall [Wed, 16 Jan 2019 09:41:26 +0000 (09:41 +0000)]
Reapply [Tooling] Make clang-tool find libc++ dir on mac when running on a file without compilation database.

This reverts commit r351282, and re-lands r351222 and r351229 with the
use-after-free fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351316 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NewPM][TSan] Reiterate the TSan port
Philip Pfaffe [Wed, 16 Jan 2019 09:28:01 +0000 (09:28 +0000)]
[NewPM][TSan] Reiterate the TSan port

Summary:
Second iteration of D56433 which got reverted in rL350719. The problem
in the previous version was that we dropped the thunk calling the tsan init
function. The new version keeps the thunk which should appease dyld, but is not
actually OK wrt. the current semantics of function passes. Hence, add a
helper to insert the functions only on the first time. The helper
allows hooking into the insertion to be able to append them to the
global ctors list.

Reviewers: chandlerc, vitalybuka, fedor.sergeev, leonardchan

Subscribers: hiraditya, bollu, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351314 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoUsersManual.rst: Update the clang-cl flags section
Hans Wennborg [Wed, 16 Jan 2019 09:13:47 +0000 (09:13 +0000)]
UsersManual.rst: Update the clang-cl flags section

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351312 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[test] Disable Python binding tests w/ LLVM_ENABLE_PIC=OFF
Michal Gorny [Wed, 16 Jan 2019 08:05:13 +0000 (08:05 +0000)]
[test] Disable Python binding tests w/ LLVM_ENABLE_PIC=OFF

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351304 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SEH] Pass the frame pointer from SEH finally to finally functions
Sanjin Sijaric [Wed, 16 Jan 2019 07:39:44 +0000 (07:39 +0000)]
[SEH] Pass the frame pointer from SEH finally to finally functions

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351302 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Correct the type string for __builtin_ia32_gathersiv16sf to make the indices...
Craig Topper [Wed, 16 Jan 2019 07:17:14 +0000 (07:17 +0000)]
[X86] Correct the type string for __builtin_ia32_gathersiv16sf to make the 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351301 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[WebAssembly] COWS has been renamed to WASI.
Dan Gohman [Wed, 16 Jan 2019 05:23:57 +0000 (05:23 +0000)]
[WebAssembly] COWS has been renamed to WASI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351298 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03
Eric Fiselier [Wed, 16 Jan 2019 02:34:36 +0000 (02:34 +0000)]
[SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351294 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfp
Eli Friedman [Wed, 16 Jan 2019 00:50:44 +0000 (00:50 +0000)]
[EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfp

This is the clang counterpart to D56747.

Patch by Mandeep Singh Grang.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351284 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[Tooling] Make clang-tool find libc++ dir on mac when running on a file witho...
Vlad Tsyrklevich [Wed, 16 Jan 2019 00:37:39 +0000 (00:37 +0000)]
Revert "[Tooling] Make clang-tool find libc++ dir on mac when running on a file without compilation database."

This reverts commits r351222 and r351229, they were causing ASan/MSan failures
on the sanitizer bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351282 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRe-order type param children of ObjC nodes
Stephen Kelly [Tue, 15 Jan 2019 23:07:30 +0000 (23:07 +0000)]
Re-order type param children of ObjC nodes

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351272 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoNFC: Some cleanups that I missed in the previous commit
Stephen Kelly [Tue, 15 Jan 2019 23:05:11 +0000 (23:05 +0000)]
NFC: Some cleanups that I missed in the previous commit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351271 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRe-order overrides in FunctionDecl dump
Stephen Kelly [Tue, 15 Jan 2019 22:50:37 +0000 (22:50 +0000)]
Re-order overrides in FunctionDecl dump

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351269 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoNFC: Replace iterator loop with cxx_range_for
Stephen Kelly [Tue, 15 Jan 2019 22:45:46 +0000 (22:45 +0000)]
NFC: Replace iterator loop with cxx_range_for

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351268 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[clang-cl] Alias /Zc:alignedNew[-] to -f[no-]aligned-allocation
Reid Kleckner [Tue, 15 Jan 2019 21:24:55 +0000 (21:24 +0000)]
[clang-cl] Alias /Zc:alignedNew[-] to -f[no-]aligned-allocation

Implements PR40180.

clang-cl has one minor behavior difference with cl with this change.
Clang allows the user to enable the C++17 feature of aligned allocation
without enabling all of C++17, but MSVC will not call the aligned
allocation overloads unless -std:c++17 is passed. While our behavior is
technically incompatible, it would require making driver mode specific
changes to match MSVC precisely, and clang's behavior is useful because
it allows people to experiment with new C++17 features individually.
Therefore, I plan to leave it as is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351249 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoEnable IAS for OpenBSD SPARC.
Brad Smith [Tue, 15 Jan 2019 21:04:36 +0000 (21:04 +0000)]
Enable IAS for OpenBSD SPARC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351245 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoCodeGen: Remove debug printf unintentionally added in r351228.
Peter Collingbourne [Tue, 15 Jan 2019 20:59:59 +0000 (20:59 +0000)]
CodeGen: Remove debug printf unintentionally added in r351228.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351241 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoImplement BlockDecl::Capture dump in terms of visitors
Stephen Kelly [Tue, 15 Jan 2019 20:41:37 +0000 (20:41 +0000)]
Implement BlockDecl::Capture dump in terms of visitors

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351239 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoNFC: Implement OMPClause dump in terms of visitors
Stephen Kelly [Tue, 15 Jan 2019 20:31:31 +0000 (20:31 +0000)]
NFC: Implement OMPClause dump in terms of visitors

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351236 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoImplement CXXCtorInitializer dump in terms of Visitor
Stephen Kelly [Tue, 15 Jan 2019 20:17:33 +0000 (20:17 +0000)]
Implement CXXCtorInitializer dump in terms of Visitor

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351235 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MSVC Compat] Fix typo correction for inclusion directives.
Volodymyr Sapsai [Tue, 15 Jan 2019 20:08:23 +0000 (20:08 +0000)]
[MSVC Compat] Fix typo correction for inclusion directives.

In MSVC compatibility mode we were checking not the typo corrected
filename but the original filename.

Reviewers: christylee, compnerd

Reviewed By: christylee

Subscribers: jkorous, dexonsmith, sammccall, hokein, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351232 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Nios2] Remove Nios2 backend
Craig Topper [Tue, 15 Jan 2019 19:58:36 +0000 (19:58 +0000)]
[Nios2] Remove Nios2 backend

As mentioned here http://lists.llvm.org/pipermail/llvm-dev/2019-January/129121.html This backend is incomplete and has not been maintained in several months.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351230 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Tooling] Fix broken compliation databse tests.
Haojian Wu [Tue, 15 Jan 2019 19:51:39 +0000 (19:51 +0000)]
[Tooling] Fix broken compliation databse tests.

I forgot to update the unittest in r351222.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351229 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MSP430] Provide a toolchain description
Anton Korobeynikov [Tue, 15 Jan 2019 19:44:05 +0000 (19:44 +0000)]
[MSP430] Provide a toolchain description

This is an initial implementation for msp430 toolchain including
-mmcu option support
-mhwmult options support
-integrated-as by default

The toolchain uses msp430-elf-as as a linker and supports msp430-gcc toolchain tree.

Patch by Kristina Bessonova!

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351228 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Tooling] Make clang-tool find libc++ dir on mac when running on a file without compi...
Haojian Wu [Tue, 15 Jan 2019 19:05:50 +0000 (19:05 +0000)]
[Tooling] Make clang-tool find libc++ dir on mac when running on a file without compilation database.

Summary:
This is a regression of r348365.

When clang-tools run on a file without a complation database (`clang-check /tmp/t.cc`),
we will use fixed compilation database as a fallback. However the actual compiler
path in the fallback complation command is just `clang-tool` which is
insufficient to detect the libc++ dir.

Reviewers: ilya-biryukov, EricWF

Reviewed By: ilya-biryukov

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351222 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Solaris] Move enabling IAS for SPARC from the Solaris toolchain to Generic_GCC.
Brad Smith [Tue, 15 Jan 2019 18:24:03 +0000 (18:24 +0000)]
[Solaris] Move enabling IAS for SPARC from the Solaris toolchain to Generic_GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351217 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix cpu-dispatch MV regression caused by r347812
Erich Keane [Tue, 15 Jan 2019 17:51:09 +0000 (17:51 +0000)]
Fix cpu-dispatch MV regression caused by r347812

r347812 permitted forward declarations for cpu-dispatch functions, which
are occassionally useful as exposition in  header files.  However, this inadvertently
permitted this function to become multiversioned after a usage.  This
patch ensures that the "CausesMV" checks are still run in the
forward-declaration case.

Change-Id: Icb6f975a2d068f088b89e3bbe26cf1d24f5a972c

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351212 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[X86] Make _xgetbv/_xsetbv on non-windows platforms"
Benjamin Kramer [Tue, 15 Jan 2019 17:23:36 +0000 (17:23 +0000)]
Revert "[X86] Make _xgetbv/_xsetbv on non-windows platforms"

This reverts commit r351160. Breaks building v8.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351210 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "Correct the source range returned from preprocessor callbacks."
Benjamin Kramer [Tue, 15 Jan 2019 17:20:05 +0000 (17:20 +0000)]
Revert "Correct the source range returned from preprocessor callbacks."

This reverts commit r350891. Also add a test case that would return an
empty string with r350891.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351209 91177308-0d34-0410-b5e6-96231b3b80d8