]> granicus.if.org Git - clang/log
clang
8 years agoAttempt to fix breakage caused by r275645 for Windows bots.
Samuel Antao [Fri, 15 Jul 2016 23:51:21 +0000 (23:51 +0000)]
Attempt to fix breakage caused by r275645 for Windows bots.

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

8 years ago[CUDA][OpenMP] Create generic offload action
Samuel Antao [Fri, 15 Jul 2016 23:13:27 +0000 (23:13 +0000)]
[CUDA][OpenMP] Create generic offload action

Summary:
This patch replaces the CUDA specific action by a generic offload action. The offload action may have multiple dependences classier in “host” and “device”. The way this generic offloading action is used is very similar to what is done today by the CUDA implementation: it is used to set a specific toolchain and architecture to its dependences during the generation of jobs.

This patch also proposes propagating the offloading information through the action graph so that that information can be easily retrieved at any time during the generation of commands. This allows e.g. the "clang tool” to evaluate whether CUDA should be supported for the device or host and ptas to easily retrieve the target architecture.

This is an example of how the action graphs would look like (compilation of a single CUDA file with two GPU architectures)
```
0: input, "cudatests.cu", cuda, (host-cuda)
1: preprocessor, {0}, cuda-cpp-output, (host-cuda)
2: compiler, {1}, ir, (host-cuda)
3: input, "cudatests.cu", cuda, (device-cuda, sm_35)
4: preprocessor, {3}, cuda-cpp-output, (device-cuda, sm_35)
5: compiler, {4}, ir, (device-cuda, sm_35)
6: backend, {5}, assembler, (device-cuda, sm_35)
7: assembler, {6}, object, (device-cuda, sm_35)
8: offload, "device-cuda (nvptx64-nvidia-cuda:sm_35)" {7}, object
9: offload, "device-cuda (nvptx64-nvidia-cuda:sm_35)" {6}, assembler
10: input, "cudatests.cu", cuda, (device-cuda, sm_37)
11: preprocessor, {10}, cuda-cpp-output, (device-cuda, sm_37)
12: compiler, {11}, ir, (device-cuda, sm_37)
13: backend, {12}, assembler, (device-cuda, sm_37)
14: assembler, {13}, object, (device-cuda, sm_37)
15: offload, "device-cuda (nvptx64-nvidia-cuda:sm_37)" {14}, object
16: offload, "device-cuda (nvptx64-nvidia-cuda:sm_37)" {13}, assembler
17: linker, {8, 9, 15, 16}, cuda-fatbin, (device-cuda)
18: offload, "host-cuda (powerpc64le-unknown-linux-gnu)" {2}, "device-cuda (nvptx64-nvidia-cuda)" {17}, ir
19: backend, {18}, assembler
20: assembler, {19}, object
21: input, "cuda", object
22: input, "cudart", object
23: linker, {20, 21, 22}, image
```
The changes in this patch pass the existent regression tests (keeps the existent functionality) and resulting binaries execute correctly in a Power8+K40 machine.

Reviewers: echristo, hfinkel, jlebar, ABataev, tra

Subscribers: guansong, andreybokhanko, tcramer, mkuron, cfe-commits, arpith-jacob, carlo.bertolli, caomhin

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

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

8 years ago[index] Create different USR if a property is a class property.
Argyrios Kyrtzidis [Fri, 15 Jul 2016 22:18:19 +0000 (22:18 +0000)]
[index] Create different USR if a property is a class property.

Avoids USR conflicts between class & instance properties of the same name.

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

8 years agoRevert r275481, r275490. This broke modules bootstrap.
Richard Smith [Fri, 15 Jul 2016 21:33:46 +0000 (21:33 +0000)]
Revert r275481, r275490. This broke modules bootstrap.

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

8 years agoAMDGPU: Remove legacy ldexp builtin
Matt Arsenault [Fri, 15 Jul 2016 21:33:06 +0000 (21:33 +0000)]
AMDGPU: Remove legacy ldexp builtin

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

8 years agoAMDGPU: Update for rsq intrinsic changes
Matt Arsenault [Fri, 15 Jul 2016 21:33:02 +0000 (21:33 +0000)]
AMDGPU: Update for rsq intrinsic changes

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

8 years agoPush alias-declarations and alias-template declarations into scope even if
Richard Smith [Fri, 15 Jul 2016 20:53:25 +0000 (20:53 +0000)]
Push alias-declarations and alias-template declarations into scope even if
they're redeclarations. This is necessary in order for name lookup to correctly
find the most recent declaration of the name (which affects default template
argument lookup and cross-module merging, among other things).

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

8 years agoSema: support __declspec(dll*) on ObjC interfaces
Saleem Abdulrasool [Fri, 15 Jul 2016 20:41:10 +0000 (20:41 +0000)]
Sema: support __declspec(dll*) on ObjC interfaces

Extend the __declspec(dll*) attribute to cover ObjC interfaces.  This was
requested by Microsoft for their ObjC support.  Cover both import and export.
This only adds the semantic analysis portion of the support, code-generation
still remains outstanding.  Add some basic initial documentation on the
attributes that were previously empty.  Tweak the previous tests to use the
relative expected-warnings to make the tests easier to read.

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

8 years ago[test/objcmt] Add a follow-up test case for r275600.
Argyrios Kyrtzidis [Fri, 15 Jul 2016 20:40:24 +0000 (20:40 +0000)]
[test/objcmt] Add a follow-up test case for r275600.

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

8 years ago[objcmt] Fix a buffer overflow crash than can occur while modernizing enums.
Argyrios Kyrtzidis [Fri, 15 Jul 2016 19:22:34 +0000 (19:22 +0000)]
[objcmt] Fix a buffer overflow crash than can occur while modernizing enums.

Note that due to the nature of the crash it requires libgmalloc or asan for it to crash consistently.

rdar://19932927

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

8 years ago[AST] Keep track of the left brace source location of a tag decl.
Argyrios Kyrtzidis [Fri, 15 Jul 2016 18:11:33 +0000 (18:11 +0000)]
[AST] Keep track of the left brace source location of a tag decl.

This is useful for source modification tools. There will be a follow-up commit using it.

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

8 years ago[objcmt] Don't add an #import of Foundation unnecessarily, if the NS_ENUM macro is...
Argyrios Kyrtzidis [Fri, 15 Jul 2016 18:11:27 +0000 (18:11 +0000)]
[objcmt] Don't add an #import of Foundation unnecessarily, if the NS_ENUM macro is already defined.

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

8 years agoAMDGPU: Add Clang Builtin for v_lerp_u8
Wei Ding [Fri, 15 Jul 2016 16:43:03 +0000 (16:43 +0000)]
AMDGPU: Add Clang Builtin for v_lerp_u8

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

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

8 years agoXRay: Remove duplicate checks for xray instrumentation flags
Dean Michael Berris [Fri, 15 Jul 2016 15:46:39 +0000 (15:46 +0000)]
XRay: Remove duplicate checks for xray instrumentation flags

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

8 years agoRemoving a few more :option: tags that we do not have corresponding .. option directi...
Aaron Ballman [Fri, 15 Jul 2016 13:13:45 +0000 (13:13 +0000)]
Removing a few more :option: tags that we do not have corresponding .. option directives for; these are causing the sphinx bot to fail (http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/15214/steps/docs-clang-html/logs/stdio).

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

8 years agoRemoving a few more :option: tags that we do not have corresponding .. option directi...
Aaron Ballman [Fri, 15 Jul 2016 12:55:47 +0000 (12:55 +0000)]
Removing a few more :option: tags that we do not have corresponding .. option directives for; these are causing the sphinx bot to fail (http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/15213/steps/docs-clang-html/logs/stdio).

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

8 years ago[OpenMP] add check for both simdlen and safelen clauses specified
Kelvin Li [Fri, 15 Jul 2016 04:39:07 +0000 (04:39 +0000)]
[OpenMP] add check for both simdlen and safelen clauses specified

This patch adds the check for specifying both simdlen and safelen clauses on the 'distribute simd' or 'distribute parallel for simd' constructs.

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

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

8 years agoFrontend: Simplify ownership model for clang's output streams.
Peter Collingbourne [Fri, 15 Jul 2016 00:55:40 +0000 (00:55 +0000)]
Frontend: Simplify ownership model for clang's output streams.

This changes the CompilerInstance::createOutputFile function to return
a std::unique_ptr<llvm::raw_ostream>, rather than an llvm::raw_ostream
implicitly owned by the CompilerInstance. This in most cases required that
I move ownership of the output stream to the relevant ASTConsumer.

The motivation for this change is to allow BackendConsumer to be a client
of interfaces such as D20268 which take ownership of the output stream.

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

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

8 years agoRemove the new module cache from the index-module test
Ben Langmuir [Thu, 14 Jul 2016 22:53:23 +0000 (22:53 +0000)]
Remove the new module cache from the index-module test

Forgot to add the new cache to the `rm -rf` line. This broke some bots
when trying to load a module built with an older compiler.

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

8 years agoC does not have inline variables.
Paul Robinson [Thu, 14 Jul 2016 22:22:58 +0000 (22:22 +0000)]
C does not have inline variables.
Add a few missing tests for related C++ diagnostics.

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

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

8 years agoAdd test inputs missed by r275481.
Richard Smith [Thu, 14 Jul 2016 22:15:06 +0000 (22:15 +0000)]
Add test inputs missed by r275481.

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

8 years ago[modules] Don't pass interesting decls to the consumer for a module file that's
Richard Smith [Thu, 14 Jul 2016 21:50:09 +0000 (21:50 +0000)]
[modules] Don't pass interesting decls to the consumer for a module file that's
passed on the command line but never actually used. We consider a (top-level)
module to be used if any part of it is imported, either by the current
translation unit, or by any part of a top-level module that is itself used.

(Put another way, a module is used if an implicit modules build would have
loaded its .pcm file.)

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

8 years ago[arcmt/objcmt] Fix ParentMap crash with invalid code.
Argyrios Kyrtzidis [Thu, 14 Jul 2016 20:21:16 +0000 (20:21 +0000)]
[arcmt/objcmt] Fix ParentMap crash with invalid code.

rdar://22489560

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

8 years agoAttempt to workaround Windows bots after my previous commit
Ben Langmuir [Thu, 14 Jul 2016 20:08:43 +0000 (20:08 +0000)]
Attempt to workaround Windows bots after my previous commit

For some reason it seems the second invocation is getting DMOD_OTHER_H
set to a path with/forward/slashes, but one of the use sites
has\back\slashes. There should be no difference with what was already
there, but for now try to avoid checking those paths.

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

8 years agoReverting 275417
Roger Ferrer Ibanez [Thu, 14 Jul 2016 20:05:30 +0000 (20:05 +0000)]
Reverting 275417

This change has triggered unexpected failures.

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

8 years agoWhen importing classes and structs with anonymous structs, it is critical that
Sean Callanan [Thu, 14 Jul 2016 19:53:44 +0000 (19:53 +0000)]
When importing classes and structs with anonymous structs, it is critical that
distinct anonymous structs remain distinct despite having similar layout.

This is already ensured by distinguishing based on their placement in the parent
struct, using the function `findAnonymousStructOrUnionIndex`.

The problem is that this function only handles anonymous structs, like
```
class Foo { struct { int a; } }
```
and not untagged structs like
```
class Foo { struct { int a; } var; }
```
Both need to be handled, and this patch fixes that.  The test case ensures that this functionality doesn't regress.

Thanks to Manman Ren for review.

https://reviews.llvm.org/D22270

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

8 years ago[index] Index system ImportDecls even when there is a DeclarationsOnly filter
Ben Langmuir [Thu, 14 Jul 2016 18:51:55 +0000 (18:51 +0000)]
[index] Index system ImportDecls even when there is a DeclarationsOnly filter

Whether we call an ImportDecl a decl or a reference symbol role is
somewhat academic, but in practice it's more like a declaration because
it is interesting even to consumers who wouldn't care about references.
Most importantly, we want to report the module dependencies of system
modules even when we have declaration-only filtering.

rdar://problem/27134855

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

8 years agoDespite there being an option, it seems that Sphinx has decided that "=123" is part...
Aaron Ballman [Thu, 14 Jul 2016 17:15:06 +0000 (17:15 +0000)]
Despite there being an option, it seems that Sphinx has decided that "=123" is part of the option directive name, and so having "=0" in the option tag is problematic. Since the option tag is part of the option directive definition, it's superfluous, and so I've removed it.

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

8 years agoRemoving a few more :option: tags that we do not have corresponding .. option directi...
Aaron Ballman [Thu, 14 Jul 2016 15:32:11 +0000 (15:32 +0000)]
Removing a few more :option: tags that we do not have corresponding .. option directives for; these are causing the sphinx bot to fail (http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/15197/steps/docs-clang-html/logs/stdio).

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

8 years ago[OpenCL] In test/Driver/opencl.cl, don't require name of Clang binary to contain...
Benjamin Kramer [Thu, 14 Jul 2016 15:06:57 +0000 (15:06 +0000)]
[OpenCL] In test/Driver/opencl.cl, don't require name of Clang binary to contain "clang"

The test currently fails if the name of the Clang binary doesn't contain "clang".

This patch removes that requirement, as some environments may choose to run the test with a differently named binary. This shouldn't make the test any less strict -- the only place where the flags we're searching for can really occur is the Clang command line.

Patch by Martin Böhme!

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

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

8 years agoDiagnose taking address and reference binding of packed members
Roger Ferrer Ibanez [Thu, 14 Jul 2016 14:10:43 +0000 (14:10 +0000)]
Diagnose taking address and reference binding of packed members

This patch implements PR#22821.

Taking the address of a packed member is dangerous since the reduced
alignment of the pointee is lost. This can lead to memory alignment
faults in some architectures if the pointer value is dereferenced.

This change adds a new warning to clang emitted when taking the address
of a packed member. A packed member is either a field/data member
declared as attribute((packed)) or belonging to a struct/class
declared as such. The associated flag is -Waddress-of-packed-member.
Conversions (either implicit or via a valid casting) to pointer types
with lower or equal alignment requirements (e.g. void* or char*)
silence the warning.

This change also adds a new error diagnostic when the user attempts to
bind a reference to a packed member, regardless of the alignment.

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

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

8 years agoRemoving more :option: tags that we do not have corresponding .. option directives...
Aaron Ballman [Thu, 14 Jul 2016 14:07:37 +0000 (14:07 +0000)]
Removing more :option: tags that we do not have corresponding .. option directives for; these are causing the sphinx bot to fail (http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/15195/steps/docs-clang-html/logs/stdio).

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

8 years agoThe test added in r275267 does not work on read-only checkouts because of the use...
Pierre Gousseau [Thu, 14 Jul 2016 13:58:27 +0000 (13:58 +0000)]
The test added in r275267 does not work on read-only checkouts because of the use of touch -m -t.
Following Tom Rybka suggestion, the test files are now copied to a temporary directory first.

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

8 years agoUpgrade all the .arcconfigs to https.
Benjamin Kramer [Thu, 14 Jul 2016 13:15:37 +0000 (13:15 +0000)]
Upgrade all the .arcconfigs to https.

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

8 years agoThis is a malformed :option: tag -- we don't have an option directive that matches...
Aaron Ballman [Thu, 14 Jul 2016 13:01:00 +0000 (13:01 +0000)]
This is a malformed :option: tag -- we don't have an option directive that matches it, so turning it actual text instead of a markup tag. This will hopefully fix the clang docs build (http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/15194/steps/docs-clang-html/logs/stdio)

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

8 years ago[OpenCL] Actually activate Frontend/opencl.cl test and fix test bugs
Benjamin Kramer [Thu, 14 Jul 2016 12:56:21 +0000 (12:56 +0000)]
[OpenCL] Actually activate Frontend/opencl.cl test and fix test bugs

rL275318 added the test Frontend/opencl.cl test, but that test was never actually run because Frontend/lit.local.cfg doesn't contain the '.cl' file suffix.

Once the test is activated, it fails with (unintended) compile errors in the newly added CHECK_INVALID_OPENCL_VERSION checks.

This patch adds the '.cl' file suffix to Frontend/lit.local.cfg to activate the test and fixes the test bug by adding '-fblocks' to the relevant command lines.

Patch by Martin Böhme!

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

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

8 years agoCorrect the attribute documentation for the new XRay attributes. Fixes the documentat...
Aaron Ballman [Thu, 14 Jul 2016 12:35:00 +0000 (12:35 +0000)]
Correct the attribute documentation for the new XRay attributes. Fixes the documentation build.

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

8 years ago[X86][AVX512F] minor fix of the parameter names
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

8 years agoUse hasFlag instead of hasArg
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

8 years agoAdd C++ dependencies to xray runtime
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

8 years ago[OpenMP] Sema and parsing for 'target parallel for simd' pragma
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

8 years agoAdd a comment mirroring the one in LLVM's Dwarf.h
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

8 years agowww/cxx_status: give more precise links to initialization order wording
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

8 years agoP0305R0: Semantic analysis and code generation for C++17 init-statement for 'if'...
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

8 years agoAdd XRay flags to Clang. We implement two flags to control the XRay behaviour:
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

8 years ago[test] Add 'env' to fix test failures in windows bots.
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

8 years ago[OpenMP] remove duplicate code in ActOnOpenMPRegionStart
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

8 years ago[OpenCL] Fixes failures in test/Driver/opencl.cl.
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

8 years ago[OpenMP] add more tests for 'distribute parallel for simd' pragma
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

8 years ago[PCH/preamble] Make sure that if the preamble/PCH was serialized with errors that...
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

8 years ago[OpenMP] add more tests for 'distribute simd' pragma
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

8 years agoImplement FunctionDecl::getDefinition() to be consistent with
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

8 years ago[analyzer] Implement a methond to discover origin region of a symbol.
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

8 years ago[OpenMP] Initial implementation of parse+sema for OpenMP clause 'is_device_ptr' of...
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

8 years ago[OpenMP] Initial implementation of parse+sema for clause use_device_ptr of 'target...
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

8 years ago[PCH] Add a fno-pch-timestamp option to cc1 to disable inclusion of timestamps in...
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

8 years ago[PCH] Fix timestamp check on windows hosts.
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

8 years ago[OpenCL] Fix code generation of kernel pipe parameters.
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

8 years agofix missing whitespace in sphinx doc
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

8 years agoCodeGen: minor cleanup, NFC
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

8 years ago[CUDA] Use the multi-element remove function in EraseUnwantedCUDAMatches.
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

8 years ago[CUDA] Add additional testcases for EraseUnwantedCUDAMatches.
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

8 years ago[CUDA] Don't assume that destructors can't be overloaded.
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

8 years agoAArch64: fix return type of vqmovun_high_*.
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

8 years agoFix for the mingw builder
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

8 years ago[ItaniumMangle] Correctly mangle BuiltinTemplateDecls
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

8 years agoclang-format: [JS] Allow top-level conditionals again.
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

8 years ago[Clang][AVX512] Making cosmetic changes
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

8 years ago[ASTMatchers] isSignedInteger() and isUnsignedInteger()
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

8 years ago[MS ABI] Support throwing/catching __unaligned types
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

8 years agoCorrecting the previous fix for test submitted with r275115.
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

8 years agoFix test submitted with r275115 (failed on ppc64 buildbots).
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

8 years ago[Coverage] Do not map regions from system headers
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

8 years ago[Coverage] Move logic to skip decl's into a helper (NFC)
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

8 years agoPrevent the creation of empty (forwarding) blocks resulting from nested ifs.
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

8 years ago[NFC] Reorder fields of VersionTuple to reduce size
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

8 years ago[Sema] Don't artificially forbid BuiltinTemplateDecls in CheckTemplateArgument
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

8 years ago[man page] Document -gline-tables-only in the clang man page.
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

8 years ago[man page] Fix two sphinx build errors.
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

8 years agoMake tooling::applyAllReplacements return llvm::Expected<string> instead of empty...
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

8 years ago[OpenCL] Improved diagnostics of OpenCL types.
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

8 years ago[AVX512] Replace masked AND/OR/XOR intrinsics with native code and remove the builtins.
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

8 years ago[Sema] Disallow __make_integer_seq from showing up in __make_integer_seq
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

8 years agoRevert r275029 - Update Clang tests after adding inference for the returned argument...
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

8 years ago[CodeGen] Treat imported static local variables as declarations
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

8 years agoReapply SVN r274797.
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

8 years agoAMDGPU: Export workitem builtins
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

8 years agoUpdate Clang tests after adding inference for the returned argument attribute
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

8 years ago[AVX512] Remove masked shufps/shudpd builtins. These are all handled with __builtin_s...
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

8 years ago[X86] Use __butilin_shufflevector for 512-bit shufps intrinsics.
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

8 years agoAdd CLANG_BUILD_TOOLS as a clang counterpart for LLVM_BUILD_TOOLS
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

8 years agoDelete dead code.
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

8 years agoMove add_clang_* entry points from the main clang CMakeLists.txt to cmake/modules...
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

8 years ago[clang-cl] Add support for /Zd
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

8 years ago[MS ABI] Some code cleanups
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

8 years ago[AST] Tighten up some bitfields
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

8 years agoclang-format: [JS] Sort imports case insensitive.
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

8 years agoclang-format: [JS] support trailing commas in imports.
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

8 years ago[analyzer] Older version of GCC 4.7 crash on lambdas in default arguments.
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

8 years ago[analyzer] Rewrite manual erase loop using remove_if.
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