]>
granicus.if.org Git - clang/log
Asaf Badouh [Thu, 14 Jul 2016 08:40:30 +0000 (08:40 +0000)]
[X86][AVX512F] minor fix of the parameter names
add "__" prefix
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275384
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Thu, 14 Jul 2016 06:37:46 +0000 (06:37 +0000)]
Use hasFlag instead of hasArg
Summary: Fix the build to use hasFlag instead of hasArg for checking some flags.
Reviewers: echristo
Subscribers: mehdi_amini, cfe-commits
Differential Revision: http://reviews.llvm.org/D22338
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275377
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Thu, 14 Jul 2016 04:58:44 +0000 (04:58 +0000)]
Add C++ dependencies to xray runtime
Summary:
Depends on D21982 which implements the in-memory logging implementation of the
XRay runtime. These additional changes also depends on D20352 which adds the
bulk of XRay flags/dependencies when using the `-fxray-instrument` flag from
Clang.
Reviewers: echristo, rnk, aaron.ballman
Subscribers: mehdi_amini, cfe-commits
Differential Revision: http://reviews.llvm.org/D21983
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275368
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kelvin Li [Thu, 14 Jul 2016 02:54:56 +0000 (02:54 +0000)]
[OpenMP] Sema and parsing for 'target parallel for simd' pragma
This patch is to implement sema and parsing for 'target parallel for simd' pragma.
Differential Revision: http://reviews.llvm.org/D22096
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 14 Jul 2016 00:42:53 +0000 (00:42 +0000)]
Add a comment mirroring the one in LLVM's Dwarf.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275356
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 14 Jul 2016 00:14:59 +0000 (00:14 +0000)]
www/cxx_status: give more precise links to initialization order wording
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 14 Jul 2016 00:11:03 +0000 (00:11 +0000)]
P0305R0: Semantic analysis and code generation for C++17 init-statement for 'if' and 'switch':
if (stmt; condition) { ... }
Patch by Anton Bikineev! Some minor formatting and comment tweets by me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275350
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 13 Jul 2016 22:32:15 +0000 (22:32 +0000)]
Add XRay flags to Clang. We implement two flags to control the XRay behaviour:
-fxray-instrument: enables XRay annotation of IR
-fxray-instruction-threshold: configures the threshold for function size (looking at IR instructions), and allow LLVM to decide whether to add the nop sleds later on in the process.
Also implements the related xray_always_instrument and xray_never_instrument function attributes.
Patch by Dean Michael Berris.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275330
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 13 Jul 2016 22:03:47 +0000 (22:03 +0000)]
[test] Add 'env' to fix test failures in windows bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275324
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kelvin Li [Wed, 13 Jul 2016 21:51:49 +0000 (21:51 +0000)]
[OpenMP] remove duplicate code in ActOnOpenMPRegionStart
This patch is to remove duplicate code in ActOnOpenMPRegionStart. (NFC)
Differential Revision: http://reviews.llvm.org/D22177
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275323
91177308 -0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Wed, 13 Jul 2016 21:21:05 +0000 (21:21 +0000)]
[OpenCL] Fixes failures in test/Driver/opencl.cl.
Also fixes strict-aliasing option to only be allowed when OpenCL Version 1.0. Added testcase in test/Frontend/opencl-blocks.cl.
Patch by Aaron En Ye Shi.
Differential Revision: http://reviews.llvm.org/D22170
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275318
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kelvin Li [Wed, 13 Jul 2016 20:40:32 +0000 (20:40 +0000)]
[OpenMP] add more tests for 'distribute parallel for simd' pragma
This patch is to add two additional tests for testing 'distribute parallel for simd' pragma with disallowed clauses and loops.
Differential Revision: http://reviews.llvm.org/D22169
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275315
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 13 Jul 2016 20:35:26 +0000 (20:35 +0000)]
[PCH/preamble] Make sure that if the preamble/PCH was serialized with errors that we set diagnostic engine state appropriately.
Otherwise there can be a crash with CFG analysis warnings doing work on invalid AST.
Fixes crash of rdar://
26224134
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275313
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kelvin Li [Wed, 13 Jul 2016 19:16:56 +0000 (19:16 +0000)]
[OpenMP] add more tests for 'distribute simd' pragma
This patch is to add two additional tests for testing 'distribute simd' pragma with disallowed clauses and loops.
Differential Revision: http://reviews.llvm.org/D22176
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275306
91177308 -0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Wed, 13 Jul 2016 19:04:51 +0000 (19:04 +0000)]
Implement FunctionDecl::getDefinition() to be consistent with
VarDecl, TagDecl, EnumDecl, RecordDecl, CXXRecordDecl.
Use getDefinition in two locations to make the code more readable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Artem Dergachev [Wed, 13 Jul 2016 18:07:26 +0000 (18:07 +0000)]
[analyzer] Implement a methond to discover origin region of a symbol.
This encourages checkers to make logical decisions depending on
value of which region was the symbol under consideration
introduced to denote.
A similar technique is already used in a couple of checkers;
they were modified to call the new method.
Differential Revision: http://reviews.llvm.org/D22242
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275290
91177308 -0d34-0410-b5e6-
96231b3b80d8
Carlo Bertolli [Wed, 13 Jul 2016 17:16:49 +0000 (17:16 +0000)]
[OpenMP] Initial implementation of parse+sema for OpenMP clause 'is_device_ptr' of target
http://reviews.llvm.org/D22070
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275282
91177308 -0d34-0410-b5e6-
96231b3b80d8
Carlo Bertolli [Wed, 13 Jul 2016 15:37:16 +0000 (15:37 +0000)]
[OpenMP] Initial implementation of parse+sema for clause use_device_ptr of 'target data'
http://reviews.llvm.org/D21904
This patch is similar to the implementation of 'private' clause: it adds a list of private pointers to be used within the target data region to store the device pointers returned by the runtime.
Please refer to the following document for a full description of what the runtime witll return in this case (page 10 and 11):
https://github.com/clang-omp/OffloadingDesign
I am happy to answer any question related to the runtime interface to help reviewing this patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275271
91177308 -0d34-0410-b5e6-
96231b3b80d8
Pierre Gousseau [Wed, 13 Jul 2016 14:21:11 +0000 (14:21 +0000)]
[PCH] Add a fno-pch-timestamp option to cc1 to disable inclusion of timestamps in PCH files.
This is to allow distributed build systems, that do not preserve time stamps, to use PCH files.
Second and last part of the patch proposed at:
Differential Revision: http://reviews.llvm.org/D20867
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275267
91177308 -0d34-0410-b5e6-
96231b3b80d8
Pierre Gousseau [Wed, 13 Jul 2016 11:58:28 +0000 (11:58 +0000)]
[PCH] Fix timestamp check on windows hosts.
On Linux, if the timestamp of a header file, included in the pch, is modified, then including the pch without regenerating it causes a fatal error, which is reasonable.
On Windows the check is ifdefed out, allowing the compilation to continue in a broken state.
The root of the broken state is that, if timestamps dont match, the preprocessor will reparse a header without discarding the pch data.
This leads to "#pragma once" header to be included twice.
The reason behind the ifdefing of the check lacks documentation, and was done 6 years ago.
This change tentatively removes the ifdefing.
First part of patch proposed at:
Differential Revision: http://reviews.llvm.org/D20867
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275261
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Bader [Wed, 13 Jul 2016 10:28:13 +0000 (10:28 +0000)]
[OpenCL] Fix code generation of kernel pipe parameters.
Improved test with user define structure pipe type case.
Reviewers: Anastasia, pxli168
Subscribers: yaxunl, cfe-commits
Differential revision: http://reviews.llvm.org/D21744
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275259
91177308 -0d34-0410-b5e6-
96231b3b80d8
Etienne Bergeron [Wed, 13 Jul 2016 06:37:39 +0000 (06:37 +0000)]
fix missing whitespace in sphinx doc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275256
91177308 -0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 13 Jul 2016 02:58:44 +0000 (02:58 +0000)]
CodeGen: minor cleanup, NFC
Initialise more members in initializer lists. Invert the condition that had
grown to be pretty confusing. The `_objc_empty_vtable` is only used on macOS
<10.9. This simplifies the code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275241
91177308 -0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 12 Jul 2016 23:23:13 +0000 (23:23 +0000)]
[CUDA] Use the multi-element remove function in EraseUnwantedCUDAMatches.
Summary:
Bug pointed out by Benjamin Kramer in r264008. I think the bug is
benign because by the time this is called, we should only have at most
two overloads to consider (either a host and a device overload, or a
host+device overload, but not all three).
Reviewers: tra
Subscribers: cfe-commits, bkramer
Differential Revision: http://reviews.llvm.org/D21914
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275233
91177308 -0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 12 Jul 2016 23:23:12 +0000 (23:23 +0000)]
[CUDA] Add additional testcases for EraseUnwantedCUDAMatches.
Summary:
Specifically, this patch adds testcases for all three calls to
EraseUnwantedCUDAMatches. The addr-of-overloaded-fn test I accidentally
neutered in r264207, which moved much of
CodeGenCUDA/function-overload.cu into SemaCUDA/function-overload.cu.
The coverage from overloaded-delete test is new.
Reviewers: tra
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D21913
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275232
91177308 -0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 12 Jul 2016 23:23:01 +0000 (23:23 +0000)]
[CUDA] Don't assume that destructors can't be overloaded.
Summary:
You can overload a destructor in CUDA, and SemaOverload needs to be
tweaked not to crash when it sees an explicit call to an overloaded
destructor.
Reviewers: rsmith
Subscribers: cfe-commits, tra
Differential Revision: http://reviews.llvm.org/D21912
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275231
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 12 Jul 2016 17:38:50 +0000 (17:38 +0000)]
AArch64: fix return type of vqmovun_high_*.
These should be returning an unsigned quantity.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275195
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 12 Jul 2016 16:56:33 +0000 (16:56 +0000)]
Fix for the mingw builder
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275191
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 12 Jul 2016 16:48:17 +0000 (16:48 +0000)]
[ItaniumMangle] Correctly mangle BuiltinTemplateDecls
A BuiltinTemplateDecl has no underlying templated decl and as such they
cannot be relied upon for mangling. The ItaniumMangler had some bugs
here which lead to crashes.
This fixes PR28519.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275190
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 12 Jul 2016 15:45:53 +0000 (15:45 +0000)]
clang-format: [JS] Allow top-level conditionals again.
I am not sure exactly which test breakage Martin was trying to fix in
r273694. For now, fix the behavior for top-level conditionals, which
(surprisingly) are actually used somewhat commonly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275183
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Tue, 12 Jul 2016 12:42:27 +0000 (12:42 +0000)]
[Clang][AVX512] Making cosmetic changes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275169
91177308 -0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Tue, 12 Jul 2016 06:36:00 +0000 (06:36 +0000)]
[ASTMatchers] isSignedInteger() and isUnsignedInteger()
Complementary to isInteger(), these match signed and unsigned integers
respectively.
Review: http://reviews.llvm.org/D21989
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275157
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 12 Jul 2016 04:42:50 +0000 (04:42 +0000)]
[MS ABI] Support throwing/catching __unaligned types
We need to mark the appropriate bits in ThrowInfo and HandlerType so
that the personality routine can correctly handle qualification
conversions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Wolfgang Pieb [Mon, 11 Jul 2016 23:27:19 +0000 (23:27 +0000)]
Correcting the previous fix for test submitted with r275115.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275128
91177308 -0d34-0410-b5e6-
96231b3b80d8
Wolfgang Pieb [Mon, 11 Jul 2016 23:20:28 +0000 (23:20 +0000)]
Fix test submitted with r275115 (failed on ppc64 buildbots).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275127
91177308 -0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 11 Jul 2016 22:57:46 +0000 (22:57 +0000)]
[Coverage] Do not map regions from system headers
Do not assign source regions located within system headers file ID's,
and do not construct counter mapping regions out of them.
This makes coverage reports less cluttered and less mysterious. E.g
using the "assert" macro doesn't cause assert.h to appear in reports,
and it no longer shows the "assertion failed" branch as an uncovered
region.
It also makes coverage mapping sections a bit smaller (e.g a 1%
reduction in a stage2 build of bin/llvm-as).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275121
91177308 -0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 11 Jul 2016 22:57:44 +0000 (22:57 +0000)]
[Coverage] Move logic to skip decl's into a helper (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275120
91177308 -0d34-0410-b5e6-
96231b3b80d8
Wolfgang Pieb [Mon, 11 Jul 2016 22:22:23 +0000 (22:22 +0000)]
Prevent the creation of empty (forwarding) blocks resulting from nested ifs.
Summary:
Nested if statements can generate empty BBs whose terminator branches
unconditionally to its successor. These branches are not eliminated
to help generate better line number information in some cases, but there
is no reason to keep the empty blocks that result from nested ifs.
Reviewers: mehdi_amini, dblaikie, echristo
Subscribers: mehdi_amini, cfe-commits
Differential review: http://reviews.llvm.org/D11360
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275115
91177308 -0d34-0410-b5e6-
96231b3b80d8
Erik Pilkington [Mon, 11 Jul 2016 20:00:48 +0000 (20:00 +0000)]
[NFC] Reorder fields of VersionTuple to reduce size
Differential revision: http://reviews.llvm.org/D19934
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275095
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 11 Jul 2016 17:09:56 +0000 (17:09 +0000)]
[Sema] Don't artificially forbid BuiltinTemplateDecls in CheckTemplateArgument
After thinking about it, we don't really need to forbid
BuiltinTemplateDecls explicitly. The restriction doesn't really buy us
anything.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275078
91177308 -0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 11 Jul 2016 17:03:16 +0000 (17:03 +0000)]
[man page] Document -gline-tables-only in the clang man page.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275076
91177308 -0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 11 Jul 2016 17:03:13 +0000 (17:03 +0000)]
[man page] Fix two sphinx build errors.
These options were referenced by other paragraphs, but never specified.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275075
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Liu [Mon, 11 Jul 2016 13:53:12 +0000 (13:53 +0000)]
Make tooling::applyAllReplacements return llvm::Expected<string> instead of empty string to indicate potential error.
Summary:
return llvm::Expected<> to carry error status and error information.
This is the first step towards introducing "Error" into tooling::Replacements.
Reviewers: djasper, klimek
Subscribers: ioeric, klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D21601
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275062
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anastasia Stulova [Mon, 11 Jul 2016 13:46:02 +0000 (13:46 +0000)]
[OpenCL] Improved diagnostics of OpenCL types.
- Changes diagnostics for Blocks to be implicitly
const qualified OpenCL v2.0 s6.12.5.
- Added and unified diagnostics of some OpenCL special types:
blocks, images, samplers, pipes. These types are intended for use
with the OpenCL builtin functions only and, therefore, most regular
uses are not allowed including assignments, arithmetic operations,
pointer dereferencing, etc.
Review: http://reviews.llvm.org/D21989
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275061
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 11 Jul 2016 06:14:18 +0000 (06:14 +0000)]
[AVX512] Replace masked AND/OR/XOR intrinsics with native code and remove the builtins.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275049
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 11 Jul 2016 05:59:24 +0000 (05:59 +0000)]
[Sema] Disallow __make_integer_seq from showing up in __make_integer_seq
We hit over stringent asserts when trying to diagnose. Loosen them as
appropriate.
This fixes PR28494.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275047
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 11 Jul 2016 04:52:07 +0000 (04:52 +0000)]
Revert r275029 - Update Clang tests after adding inference for the returned argument attribute
The associated backend change is causing miscompiles from the AArch64 backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275043
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 11 Jul 2016 04:28:21 +0000 (04:28 +0000)]
[CodeGen] Treat imported static local variables as declarations
Imported variables cannot really be definitions for the purposes of
IR generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275040
91177308 -0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 10 Jul 2016 23:24:36 +0000 (23:24 +0000)]
Reapply SVN r274797.
Original Commit Message
Driver: Stop linking to C++ when using sanitizers on Darwin
Sanitizers on Darwin are built as dynamic libraries, not static libraries.
Sanitizers will have their C++ dependency satisfied internally (LC_LOAD_DYLIB)
in the libclang_rt dylib. As long as the sanitizers stay dynamic and not static,
linking against C++ when enabling a sanitizer becomes over linkage.
Patch by Dave Lee!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275032
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jan Vesely [Sun, 10 Jul 2016 22:38:04 +0000 (22:38 +0000)]
AMDGPU: Export workitem builtins
Reviewers: tstellardAMD
Differential Revision: http://reviews.llvm.org/D20299
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275030
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 10 Jul 2016 22:26:52 +0000 (22:26 +0000)]
Update Clang tests after adding inference for the returned argument attribute
Adjusting tests after r275027.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275029
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 10 Jul 2016 16:35:54 +0000 (16:35 +0000)]
[AVX512] Remove masked shufps/shudpd builtins. These are all handled with __builtin_shufflevector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275018
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 10 Jul 2016 05:57:21 +0000 (05:57 +0000)]
[X86] Use __butilin_shufflevector for 512-bit shufps intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275012
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sun, 10 Jul 2016 01:44:00 +0000 (01:44 +0000)]
Add CLANG_BUILD_TOOLS as a clang counterpart for LLVM_BUILD_TOOLS
LLVM_BUILD_TOOLS is a boolean variable that controls whether or not generated
targets for llvm tools are built by the "all" target. CLANG_BUILD_TOOLS is an
analogous variable for clang targets.
This is useful functionality for selectively disabling the building of clang
targets by default to speed up builds.
In terms of implementation, I just followed the model of LLVM's implementation
of this functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275006
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sun, 10 Jul 2016 00:57:52 +0000 (00:57 +0000)]
Delete dead code.
We were just setting DisableUnitAtATime to its default value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275005
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 9 Jul 2016 21:58:40 +0000 (21:58 +0000)]
Move add_clang_* entry points from the main clang CMakeLists.txt to cmake/modules/AddClang.cmake.
This matches how LLVM has its cmake files organized and is cleaner than just
shoving this business logic into the main CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274992
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 9 Jul 2016 21:49:16 +0000 (21:49 +0000)]
[clang-cl] Add support for /Zd
MASM (ML.exe and ML64.exe) and older versions of MSVC (CL.exe) support a
flag called /Zd which is more-or-less -gline-tables-only.
It seems nicer to support this flag instead of exposing
-gline-tables-only.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274991
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 9 Jul 2016 19:26:25 +0000 (19:26 +0000)]
[MS ABI] Some code cleanups
Don't create unnecessary truncations if the result will not be used.
Also prefer preforming math before the truncation, it makes it a little
easier to reason about.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274984
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 9 Jul 2016 19:26:19 +0000 (19:26 +0000)]
[AST] Tighten up some bitfields
Optimize the bitfield types to conserve space for the MSVC ABI.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Martin Probst [Sat, 9 Jul 2016 15:11:18 +0000 (15:11 +0000)]
clang-format: [JS] Sort imports case insensitive.
Summary: ASCII case sorting does not help finding imported symbols quickly, and it is common to have e.g. class Foo and function fooFactory exported/imported from the same file.
Reviewers: djasper
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D22146
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274977
91177308 -0d34-0410-b5e6-
96231b3b80d8
Martin Probst [Sat, 9 Jul 2016 15:09:22 +0000 (15:09 +0000)]
clang-format: [JS] support trailing commas in imports.
Reviewers: djasper
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D22147
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274976
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 9 Jul 2016 12:16:58 +0000 (12:16 +0000)]
[analyzer] Older version of GCC 4.7 crash on lambdas in default arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274975
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 9 Jul 2016 11:16:56 +0000 (11:16 +0000)]
[analyzer] Rewrite manual erase loop using remove_if.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274974
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 9 Jul 2016 05:30:41 +0000 (05:30 +0000)]
[X86] Use __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi to implement pextrw/pinsertw MMX intrinsics instead of trying to use native IR.
Without this we end up generating code that doesn't use mmx registers and probably doesn't work well with other mmx intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274968
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 9 Jul 2016 04:38:17 +0000 (04:38 +0000)]
[X86] Uncomment the _mm_extract_ps test and add checks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274965
91177308 -0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 9 Jul 2016 01:59:51 +0000 (01:59 +0000)]
CodeGen: tweak CFString section for COFF, ELF
Place the structure data into `cfstring`. This both isolates the structures to
permit coalescing in the future (by the linker) as well as ensures that it
doesnt get marked as read-only data. The structures themselves are not
read-only, only the string contents.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274956
91177308 -0d34-0410-b5e6-
96231b3b80d8
Vassil Vassilev [Fri, 8 Jul 2016 21:09:08 +0000 (21:09 +0000)]
Teach -ast-print to print constexpr variables.
Patch reviewed by Richard Smith (D22168).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274930
91177308 -0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Fri, 8 Jul 2016 20:28:29 +0000 (20:28 +0000)]
[OpenCL] Add missing -cl-no-signed-zeros option into driver
Add OCL option -cl-no-signed-zeros to driver options.
Also added to opencl.cl testcases.
Patch by Aaron En Ye Shi.
Differential Revision: http://reviews.llvm.org/D22067
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274923
91177308 -0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 8 Jul 2016 17:59:24 +0000 (17:59 +0000)]
Fix flag name in comment in cuda-version-check.cu.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274897
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 8 Jul 2016 17:06:27 +0000 (17:06 +0000)]
CFGTests: Update libdeps.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274885
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 8 Jul 2016 16:52:36 +0000 (16:52 +0000)]
clang/unittests/Analysis/CFGTest.cpp: Appease msc targets with -fno-delayed-template-parsing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274879
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Brawn [Fri, 8 Jul 2016 16:20:57 +0000 (16:20 +0000)]
Explicitly export symbols from the sample analyzer plugin
This is done so that it will work when built using MSVC if
LLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON.
Differential Revision: http://reviews.llvm.org/D21971
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274871
91177308 -0d34-0410-b5e6-
96231b3b80d8
Vassil Vassilev [Fri, 8 Jul 2016 16:04:22 +0000 (16:04 +0000)]
Don't crash when printing auto variables.
Patch by Axel Naumann!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274859
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Bader [Fri, 8 Jul 2016 15:34:59 +0000 (15:34 +0000)]
[OpenCL] Fix access qualifiers handling for typedefs
OpenCL s6.6: "Access qualifier must be used with image object arguments
of kernels and of user-defined functions [...] If no qualifier is
provided, read_only is assumed".
This does not define the behavior for image types used in typedef
declaration, but following the spec logic, we should allow access
qualifiers specification in typedefs, e.g.:
typedef write_only image1d_t img1d_wo;
Unlike cv-qualifiers, user cannot add access qualifier to a typedef
type, i.e. this is not allowed:
typedef image1d_t img1d; // note: previously declared 'read_only' here
void foo(write_only img1d im) {} // error: multiple access qualifier
Patch by Andrew Savonichev.
Reviewers: Anastasia Stulova.
Differential revision: http://reviews.llvm.org/D20948
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274858
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Fri, 8 Jul 2016 10:51:00 +0000 (10:51 +0000)]
[ASTMatchers] Add missing forEachArgumentWithParam() to code sample
Reviewers: klimek
Subscribers: cfe-commits, klimek
Patch by Martin Boehme!
Differential Revision: http://reviews.llvm.org/D21799
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274835
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Fri, 8 Jul 2016 10:50:51 +0000 (10:50 +0000)]
CFGBuilder: Fix crash when visiting a range-based for over a dependent type
Summary:
CFG generation is expected to fail in this case, but it should not crash.
Also added a test that reproduces the crash.
Reviewers: klimek
Subscribers: cfe-commits
Patch by Martin Boehme!
Differential Revision: http://reviews.llvm.org/D21895
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274834
91177308 -0d34-0410-b5e6-
96231b3b80d8
Vassil Vassilev [Fri, 8 Jul 2016 08:33:56 +0000 (08:33 +0000)]
Recommit r274348 and r274349. The Windows failures should be fixed.
Original commit message:
"Add postorder traversal support to the RecursiveASTVisitor.
This feature needs to be explicitly enabled by overriding shouldTraversePostOrder()
as it has performance drawbacks for the iterative Stmt-traversal.
Patch by Raphael Isemann!
Reviewed by Richard Smith and Benjamin Kramer."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274830
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 8 Jul 2016 05:11:47 +0000 (05:11 +0000)]
[X86] Remove dead builtins that don't exist in the backend intrinsic file and don't have custom handling in CGBuiltins.cpp either.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274825
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 8 Jul 2016 02:17:35 +0000 (02:17 +0000)]
[CodeGen] Use llvm::Type::getVectorNumElements instead of casting to llvm::VectorType and calling getNumElements. This is equivalent and shorter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274823
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 8 Jul 2016 01:57:24 +0000 (01:57 +0000)]
[X86] Reuse existing lambda and remove unnecessary argument from vector cmp builtin handling. NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274821
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 8 Jul 2016 01:48:44 +0000 (01:48 +0000)]
[X86] Remove a couple calls to create V2F64 and V4F32 types for builtin handling. Just get the type from the operand of the builtin instead. NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274820
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devin Coughlin [Fri, 8 Jul 2016 00:53:18 +0000 (00:53 +0000)]
[analyzer] Add rudimentary handling of AtomicExpr.
This proposed patch adds crude handling of atomics to the static analyzer.
Rather than ignore AtomicExprs, as we now do, this patch causes the analyzer
to escape the arguments. This is imprecise -- and we should model the
expressions fully in the future -- but it is less wrong than ignoring their
effects altogether.
This is rdar://problem/
25353187
Differential Revision: http://reviews.llvm.org/D21667
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274816
91177308 -0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 8 Jul 2016 00:37:31 +0000 (00:37 +0000)]
Revert "Driver: Stop linking to C++ when using sanitizers on Darwin"
This reverts SVN r274797. It broke the Green Dragon bot. Revert it until the
failure can be addressed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274814
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Thu, 7 Jul 2016 23:22:39 +0000 (23:22 +0000)]
[CUDA] Pass correct option in test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274805
91177308 -0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 7 Jul 2016 22:38:29 +0000 (22:38 +0000)]
[Lex] Speed up updateConsecutiveMacroArgTokens (NFC)
SM.isWrittenInSameFile() calls getFileID(), which can be expensive.
Move this check behind some cheaper filters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274800
91177308 -0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 7 Jul 2016 22:32:26 +0000 (22:32 +0000)]
Update switch statement to match coding standards.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274799
91177308 -0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 7 Jul 2016 21:42:29 +0000 (21:42 +0000)]
Driver: Stop linking to C++ when using sanitizers on Darwin
Sanitizers on Darwin are built as dynamic libraries, not static libraries.
Sanitizers will have their C++ dependency satisfied internally (LC_LOAD_DYLIB)
in the libclang_rt dylib. As long as the sanitizers stay dynamic and not static,
linking against C++ when enabling a sanitizer becomes over linkage.
Patch by Dave Lee!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274797
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 7 Jul 2016 20:02:25 +0000 (20:02 +0000)]
[AArch64] Change the preferred alignment for char and short.
This reinstates commits r273280 and r273289.
Original Review: http://reviews.llvm.org/D21414.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274791
91177308 -0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Thu, 7 Jul 2016 18:24:28 +0000 (18:24 +0000)]
[CUDA] s/OPT_nocuda_version_chec/OPT_no_cuda_version_check/.
Fix build breakage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274782
91177308 -0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Thu, 7 Jul 2016 18:17:52 +0000 (18:17 +0000)]
[CUDA] Check that our CUDA install supports the requested architectures.
Summary:
Raise an error if you're using a CUDA installation that's too old for
the requested architectures. In practice, this means that you need a
CUDA 8 install to compile for sm_6*.
Reviewers: tra
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D21869
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274781
91177308 -0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Thu, 7 Jul 2016 18:15:03 +0000 (18:15 +0000)]
[CUDA] Rename the __nvvm_bar0 builtin back to __syncthreads.
The builtin was renamed in r274770. But __syncthreads is part of our
user-facing API, so we need to keep the name as-is.
Patch by Justin Bogner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274780
91177308 -0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 7 Jul 2016 16:41:08 +0000 (16:41 +0000)]
NVPTX: Use the nvvm builtins to read SRegs rather than the legacy ptx ones
The ptx spellings were removed from LLVM in r274769.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274770
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 7 Jul 2016 16:37:21 +0000 (16:37 +0000)]
Revert "[aarch64] Update datalayout for aarch64 tests"
This reverts commit r273289, which was a follow to r273280, which was
reverted because the change was not properly approved.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274767
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 7 Jul 2016 16:37:19 +0000 (16:37 +0000)]
Revert "[AArch64] Change the preferred alignment for char and short to word alignment"
This reverts commit r273280 as the change was not properly approved.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274766
91177308 -0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 7 Jul 2016 11:24:38 +0000 (11:24 +0000)]
Fix "not all control paths return a value" warning on MSVC
This time without causing a 'all enums handled' warning on other compilers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274748
91177308 -0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 7 Jul 2016 11:12:02 +0000 (11:12 +0000)]
Fix "not all control paths return a value" warning on MSVC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274746
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Thu, 7 Jul 2016 11:04:06 +0000 (11:04 +0000)]
[OPENMP] Do not create helper expressions in dependent contexts, NFC.
OpenMP relies on some helper expressions generated during semantic
analysis. But they are required only for codegen and not required in
dependent contexts. Patch removes generation of some of helper
expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274745
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 7 Jul 2016 04:43:11 +0000 (04:43 +0000)]
[AST] Tighten up the bitfield in TemplateSpecializationType
Optimize the bitfield types to conserve space for the MSVC ABI.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274733
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 7 Jul 2016 04:43:07 +0000 (04:43 +0000)]
[AST] Use ArrayRef in more interfaces
ArrayRef is a little better than passing around a pointer/length
pair.
No functional change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274732
91177308 -0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Thu, 7 Jul 2016 01:06:59 +0000 (01:06 +0000)]
[CUDA] Fix "control reaches end of non-void function" warnings in Cuda.cpp.
Some compilers are too dumb to realize that the switch statement covers
all cases.
(Don't use a "default" label, because we explicitly want to get a warning
if our switch doesn't cover all the cases.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274713
91177308 -0d34-0410-b5e6-
96231b3b80d8