]> granicus.if.org Git - clang/log
clang
8 years agoAdd support of the latest Ubuntu (Yakkety Yak - 16.10)
Sylvestre Ledru [Tue, 19 Jul 2016 14:00:57 +0000 (14:00 +0000)]
Add support of the latest Ubuntu (Yakkety Yak - 16.10)

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

8 years agoFix for failing bot sanitizer-x86_64-linux-fast after r275970
Dmitry Polukhin [Tue, 19 Jul 2016 13:35:15 +0000 (13:35 +0000)]
Fix for failing bot sanitizer-x86_64-linux-fast after r275970

More info http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/14774/steps/check-clang%20msan/logs/stdio

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

8 years agoDeprecated (legacy) string literal conversion to 'char *' causes strange overloading...
Dmitry Polukhin [Tue, 19 Jul 2016 11:29:16 +0000 (11:29 +0000)]
Deprecated (legacy) string literal conversion to 'char *' causes strange overloading resolution

It's a patch for PR28050. Seems like overloading resolution wipes out
the first standard conversion sequence (before user-defined conversion)
in case of deprecated string literal conversion.

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

Patch by Alexander Makarov

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

8 years ago[mips] Correct label prefixes for N32 and N64.
Daniel Sanders [Tue, 19 Jul 2016 10:49:03 +0000 (10:49 +0000)]
[mips] Correct label prefixes for N32 and N64.

Summary:
N32 and N64 follow the standard ELF conventions (.L) whereas O32 uses its own
($).

This fixes the majority of object differences between -fintegrated-as and
-fno-integrated-as.

Reviewers: sdardis

Subscribers: dsanders, sdardis, llvm-commits

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

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

8 years ago[driver][mips] Remove empty folder from test inputs
Simon Atanasyan [Tue, 19 Jul 2016 07:23:15 +0000 (07:23 +0000)]
[driver][mips] Remove empty folder from test inputs

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

8 years ago[driver][mips] Support MIPS targets in modern Android NDK
Simon Atanasyan [Tue, 19 Jul 2016 07:09:48 +0000 (07:09 +0000)]
[driver][mips] Support MIPS targets in modern Android NDK

Initial patch provided by Duane Sand.

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

8 years ago[OPENMP] Removed loop statement as its body executes at most once, NFC.
Alexey Bataev [Tue, 19 Jul 2016 05:06:39 +0000 (05:06 +0000)]
[OPENMP] Removed loop statement as its body executes at most once, NFC.

Removed not required loop statement, addressing comments from Richard
Smith.

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

8 years ago[OPENMP] Improved processing of 'priority' clause, NFC.
Alexey Bataev [Tue, 19 Jul 2016 04:21:09 +0000 (04:21 +0000)]
[OPENMP] Improved processing of 'priority' clause, NFC.

Removed some old comments + improved handling of 'priority' clause value
during codegen after comments from Richard Smith.

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

8 years agoAppend clang system include path for offloading tool chains.
Samuel Antao [Tue, 19 Jul 2016 00:01:12 +0000 (00:01 +0000)]
Append clang system include path for offloading tool chains.

Summary:
This patch adds clang system include path when offloading tool chains, e.g. CUDA, are used in the current compilation.

This fixes an issue detected by @rsmith in response to r275645.

Reviewers: rsmith, tra

Subscribers: rsmith, cfe-commits

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

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

8 years ago[OpenMP] Remove dead code in conditional of mappable expressions SEMA.
Samuel Antao [Mon, 18 Jul 2016 23:22:11 +0000 (23:22 +0000)]
[OpenMP] Remove dead code in conditional of mappable expressions SEMA.

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

8 years ago[OpenMP] Fix incorrect diagnostics in map clause
Kelvin Li [Mon, 18 Jul 2016 22:49:16 +0000 (22:49 +0000)]
[OpenMP] Fix incorrect diagnostics in map clause

Having the following code pattern will result in incorrect diagnostic

int main() {
  int arr[10];
#pragma omp target data map(arr[:])
#pragma omp target map(arr)
  {}
}

t.cpp:4:24: error: original storage of expression in data environment is shared
      but data environment do not fully contain mapped expression storage
#pragma omp target map(arr)
                       ^~~
t.cpp:3:29: note: used here
#pragma omp target data map(arr[:])
                            ^~~~~~
1 error generated.

Patch by David S.

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

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

8 years agoFix some minor issues found by Coverity.
Richard Smith [Mon, 18 Jul 2016 22:37:35 +0000 (22:37 +0000)]
Fix some minor issues found by Coverity.

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

8 years ago[Coverage] Remove '..' from filenames *after* getting an absolute path
Vedant Kumar [Mon, 18 Jul 2016 22:32:02 +0000 (22:32 +0000)]
[Coverage] Remove '..' from filenames *after* getting an absolute path

Failure to do this breaks relative paths which begin with '..'.

This issue was caught by the (still nascent) coverage bot.

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

8 years ago[Coverage] Normalize '..' out of filename strings
Vedant Kumar [Mon, 18 Jul 2016 21:01:27 +0000 (21:01 +0000)]
[Coverage] Normalize '..' out of filename strings

This fixes the issue of having duplicate entries for the same file in a
coverage report s.t none of the entries actually displayed the correct
coverage information.

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

8 years ago[Sema] Create a separate group for incompatible function pointer warning
Bruno Cardoso Lopes [Mon, 18 Jul 2016 20:37:06 +0000 (20:37 +0000)]
[Sema] Create a separate group for incompatible function pointer warning

Give incompatible function pointer warning its own diagnostic group
but still leave it as a subgroup of incompatible-pointer-types. This is in
preparation to promote -Wincompatible-function-pointer-types to error on
darwin.

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

rdar://problem/12907612

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

8 years agoAdd missing header in ClangFuzzer (after r275882 cleanup)
Mehdi Amini [Mon, 18 Jul 2016 20:33:09 +0000 (20:33 +0000)]
Add missing header in ClangFuzzer (after r275882 cleanup)

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

8 years agoAllow iOS and tvOS version numbers with 2-digit major version numbers.
Bob Wilson [Mon, 18 Jul 2016 20:29:14 +0000 (20:29 +0000)]
Allow iOS and tvOS version numbers with 2-digit major version numbers.

rdar://problem/26921601

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

8 years ago[Driver] Compute effective target triples once per job (NFCI)
Vedant Kumar [Mon, 18 Jul 2016 19:56:38 +0000 (19:56 +0000)]
[Driver] Compute effective target triples once per job (NFCI)

Compute an effective target triple exactly once in ConstructJob(), and
then simply pass around references to it. This eliminates wasteful
re-computation of effective triples (e.g in getARMFloatABI()).

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

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

8 years ago[Driver] Make Driver::DefaultTargetTriple private (NFCI)
Vedant Kumar [Mon, 18 Jul 2016 19:56:33 +0000 (19:56 +0000)]
[Driver] Make Driver::DefaultTargetTriple private (NFCI)

No in-tree targets access this `DefaultTargetTriple` directly, and usage
of default triples is generally discouraged. Make the field private.

This is part of en effort to make the clang driver use effective triples
more pervasively.

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

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

8 years ago[NFC] Header cleanup
Mehdi Amini [Mon, 18 Jul 2016 19:02:11 +0000 (19:02 +0000)]
[NFC] Header cleanup

Summary: Removed unused headers, replaced some headers with forward class declarations

Patch by: Eugene <claprix@yandex.ru>

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

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

8 years agoRevert "[analyzer] Add checker modeling potential C++ self-assignment"
Devin Coughlin [Mon, 18 Jul 2016 18:57:50 +0000 (18:57 +0000)]
Revert "[analyzer] Add checker modeling potential C++ self-assignment"

This reverts commit r275820. It is failing on the bots.

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

8 years agoSupport -masm= flag for x86 assembly targets.
Yunzhong Gao [Mon, 18 Jul 2016 18:44:51 +0000 (18:44 +0000)]
Support -masm= flag for x86 assembly targets.

For assembly files without .intel_syntax or .att_syntax directives, allow the
-masm= flag to supply a default assembly dialect. For example,

C:\TMP> type intel.s
.text
mov al,0

C:\TMP> clang -masm=intel -c intel.s

Without this patch, one would need to pass an "-mllvm -x86-asm-syntax=" flag
directly to the backend.
C:\TMP> clang -mllvm --x86-asm-syntax=intel -c intel.s

Differentials Review: http://reviews.llvm.org/D22285

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

8 years agodocs/conf.py: update version to 4.0
Hans Wennborg [Mon, 18 Jul 2016 18:13:08 +0000 (18:13 +0000)]
docs/conf.py: update version to 4.0

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

8 years agoTrunk release notes are now for 4.0.0
Hans Wennborg [Mon, 18 Jul 2016 18:05:19 +0000 (18:05 +0000)]
Trunk release notes are now for 4.0.0

The 3.9 release are on the 3.9 branch.

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

8 years ago[clang-cl] Reinstate -gline-tables-only as a CoreOption while we sort out the fate...
Reid Kleckner [Mon, 18 Jul 2016 17:49:40 +0000 (17:49 +0000)]
[clang-cl] Reinstate -gline-tables-only as a CoreOption while we sort out the fate of /Zd

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

8 years ago[analyzer] Add checker modeling potential C++ self-assignment
Devin Coughlin [Mon, 18 Jul 2016 17:23:30 +0000 (17:23 +0000)]
[analyzer] Add checker modeling potential C++ self-assignment

This checker checks copy and move assignment operators whether they are
protected against self-assignment. Since C++ core guidelines discourages
explicit checking for `&rhs==this` in general we take a different approach: in
top-frame analysis we branch the exploded graph for two cases, where &rhs==this
and &rhs!=this and let existing checkers (e.g. unix.Malloc) do the rest of the
work. It is important that we check all copy and move assignment operator in top
frame even if we checked them already since self-assignments may happen
undetected even in the same translation unit (e.g. using random indices for an
array what may or may not be the same).

A patch by Ádám Balogh!

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

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

8 years agoRelease note for 'nodebug' on variables
Paul Robinson [Mon, 18 Jul 2016 17:19:12 +0000 (17:19 +0000)]
Release note for 'nodebug' on variables

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

8 years ago[OpenMP] update test cases for -std=c++11 compile
Kelvin Li [Mon, 18 Jul 2016 16:09:53 +0000 (16:09 +0000)]
[OpenMP] update test cases for -std=c++11 compile

target_parallel_for_simd_collapse_messages.cpp and target_parallel_for_simd_ordered_messages.cpp give different diagnostic messages in compiling with -std=c++11. The test cases are updated to make it compatible.

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

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

8 years agoRevert r275678, "Revert "Revert r275027 - Let FuncAttrs infer the 'returned' argument...
NAKAMURA Takumi [Mon, 18 Jul 2016 03:23:25 +0000 (03:23 +0000)]
Revert r275678, "Revert "Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute""

This reverts also r275029, "Update Clang tests after adding inference for the returned argument attribute"

It broke LTO build. Seems miscompilation.

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

8 years agotest: add missing triple to test
Saleem Abdulrasool [Sun, 17 Jul 2016 22:54:42 +0000 (22:54 +0000)]
test: add missing triple to test

The test was relying on the default triple which may not be correct.  Explicitly
provide it a triple.  Should repair the windows on Linux builder.

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

8 years agoCodeGen: honour dllstorage on ObjC types
Saleem Abdulrasool [Sun, 17 Jul 2016 22:27:44 +0000 (22:27 +0000)]
CodeGen: honour dllstorage on ObjC types

Add support for ObjC types to respect the DLLImport/DLLExport storage
annotations.  This only effects COFF output.  This would allow usage with
clang/C2, but not with clang/LLVM due to hard coded section names.

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

8 years agoCodeGen: whitespace, formatting cleanups, NFC
Saleem Abdulrasool [Sun, 17 Jul 2016 22:27:41 +0000 (22:27 +0000)]
CodeGen: whitespace, formatting cleanups, NFC

Format some code which was oddly formatted.  Use a bit of auto to make the code
more legible.  NFC.

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

8 years agoCodeGen: whitespace cleanup, StringRef usage in ObjC EH type construction
Saleem Abdulrasool [Sun, 17 Jul 2016 22:27:38 +0000 (22:27 +0000)]
CodeGen: whitespace cleanup, StringRef usage in ObjC EH type construction

Clean up some formatting issues and use a bit more StringRef based operations
instead of SmallStrings.  NFC.

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

8 years agoAttempt to work around MSVC rejects-valid, round 2.
Richard Smith [Sun, 17 Jul 2016 20:00:59 +0000 (20:00 +0000)]
Attempt to work around MSVC rejects-valid, round 2.

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

8 years agoPR28589: attempt to work around MSVC rejects-valid.
Richard Smith [Sun, 17 Jul 2016 19:24:51 +0000 (19:24 +0000)]
PR28589: attempt to work around MSVC rejects-valid.

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

8 years ago[CodeGen] Some assorted cleanups
David Majnemer [Sun, 17 Jul 2016 00:39:12 +0000 (00:39 +0000)]
[CodeGen] Some assorted cleanups

No functional change, just some cleanups:
- Use auto when it is appropriate.
- There were some strange static_casts which were superfluous.
- Use range-based for loops when appropriate.
- The dyn_cast_or_null construct was used when null was impossible.

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

8 years agoCodeGen: use StringRefs more in ObjC class generation, NFC
Saleem Abdulrasool [Sat, 16 Jul 2016 22:42:06 +0000 (22:42 +0000)]
CodeGen: use StringRefs more in ObjC class generation, NFC

Rather than building up a number of SmallString-s in order to construct a
std::string, use more StringRefs and construct the string once before use.  This
avoids unnecessary string constructions.  NFC.

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

8 years agoCodeGen: simplify using a local variable, NFC
Saleem Abdulrasool [Sat, 16 Jul 2016 22:42:04 +0000 (22:42 +0000)]
CodeGen: simplify using a local variable, NFC

Add a couple of local variables for the class interface and the super class
interface.  This allows for the repeated access of the information to be cached
and makes the code simpler to understand.  NFC.

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

8 years agoRevert "Revert r275029 - Update Clang tests after adding inference for the returned...
Hal Finkel [Sat, 16 Jul 2016 07:22:09 +0000 (07:22 +0000)]
Revert "Revert r275029 - Update Clang tests after adding inference for the returned argument attribute"

This reverts commit r275043 after reapplying the underlying LLVM commit.

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

8 years ago[Driver] Add flags for enabling both types of PGO Instrumentation
Sean Silva [Sat, 16 Jul 2016 02:54:58 +0000 (02:54 +0000)]
[Driver] Add flags for enabling both types of PGO Instrumentation

The flags:
Enable IR-level instrumentation -fprofile-generate or -fprofile-generate=
When applying profile data: -fprofile-use=/path/to/profdata

Patch by Jake VanAdrighem!

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

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

8 years agoRemove extra semi-colon. Fixes warning and Werror bots.
Eric Christopher [Sat, 16 Jul 2016 00:58:34 +0000 (00:58 +0000)]
Remove extra semi-colon. Fixes warning and Werror bots.

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

8 years ago[ObjC] Implement @available in the Parser and AST
Erik Pilkington [Sat, 16 Jul 2016 00:35:23 +0000 (00:35 +0000)]
[ObjC] Implement @available in the Parser and AST

This patch adds a new AST node: ObjCAvailabilityCheckExpr, and teaches the
Parser and Sema to generate it. This node represents an availability check of
the form:

  @available(macos 10.10, *);

Which will eventually compile to a runtime check of the host's OS version. This
is the first patch of the feature I proposed here:
http://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html

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

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

8 years agoReimplement ExternalSemaSource delegation in terms of
Richard Smith [Sat, 16 Jul 2016 00:35:14 +0000 (00:35 +0000)]
Reimplement ExternalSemaSource delegation in terms of
MultiplexExternalSemaSource to remove one of the places that needs updating
every time the ExternalSemaSource interface changes.

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

8 years agoUse std::string instead of StringRef when generating the auxiliar triple in the front...
Samuel Antao [Sat, 16 Jul 2016 00:15:56 +0000 (00:15 +0000)]
Use std::string instead of StringRef when generating the auxiliar triple in the frontend tool.

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

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