]> granicus.if.org Git - clang/log
clang
5 years agoTLS: Respect visibility for thread_local variables on Darwin (PR40327)
Vlad Tsyrklevich [Thu, 17 Jan 2019 17:53:45 +0000 (17:53 +0000)]
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/trunk@351457 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoCodeGen: Cast llvm.flt.rounds result to match __builtin_flt_rounds
Anton Korobeynikov [Thu, 17 Jan 2019 15:21:55 +0000 (15:21 +0000)]
CodeGen: Cast llvm.flt.rounds result to match __builtin_flt_rounds

llvm.flt.rounds returns an i32, but the builtin expects an integer.
On targets where integers are not 32-bits clang tries to bitcast the result, causing an assertion failure.

The patch enables newlib build for msp430.

Patch by Edward Jones!

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

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

5 years ago[NewPM] Add -fsanitize={memory,thread} handling to clang
Philip Pfaffe [Thu, 17 Jan 2019 10:10:47 +0000 (10:10 +0000)]
[NewPM] Add -fsanitize={memory,thread} handling to clang

Summary: This is the missing bit to drive thread and memory sanitizers through clang using the new PassManager.

Reviewers: chandlerc, fedor.sergeev, vitalybuka, leonardchan

Subscribers: bollu, llvm-commits

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

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

5 years ago[CMake][Fuchsia] Disable modules for the second stage build
Petr Hosek [Thu, 17 Jan 2019 04:12:30 +0000 (04:12 +0000)]
[CMake][Fuchsia] Disable modules for the second stage build

This made the toolchain build 50% slower.

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

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

5 years ago[X86] Add custom emission for the avx512 scatter builtins to convert from scalar...
Craig Topper [Thu, 17 Jan 2019 00:34:19 +0000 (00:34 +0000)]
[X86] Add custom emission for the avx512 scatter builtins to convert from scalar integer to vXi1 for the mask arguments to the intrinsics.

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

5 years ago[Frontend] Make WrapperFrontendAction call WrappedAction.PrepareToExecuteAction.
Volodymyr Sapsai [Thu, 17 Jan 2019 00:20:43 +0000 (00:20 +0000)]
[Frontend] Make WrapperFrontendAction call WrappedAction.PrepareToExecuteAction.

Fixes `-emit-header-module` when GenerateHeaderModuleAction is wrapped
by another frontend action.

rdar://problem/47302588

Reviewers: rsmith, arphaman

Reviewed By: arphaman

Subscribers: jkorous, dexonsmith, cfe-commits

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

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

5 years ago[analyzer] Another RetainCountChecker cleanup
George Karpenkov [Wed, 16 Jan 2019 23:21:38 +0000 (23:21 +0000)]
[analyzer] Another RetainCountChecker cleanup

This is not NFC strictly speaking, since it unifies CleanupAttr handling,
so that out parameters now also understand it.

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

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

5 years ago[analyzer] [NFC] Yet another minor cleanup of RetainCountChecker
George Karpenkov [Wed, 16 Jan 2019 23:21:15 +0000 (23:21 +0000)]
[analyzer] [NFC] Yet another minor cleanup of RetainCountChecker

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

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

5 years agoRecommit r351160 "[X86] Make _xgetbv/_xsetbv on non-windows platforms"
Craig Topper [Wed, 16 Jan 2019 22:56:25 +0000 (22:56 +0000)]
Recommit r351160 "[X86] Make _xgetbv/_xsetbv on non-windows platforms"

V8 has been fixed now.

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

5 years ago[X86] Add versions of the avx512 gather intrinsics that take the mask as a vXi1 vecto...
Craig Topper [Wed, 16 Jan 2019 22:34:33 +0000 (22:34 +0000)]
[X86] Add versions of the avx512 gather intrinsics that take the mask as a vXi1 vector instead of a scalar

We need to custom handle these so we can turn the scalar mask into a vXi1 vector.

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

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

5 years agoFix libc++ mac driver test to pass on Windows
Reid Kleckner [Wed, 16 Jan 2019 22:05:34 +0000 (22:05 +0000)]
Fix libc++ mac driver test to pass on Windows

There is a substitution for 'clang-check' to absolutize it, so the
'$(which clang-check)' is unnecessary.

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

5 years agoPR40329: [adl] Fix determination of associated classes when searching a
Richard Smith [Wed, 16 Jan 2019 22:01:39 +0000 (22:01 +0000)]
PR40329: [adl] Fix determination of associated classes when searching a
member enum and then its enclosing class.

There are situations where ADL will collect a class but not the complete
set of associated classes / namespaces of that class. When that
happened, and we later tried to collect those associated classes /
namespaces, we would previously short-circuit the lookup and not find
them. Eg, for:

  struct A : B { enum E; };

if we first looked for associated classes/namespaces of A::E, we'd find
only A. But if we then tried to also collect associated
classes/namespaces of A (which should include the base class B), we
would not add B because we had already visited A.

This also fixes a minor issue where we would fail to collect associated
classes from an overloaded class member access expression naming a
static member function.

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

5 years ago[Fixed Point Arithmetic] Fixed Point Subtraction
Leonard Chan [Wed, 16 Jan 2019 19:53:50 +0000 (19:53 +0000)]
[Fixed Point Arithmetic] Fixed Point Subtraction

This patch covers subtraction between fixed point types and other fixed point
types or integers, using the conversion rules described in 4.1.4 of N1169.

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

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

5 years ago[Fixed Point Arithmetic] Add APFixedPoint to APValue
Leonard Chan [Wed, 16 Jan 2019 18:53:05 +0000 (18:53 +0000)]
[Fixed Point Arithmetic] Add APFixedPoint to APValue

This adds APFixedPoint to the union of values that can be represented with an APValue.

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

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

5 years ago[Fixed Point Arithmetic] Fixed Point Addition
Leonard Chan [Wed, 16 Jan 2019 18:13:59 +0000 (18:13 +0000)]
[Fixed Point Arithmetic] Fixed Point Addition

This patch covers addition between fixed point types and other fixed point
types or integers, using the conversion rules described in 4.1.4 of N1169.

Usual arithmetic rules do not apply to binary operations when one of the
operands is a fixed point type, and the result of the operation must be
calculated with the full precision of the operands, so we should not perform
any casting to a common type.

This patch does not include constant expression evaluation for addition of
fixed point types. That will be addressed in another patch since I think this
one is already big enough.

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

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

5 years agoAdd a REQUIRES: darwin line for a mac test.
Jeremy Morse [Wed, 16 Jan 2019 17:41:29 +0000 (17:41 +0000)]
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/trunk@351360 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdded test cases for dumping variadic-like functions; NFC.
Aaron Ballman [Wed, 16 Jan 2019 16:12:30 +0000 (16:12 +0000)]
Added test cases for dumping variadic-like functions; NFC.

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

5 years agoAdded a test case for dumping blocks that capture 'this'; NFC.
Aaron Ballman [Wed, 16 Jan 2019 15:40:23 +0000 (15:40 +0000)]
Added a test case for dumping blocks that capture 'this'; NFC.

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

5 years ago[MSP430] Improve support of 'interrupt' attribute
Anton Korobeynikov [Wed, 16 Jan 2019 13:44:01 +0000 (13:44 +0000)]
[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/trunk@351344 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MSP430] Fix msp430-toolchain.c on Windows (added in r351228)
Anton Korobeynikov [Wed, 16 Jan 2019 13:28:30 +0000 (13:28 +0000)]
[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/trunk@351340 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoSet '-target' flag in the test checking the MacOS include dir
Ilya Biryukov [Wed, 16 Jan 2019 13:18:59 +0000 (13:18 +0000)]
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/trunk@351334 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoBump the trunk version to 9.0.0svn
Hans Wennborg [Wed, 16 Jan 2019 10:57:02 +0000 (10:57 +0000)]
Bump the trunk version to 9.0.0svn

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351320 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

5 years agoRemove irrelevant references to legacy git repositories from
James Y Knight [Tue, 15 Jan 2019 16:18:52 +0000 (16:18 +0000)]
Remove irrelevant references to legacy git repositories from
compiler identification lines in test-cases.

(Doing so only because it's then easier to search for references which
are actually important and need fixing.)

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

5 years agoReduce ASTMatchers stack footprint. Addresses http://llvm.org/PR38851
Alexander Kornienko [Tue, 15 Jan 2019 15:34:26 +0000 (15:34 +0000)]
Reduce ASTMatchers stack footprint. Addresses http://llvm.org/PR38851

The BoundNodesTreeBuilder class is used both directly and indirectly as a local
variable in matchesAncestorOfRecursively, memoizedMatchesAncestorOfRecursively
and other functions that happen to be on long recursive call paths. By reducing
the inline storage size of the SmallVector we dramatically reduce the stack
requirements of ASTMatchers. Running clang-tidy with a large number of checks
enabled on a few arbitrarily chosen files show no performance regression.

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

5 years agoUpdate year in license files
Hans Wennborg [Tue, 15 Jan 2019 15:10:32 +0000 (15:10 +0000)]
Update year in license files

In last year's update (D48219) it was suggested that the release manager
might want to do this, so here we go.

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

5 years ago[OpenCL] opencl-c.h: read_image*(): sampler-less, and image{1,2}d_array_t variants...
Roman Lebedev [Tue, 15 Jan 2019 11:20:02 +0000 (11:20 +0000)]
[OpenCL] opencl-c.h: read_image*(): sampler-less, and image{1,2}d_array_t variants are OpenCL-1.2+, mark them as such

Summary:
Refer to [[ https://www.khronos.org/registry/OpenCL/specs/opencl-1.1.pdf#page=242 | `6.11.13.2 Built-in Image Functions` ]],
and [[ https://www.khronos.org/registry/OpenCL/specs/opencl-1.1.pdf#page=306 | `9.6.8 Image Read and Write Functions` ]] of the OpenCL 1.1 spec.

* There is no mention of `image1d_array_t` and `image2d_array_t` anywhere in the OpenCL 1.1 spec.
* All the `read_image{f,i,ui,h}()` functions, as of OpenCL 1.1 spec, have a second required parameter `sampler_t sampler`

Should have prevented the following regression:
https://redmine.darktable.org/issues/12493

Reviewers: yaxunl, Anastasia, echuraev, asavonic

Reviewed By: Anastasia

Subscribers: cfe-commits

Tags: #clang

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

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

5 years ago[clang][UBSan] Sanitization for alignment assumptions.
Roman Lebedev [Tue, 15 Jan 2019 09:44:25 +0000 (09:44 +0000)]
[clang][UBSan] Sanitization for alignment assumptions.

Summary:
UB isn't nice. It's cool and powerful, but not nice.
Having a way to detect it is nice though.
[[ https://wg21.link/p1007r3 | P1007R3: std::assume_aligned ]] / http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1007r2.pdf says:
```
We propose to add this functionality via a library function instead of a core language attribute.
...
If the pointer passed in is not aligned to at least N bytes, calling assume_aligned results in undefined behaviour.
```

This differential teaches clang to sanitize all the various variants of this assume-aligned attribute.

Requires D54588 for LLVM IRBuilder changes.
The compiler-rt part is D54590.

This is a second commit, the original one was r351105,
which was mass-reverted in r351159 because 2 compiler-rt tests were failing.

Reviewers: ABataev, craig.topper, vsk, rsmith, rnk, #sanitizers, erichkeane, filcab, rjmccall

Reviewed By: rjmccall

Subscribers: chandlerc, ldionne, EricWF, mclow.lists, cfe-commits, bkramer

Tags: #sanitizers

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

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

5 years agoNFC: Move Decl node handling to TextNodeDumper
Stephen Kelly [Tue, 15 Jan 2019 09:35:52 +0000 (09:35 +0000)]
NFC: Move Decl node handling to TextNodeDumper

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

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

5 years ago[ASTDump] NFC: Move dump of type nodes to NodeDumper
Stephen Kelly [Tue, 15 Jan 2019 09:30:00 +0000 (09:30 +0000)]
[ASTDump] NFC: Move dump of type nodes to NodeDumper

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

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

5 years ago[WebAssembly] Support multilibs for wasm32 and add a wasm OS that uses it
Dan Gohman [Tue, 15 Jan 2019 06:58:16 +0000 (06:58 +0000)]
[WebAssembly] Support multilibs for wasm32 and add a wasm OS that uses it

This adds support for multilib paths for wasm32 targets, following
[Debian's Multiarch conventions], and also adds an experimental OS name in
order to test it.

[Debian's Multiarch conventions]: https://wiki.debian.org/Multiarch/

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

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

5 years ago[X86] Make _xgetbv/_xsetbv on non-windows platforms
Craig Topper [Tue, 15 Jan 2019 05:03:18 +0000 (05:03 +0000)]
[X86] Make _xgetbv/_xsetbv on non-windows platforms

Summary:
This patch attempts to redo what was tried in r278783, but was reverted.

These intrinsics should be available on non-windows platforms with "xsave" feature check. But on Windows platforms they shouldn't have feature check since that's how MSVC behaves.

To accomplish this I've added a MS builtin with no feature check. And a normal gcc builtin with a feature check. When _MSC_VER is not defined _xgetbv/_xsetbv will be macros pointing to the gcc builtin name.

I've moved the forward declarations from intrin.h to immintrin.h to match the MSDN documentation and used that as the header file for the MS builtin.

I'm not super happy with this implementation, and I'm open to suggestions for better ways to do it.

Reviewers: rnk, RKSimon, spatel

Reviewed By: rnk

Subscribers: cfe-commits

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

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

5 years agoRevert alignment assumptions changes
Vlad Tsyrklevich [Tue, 15 Jan 2019 03:38:02 +0000 (03:38 +0000)]
Revert alignment assumptions changes

Revert r351104-6, r351109, r351110, r351119, r351134, and r351153. These
changes fail on the sanitizer bots.

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

5 years ago[COFF, ARM64] Add __byteswap intrinsics
Mandeep Singh Grang [Tue, 15 Jan 2019 01:26:26 +0000 (01:26 +0000)]
[COFF, ARM64] Add __byteswap intrinsics

Reviewers: rnk, efriedma, ssijaric, TomTan, haripul

Reviewed By: efriedma

Subscribers: javed.absar, cfe-commits, kristof.beyls

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

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

5 years ago[CMake][Fuchsia] Synchronize first and second stage builds
Petr Hosek [Tue, 15 Jan 2019 01:15:00 +0000 (01:15 +0000)]
[CMake][Fuchsia] Synchronize first and second stage builds

This reorders options between the first and second stage builds to make
them better lined up. The change also re-enables tests for first stage
which is useful e.g. for cross-compiling when we cannot run tests for
second stage directly (i.e. without emulation).

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

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

5 years ago[Sema] Change std::sort to llvm::sort
Mandeep Singh Grang [Mon, 14 Jan 2019 23:45:58 +0000 (23:45 +0000)]
[Sema] Change std::sort to llvm::sort

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

5 years ago[COFF, ARM64] Add __nop intrinsic
Mandeep Singh Grang [Mon, 14 Jan 2019 23:26:01 +0000 (23:26 +0000)]
[COFF, ARM64] Add __nop intrinsic

Reviewers: rnk, efriedma, TomTan, haripul, ssijaric

Reviewed By: rnk, efriedma

Subscribers: javed.absar, kristof.beyls, cfe-commits

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

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

5 years ago[ASTDump] NFC: Move dumping of QualType node to TextNodeDumper
Stephen Kelly [Mon, 14 Jan 2019 20:15:29 +0000 (20:15 +0000)]
[ASTDump] NFC: Move dumping of QualType node to TextNodeDumper

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

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

5 years ago[ASTDump] NFC: Canonicalize handling of TypeLocInfo
Stephen Kelly [Mon, 14 Jan 2019 20:13:09 +0000 (20:13 +0000)]
[ASTDump] NFC: Canonicalize handling of TypeLocInfo

Summary: No need to avoid the Visit method.

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

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

5 years ago[ASTDump] NFC: Move Type Visit implementation to TextNodeDumper
Stephen Kelly [Mon, 14 Jan 2019 20:11:02 +0000 (20:11 +0000)]
[ASTDump] NFC: Move Type Visit implementation to TextNodeDumper

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

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

5 years agoNFC: Fix nits I missed before
Stephen Kelly [Mon, 14 Jan 2019 19:50:34 +0000 (19:50 +0000)]
NFC: Fix nits I missed before

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

5 years agoImprove a -Wunguarded-availability note
Erik Pilkington [Mon, 14 Jan 2019 19:17:31 +0000 (19:17 +0000)]
Improve a -Wunguarded-availability note

Mention the deployment target, and don't say "partial" which doesn't
really mean anything to users.

rdar://problem/33601513

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

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

5 years ago[clang][UBSan] Sanitization for alignment assumptions.
Roman Lebedev [Mon, 14 Jan 2019 19:09:27 +0000 (19:09 +0000)]
[clang][UBSan] Sanitization for alignment assumptions.

Summary:
UB isn't nice. It's cool and powerful, but not nice.
Having a way to detect it is nice though.
[[ https://wg21.link/p1007r3 | P1007R3: std::assume_aligned ]] / http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1007r2.pdf says:
```
We propose to add this functionality via a library function instead of a core language attribute.
...
If the pointer passed in is not aligned to at least N bytes, calling assume_aligned results in undefined behaviour.
```

This differential teaches clang to sanitize all the various variants of this assume-aligned attribute.

Requires D54588 for LLVM IRBuilder changes.
The compiler-rt part is D54590.

Reviewers: ABataev, craig.topper, vsk, rsmith, rnk, #sanitizers, erichkeane, filcab, rjmccall

Reviewed By: rjmccall

Subscribers: chandlerc, ldionne, EricWF, mclow.lists, cfe-commits, bkramer

Tags: #sanitizers

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

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

5 years ago[analyzer] [PR39792] false positive on strcpy targeting struct members
George Karpenkov [Mon, 14 Jan 2019 18:54:48 +0000 (18:54 +0000)]
[analyzer] [PR39792] false positive on strcpy targeting struct members

Patch by Pierre van Houtryve.

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

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

5 years ago[analyzer] [NFC] Remove unused undefined method.
George Karpenkov [Mon, 14 Jan 2019 18:54:35 +0000 (18:54 +0000)]
[analyzer] [NFC] Remove unused undefined method.

Wow, at no point the linker or compiler complaints about that!

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

5 years ago[WebAssembly] Remove old builtins
Dan Gohman [Mon, 14 Jan 2019 18:28:10 +0000 (18:28 +0000)]
[WebAssembly] Remove old builtins

This removes the old grow_memory and mem.grow-style builtins, leaving just
the memory.grow-style builtins.

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

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

5 years ago[Sema] Expose a control flag for integer to pointer ext warning
Kristina Brooks [Mon, 14 Jan 2019 18:16:51 +0000 (18:16 +0000)]
[Sema] Expose a control flag for integer to pointer ext warning

While building openJDK11u, it seems that some of the code in the
native core libraries make liberal use of integer to pointer
comparisons. We currently have no flag to disabled this warning.
This add such a flag.

Patch by Kader (abdoul-kader keita)

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

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

5 years ago[AST] Fix double-traversal of code in top-level lambdas in RAV(implicit = yes).
Sam McCall [Mon, 14 Jan 2019 17:16:00 +0000 (17:16 +0000)]
[AST] Fix double-traversal of code in top-level lambdas in RAV(implicit = yes).

Summary:
Prior to r351069, lambda classes were traversed or not depending on the
{Function, Class, Namespace, TU} DeclContext containing them.
If it was a function (common case) they were not traversed.
If it was a namespace or TU (top-level lambda) they were traversed as part of
that DeclContext traversal.

r351069 "fixed" RAV to traverse these as part of the LambdaExpr, which is the
right place. But top-level lambdas are now traversed twice.
We fix that as blocks and block captures were apparently fixed in the past.

Maybe it would be nicer to avoid adding the lambda classes to the DeclContext
in the first place, but I can't work out the implications of that.

Reviewers: bkramer, klimek

Subscribers: cfe-commits

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

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

5 years agoclang-cl: Fix help text for /O<flags>: '/O2y-' means '/O2 /Oy-', not '/O2 /y-'
Nico Weber [Mon, 14 Jan 2019 12:42:35 +0000 (12:42 +0000)]
clang-cl: Fix help text for /O<flags>: '/O2y-' means '/O2 /Oy-', not '/O2 /y-'

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

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

5 years agoclang-cl: Align help texts for /O1 and O2
Nico Weber [Mon, 14 Jan 2019 12:41:13 +0000 (12:41 +0000)]
clang-cl: Align help texts for /O1 and O2

Makes it a bit easier to see what exactly the difference is.

Also use "same as" instead of "equivalent to", because that's faster to read.

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

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

5 years ago[OpenCL] Set generic addr space of 'this' in special class members.
Anastasia Stulova [Mon, 14 Jan 2019 11:44:22 +0000 (11:44 +0000)]
[OpenCL] Set generic addr space of 'this' in special class members.

Set address spaces of 'this' param correctly for implicit special
class members.

This also changes initialization conversion sequence to separate
address space conversion from other qualifiers in case of binding
reference to a temporary. In this case address space conversion
should happen after the binding (unlike for other quals). This is
needed to materialize it correctly in the alloca address space.

Initial patch by Mikael Nilssoni!

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

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

5 years ago[AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.
Sam McCall [Mon, 14 Jan 2019 10:31:42 +0000 (10:31 +0000)]
[AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

Summary:
This fixes ASTContext's parent map for nodes in such classes (e.g. operator()).
https://bugs.llvm.org/show_bug.cgi?id=39949

This also changes the observed shape of the AST for implicit RAVs.
- this includes AST MatchFinder: cxxRecordDecl() now matches lambda classes,
functionDecl() matches the call operator, and the parent chain is body -> call
operator -> lambda class -> lambdaexpr rather than body -> lambdaexpr.
- this appears not to matter for the ASTImporterLookupTable builder
- this doesn't matter for the other RAVs in-tree.

In order to do this, we remove the TraverseLambdaBody hook. The problem is it's
hard/weird to ensure this hook is called when traversing via the implicit class.
There were just two users of this hook in-tree, who use it to skip bodies.
I replaced these with explicitly traversing the captures only. Another approach
would be recording the bodies when the lambda is visited, and then recognizing
them later.
I'd be open to suggestion on how to preserve this hook, instead.

Reviewers: aaron.ballman, JonasToth

Subscribers: cfe-commits, rsmith, jdennett

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

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

5 years ago[X86] Remove mask parameter from avx512 pmultishiftqb intrinsics. Use select in IR...
Craig Topper [Mon, 14 Jan 2019 08:46:51 +0000 (08:46 +0000)]
[X86] Remove mask parameter from avx512 pmultishiftqb intrinsics. Use select in IR instead.

Fixes PR40259

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

5 years ago[X86] Remove mask parameter from vpshufbitqmb intrinsics. Change result to a vXi1...
Craig Topper [Mon, 14 Jan 2019 00:03:55 +0000 (00:03 +0000)]
[X86] Remove mask parameter from vpshufbitqmb intrinsics. Change result to a vXi1 vector.

We'll do the scalar<->vXi1 conversions with bitcasts in IR.

Fixes PR40258

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

5 years agoNFC: Make utility private
Stephen Kelly [Sat, 12 Jan 2019 17:07:05 +0000 (17:07 +0000)]
NFC: Make utility private

No callers are external to the class anymore.

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

5 years ago[ASTDump] NFC: Move dump of individual Stmts to TextNodeDumper
Stephen Kelly [Sat, 12 Jan 2019 16:53:27 +0000 (16:53 +0000)]
[ASTDump] NFC: Move dump of individual Stmts to TextNodeDumper

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

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

5 years agoImplement TemplateArgument dumping in terms of Visitor
Stephen Kelly [Sat, 12 Jan 2019 16:35:37 +0000 (16:35 +0000)]
Implement TemplateArgument dumping in terms of Visitor

Summary: Split the output streaming from the traversal to other AST nodes.

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

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

5 years ago[ASTDump] Change parameter to StringRef
Stephen Kelly [Sat, 12 Jan 2019 15:45:05 +0000 (15:45 +0000)]
[ASTDump] Change parameter to StringRef

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

5 years ago[analyzer] Fix unused variable warnings in Release builds
Benjamin Kramer [Sat, 12 Jan 2019 12:43:53 +0000 (12:43 +0000)]
[analyzer] Fix unused variable warnings in Release builds

This was just an inlined version of isa<CXXConstructExpr>. NFC.

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

5 years ago[NetBSD] Enable additional sanitizer types
Michal Gorny [Sat, 12 Jan 2019 11:18:35 +0000 (11:18 +0000)]
[NetBSD] Enable additional sanitizer types

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

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

5 years agoNFC: Port loop to cxx_range_for
Stephen Kelly [Sat, 12 Jan 2019 00:42:59 +0000 (00:42 +0000)]
NFC: Port loop to cxx_range_for

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

5 years ago[analyzer] Support for OSObjects out parameters in RetainCountChecker
George Karpenkov [Fri, 11 Jan 2019 23:35:17 +0000 (23:35 +0000)]
[analyzer] Support for OSObjects out parameters in RetainCountChecker

rdar://46357478
rdar://47121327

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

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

5 years ago[analyzer] Introduce a convenience method for getting a CallEvent from an arbitrary...
George Karpenkov [Fri, 11 Jan 2019 23:35:04 +0000 (23:35 +0000)]
[analyzer] Introduce a convenience method for getting a CallEvent from an arbitrary Stmt

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

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

5 years ago[Darwin][Driver] Don't pass a file as object_path_lto during ThinLTO
Steven Wu [Fri, 11 Jan 2019 21:16:04 +0000 (21:16 +0000)]
[Darwin][Driver] Don't pass a file as object_path_lto during ThinLTO

Summary:
After r327851, Driver::GetTemporaryPath will create the file rather than
just create a potientially unqine filename. If clang driver pass the
file as parameter as -object_path_lto, ld64 will pass it back to libLTO
as GeneratedObjectsDirectory, which is going to cause a LLVM ERROR if it
is not a directory.
Now during thinLTO, pass a temp directory path to linker instread.

rdar://problem/47194182

Reviewers: arphaman, dexonsmith

Reviewed By: arphaman

Subscribers: mehdi_amini, inglorion, jkorous, cfe-commits

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

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

5 years agoImplement Attr dumping in terms of visitors
Stephen Kelly [Fri, 11 Jan 2019 19:16:01 +0000 (19:16 +0000)]
Implement Attr dumping in terms of visitors

Remove now-vestigial dumpType and dumpBareDeclRef methods. The old
tablegen generated code used to expect them to be present, but the new
generated code has no such requirement.

Reviewers: aaron.ballman

Subscribers: mgorny, cfe-commits

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

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

5 years ago[ASTDump] Add utility for dumping a label with child nodes
Stephen Kelly [Fri, 11 Jan 2019 19:11:17 +0000 (19:11 +0000)]
[ASTDump] Add utility for dumping a label with child nodes

Summary:
Use it to add optional label nodes to Stmt dumps.  This preserves
behavior of InitExprList dump:

// CHECK-NEXT: `-InitListExpr {{.+}} <col:13, col:15> 'U [3]'
// CHECK-NEXT:   |-array_filler: InitListExpr {{.+}} <col:15> 'U' field Field {{.+}} 'i' 'int'
// CHECK-NEXT:   `-InitListExpr {{.+}} <col:14> 'U' field Field {{.+}} 'i' 'int'
// CHECK-NEXT:     `-IntegerLiteral {{.+}} <col:14> 'int' 1

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

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

5 years ago[Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.py
Serge Guelton [Fri, 11 Jan 2019 19:04:48 +0000 (19:04 +0000)]
[Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.py

Current clang fail to bootstrap in PGO mode when only python3 is available,
because perf-helper.py is not compatible with python3.

Commited on behalf of  Romain Geissler.

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

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

5 years ago[test] Update support for Exynos M4 (NFC)
Evandro Menezes [Fri, 11 Jan 2019 18:54:41 +0000 (18:54 +0000)]
[test] Update support for Exynos M4 (NFC)

Update test cases for Exynos M4.

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

5 years ago[MergeFunc] Update clang test for r350939
Vedant Kumar [Fri, 11 Jan 2019 18:51:02 +0000 (18:51 +0000)]
[MergeFunc] Update clang test for r350939

In r350939, the MergeFunc pass learned to erase duplicate functions
which are discardable if unused.

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

5 years ago[LTO] Add option to enable LTOUnit splitting, and disable unless needed
Teresa Johnson [Fri, 11 Jan 2019 18:32:07 +0000 (18:32 +0000)]
[LTO] Add option to enable LTOUnit splitting, and disable unless needed

Summary:
Adds a new -f[no]split-lto-unit flag that is disabled by default to
control module splitting during ThinLTO. It is automatically enabled
for -fsanitize=cfi and -fwhole-program-vtables.

The new EnableSplitLTOUnit codegen flag is passed down to llvm
via a new module flag of the same name.

Depends on D53890.

Reviewers: pcc

Subscribers: ormris, mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, cfe-commits, llvm-commits

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

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

5 years ago[analyzer] [NFC] Fix the FIXME in tests
George Karpenkov [Fri, 11 Jan 2019 18:12:49 +0000 (18:12 +0000)]
[analyzer] [NFC] Fix the FIXME in tests

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