]> granicus.if.org Git - clang/log
clang
8 years agoclang/unittests/Analysis/CFGTest.cpp: Appease msc targets with -fno-delayed-template...
NAKAMURA Takumi [Fri, 8 Jul 2016 16:52:36 +0000 (16:52 +0000)]
clang/unittests/Analysis/CFGTest.cpp: Appease msc targets with -fno-delayed-template-parsing.

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

8 years agoExplicitly export symbols from the sample analyzer plugin
John Brawn [Fri, 8 Jul 2016 16:20:57 +0000 (16:20 +0000)]
Explicitly export symbols from the sample analyzer plugin

This is done so that it will work when built using MSVC if
LLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON.

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

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

8 years agoDon't crash when printing auto variables.
Vassil Vassilev [Fri, 8 Jul 2016 16:04:22 +0000 (16:04 +0000)]
Don't crash when printing auto variables.

Patch by Axel Naumann!

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

8 years ago[OpenCL] Fix access qualifiers handling for typedefs
Alexey Bader [Fri, 8 Jul 2016 15:34:59 +0000 (15:34 +0000)]
[OpenCL] Fix access qualifiers handling for typedefs

OpenCL s6.6: "Access qualifier must be used with image object arguments
of kernels and of user-defined functions [...] If no qualifier is
provided, read_only is assumed".

This does not define the behavior for image types used in typedef
declaration, but following the spec logic, we should allow access
qualifiers specification in typedefs, e.g.:

  typedef write_only image1d_t img1d_wo;

Unlike cv-qualifiers, user cannot add access qualifier to a typedef
type, i.e. this is not allowed:

  typedef image1d_t img1d; // note: previously declared 'read_only' here
  void foo(write_only img1d im) {} // error: multiple access qualifier

Patch by Andrew Savonichev.
Reviewers: Anastasia Stulova.

Differential revision: http://reviews.llvm.org/D20948

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

8 years ago[ASTMatchers] Add missing forEachArgumentWithParam() to code sample
Alexander Kornienko [Fri, 8 Jul 2016 10:51:00 +0000 (10:51 +0000)]
[ASTMatchers] Add missing forEachArgumentWithParam() to code sample

Reviewers: klimek

Subscribers: cfe-commits, klimek

Patch by Martin Boehme!

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

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

8 years agoCFGBuilder: Fix crash when visiting a range-based for over a dependent type
Alexander Kornienko [Fri, 8 Jul 2016 10:50:51 +0000 (10:50 +0000)]
CFGBuilder: Fix crash when visiting a range-based for over a dependent type

Summary:
CFG generation is expected to fail in this case, but it should not crash.

Also added a test that reproduces the crash.

Reviewers: klimek

Subscribers: cfe-commits

Patch by Martin Boehme!

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

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

8 years agoRecommit r274348 and r274349. The Windows failures should be fixed.
Vassil Vassilev [Fri, 8 Jul 2016 08:33:56 +0000 (08:33 +0000)]
Recommit r274348 and r274349. The Windows failures should be fixed.

Original commit message:
"Add postorder traversal support to the RecursiveASTVisitor.

This feature needs to be explicitly enabled by overriding shouldTraversePostOrder()
as it has performance drawbacks for the iterative Stmt-traversal.

Patch by Raphael Isemann!

Reviewed by Richard Smith and Benjamin Kramer."

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

8 years ago[X86] Remove dead builtins that don't exist in the backend intrinsic file and don...
Craig Topper [Fri, 8 Jul 2016 05:11:47 +0000 (05:11 +0000)]
[X86] Remove dead builtins that don't exist in the backend intrinsic file and don't have custom handling in CGBuiltins.cpp either.

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

8 years ago[CodeGen] Use llvm::Type::getVectorNumElements instead of casting to llvm::VectorType...
Craig Topper [Fri, 8 Jul 2016 02:17:35 +0000 (02:17 +0000)]
[CodeGen] Use llvm::Type::getVectorNumElements instead of casting to llvm::VectorType and calling getNumElements. This is equivalent and shorter.

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

8 years ago[X86] Reuse existing lambda and remove unnecessary argument from vector cmp builtin...
Craig Topper [Fri, 8 Jul 2016 01:57:24 +0000 (01:57 +0000)]
[X86] Reuse existing lambda and remove unnecessary argument from vector cmp builtin handling. NFC

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

8 years ago[X86] Remove a couple calls to create V2F64 and V4F32 types for builtin handling...
Craig Topper [Fri, 8 Jul 2016 01:48:44 +0000 (01:48 +0000)]
[X86] Remove a couple calls to create V2F64 and V4F32 types for builtin handling. Just get the type from the operand of the builtin instead. NFC

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

8 years ago[analyzer] Add rudimentary handling of AtomicExpr.
Devin Coughlin [Fri, 8 Jul 2016 00:53:18 +0000 (00:53 +0000)]
[analyzer] Add rudimentary handling of AtomicExpr.

This proposed patch adds crude handling of atomics to the static analyzer.
Rather than ignore AtomicExprs, as we now do, this patch causes the analyzer
to escape the arguments. This is imprecise -- and we should model the
expressions fully in the future -- but it is less wrong than ignoring their
effects altogether.

This is rdar://problem/25353187

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

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

8 years agoRevert "Driver: Stop linking to C++ when using sanitizers on Darwin"
Saleem Abdulrasool [Fri, 8 Jul 2016 00:37:31 +0000 (00:37 +0000)]
Revert "Driver: Stop linking to C++ when using sanitizers on Darwin"

This reverts SVN r274797.  It broke the Green Dragon bot.  Revert it until the
failure can be addressed.

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

8 years ago[CUDA] Pass correct option in test.
Michael Kuperstein [Thu, 7 Jul 2016 23:22:39 +0000 (23:22 +0000)]
[CUDA] Pass correct option in test.

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

8 years ago[Lex] Speed up updateConsecutiveMacroArgTokens (NFC)
Vedant Kumar [Thu, 7 Jul 2016 22:38:29 +0000 (22:38 +0000)]
[Lex] Speed up updateConsecutiveMacroArgTokens (NFC)

SM.isWrittenInSameFile() calls getFileID(), which can be expensive.
Move this check behind some cheaper filters.

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

8 years agoUpdate switch statement to match coding standards.
Simon Pilgrim [Thu, 7 Jul 2016 22:32:26 +0000 (22:32 +0000)]
Update switch statement to match coding standards.

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

8 years agoDriver: Stop linking to C++ when using sanitizers on Darwin
Saleem Abdulrasool [Thu, 7 Jul 2016 21:42:29 +0000 (21:42 +0000)]
Driver: Stop linking to C++ when using sanitizers on Darwin

Sanitizers on Darwin are built as dynamic libraries, not static libraries.
Sanitizers will have their C++ dependency satisfied internally (LC_LOAD_DYLIB)
in the libclang_rt dylib. As long as the sanitizers stay dynamic and not static,
linking against C++ when enabling a sanitizer becomes over linkage.

Patch by Dave Lee!

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

8 years ago[AArch64] Change the preferred alignment for char and short.
Chad Rosier [Thu, 7 Jul 2016 20:02:25 +0000 (20:02 +0000)]
[AArch64] Change the preferred alignment for char and short.

This reinstates commits r273280 and r273289.

Original Review: http://reviews.llvm.org/D21414.

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

8 years ago[CUDA] s/OPT_nocuda_version_chec/OPT_no_cuda_version_check/.
Justin Lebar [Thu, 7 Jul 2016 18:24:28 +0000 (18:24 +0000)]
[CUDA] s/OPT_nocuda_version_chec/OPT_no_cuda_version_check/.

Fix build breakage.

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

8 years ago[CUDA] Check that our CUDA install supports the requested architectures.
Justin Lebar [Thu, 7 Jul 2016 18:17:52 +0000 (18:17 +0000)]
[CUDA] Check that our CUDA install supports the requested architectures.

Summary:
Raise an error if you're using a CUDA installation that's too old for
the requested architectures.  In practice, this means that you need a
CUDA 8 install to compile for sm_6*.

Reviewers: tra

Subscribers: cfe-commits

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

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

8 years ago[CUDA] Rename the __nvvm_bar0 builtin back to __syncthreads.
Justin Lebar [Thu, 7 Jul 2016 18:15:03 +0000 (18:15 +0000)]
[CUDA] Rename the __nvvm_bar0 builtin back to __syncthreads.

The builtin was renamed in r274770.  But __syncthreads is part of our
user-facing API, so we need to keep the name as-is.

Patch by Justin Bogner.

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

8 years agoNVPTX: Use the nvvm builtins to read SRegs rather than the legacy ptx ones
Justin Bogner [Thu, 7 Jul 2016 16:41:08 +0000 (16:41 +0000)]
NVPTX: Use the nvvm builtins to read SRegs rather than the legacy ptx ones

The ptx spellings were removed from LLVM in r274769.

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

8 years agoRevert "[aarch64] Update datalayout for aarch64 tests"
Chad Rosier [Thu, 7 Jul 2016 16:37:21 +0000 (16:37 +0000)]
Revert "[aarch64] Update datalayout for aarch64 tests"

This reverts commit r273289, which was a follow to r273280, which was
reverted because the change was not properly approved.

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

8 years agoRevert "[AArch64] Change the preferred alignment for char and short to word alignment"
Chad Rosier [Thu, 7 Jul 2016 16:37:19 +0000 (16:37 +0000)]
Revert "[AArch64] Change the preferred alignment for char and short to word alignment"

This reverts commit r273280 as the change was not properly approved.

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

8 years agoFix "not all control paths return a value" warning on MSVC
Simon Pilgrim [Thu, 7 Jul 2016 11:24:38 +0000 (11:24 +0000)]
Fix "not all control paths return a value" warning on MSVC

This time without causing a 'all enums handled' warning on other compilers.

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

8 years agoFix "not all control paths return a value" warning on MSVC
Simon Pilgrim [Thu, 7 Jul 2016 11:12:02 +0000 (11:12 +0000)]
Fix "not all control paths return a value" warning on MSVC

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

8 years ago[OPENMP] Do not create helper expressions in dependent contexts, NFC.
Alexey Bataev [Thu, 7 Jul 2016 11:04:06 +0000 (11:04 +0000)]
[OPENMP] Do not create helper expressions in dependent contexts, NFC.

OpenMP relies on some helper expressions generated during semantic
analysis. But they are required only for codegen and not required in
dependent contexts. Patch removes generation of some of helper
expressions.

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

8 years ago[AST] Tighten up the bitfield in TemplateSpecializationType
David Majnemer [Thu, 7 Jul 2016 04:43:11 +0000 (04:43 +0000)]
[AST] Tighten up the bitfield in TemplateSpecializationType

Optimize the bitfield types to conserve space for the MSVC ABI.

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

8 years ago[AST] Use ArrayRef in more interfaces
David Majnemer [Thu, 7 Jul 2016 04:43:07 +0000 (04:43 +0000)]
[AST] Use ArrayRef in more interfaces

ArrayRef is a little better than passing around a pointer/length
pair.

No functional change is intended.

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

8 years ago[CUDA] Fix "control reaches end of non-void function" warnings in Cuda.cpp.
Justin Lebar [Thu, 7 Jul 2016 01:06:59 +0000 (01:06 +0000)]
[CUDA] Fix "control reaches end of non-void function" warnings in Cuda.cpp.

Some compilers are too dumb to realize that the switch statement covers
all cases.

(Don't use a "default" label, because we explicitly want to get a warning
if our switch doesn't cover all the cases.)

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

8 years agoRevert "Retry "Include debug info for nested structs and classes""
Adrian McCarthy [Wed, 6 Jul 2016 23:28:34 +0000 (23:28 +0000)]
Revert "Retry "Include debug info for nested structs and classes""

Reverting because it causes a test failure on build bots (Modules/ModuleDebugInfo.cpp).  Failure does not reproduce locally.

svn revision: rL274698

This reverts commit 3c5ed6599b086720aab5b8bd6941149d066806a6.

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

8 years agoRetry "Include debug info for nested structs and classes"
Adrian McCarthy [Wed, 6 Jul 2016 22:39:15 +0000 (22:39 +0000)]
Retry "Include debug info for nested structs and classes"

This should work now that the LLVM-side of the change has landed successfully.

Original Differential Revision: http://reviews.llvm.org/D21705

This reverts commit a30322e861c387e1088f47065d0438c6bb019879.

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

8 years agoEnsuring the bit-fields have the same type; MSVC will place the fields in different...
Aaron Ballman [Wed, 6 Jul 2016 22:06:19 +0000 (22:06 +0000)]
Ensuring the bit-fields have the same type; MSVC will place the fields in different allocation units otherwise.

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

8 years ago[analyzer] Suppress false positives in std::shared_ptr
Devin Coughlin [Wed, 6 Jul 2016 21:52:55 +0000 (21:52 +0000)]
[analyzer] Suppress false positives in std::shared_ptr

The analyzer does not model C++ temporary destructors completely and so
reports false alarms about leaks of memory allocated by the internals of
shared_ptr:

  std::shared_ptr<int> p(new int(1));
  p = nullptr; // 'Potential leak of memory pointed to by field __cntrl_'

This patch suppresses all diagnostics where the end of the path is inside
a method in std::shared_ptr.

It also reorganizes the tests for suppressions in the C++ standard library
to use a separate simulated header for library functions with bugs
that were deliberately inserted to test suppression. This will prevent
other tests from using these as models.

rdar://problem/23652766

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

8 years ago[CUDA] Add missing namespace qualification on CudaArch in Action.cpp.
Justin Lebar [Wed, 6 Jul 2016 21:45:44 +0000 (21:45 +0000)]
[CUDA] Add missing namespace qualification on CudaArch in Action.cpp.

Fix build breakage with MSVC.

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

8 years ago[CUDA] Rename member variables in CudaInstallationDetector.
Justin Lebar [Wed, 6 Jul 2016 21:21:43 +0000 (21:21 +0000)]
[CUDA] Rename member variables in CudaInstallationDetector.

Summary:
Remove the "Cuda" prefix from these variables -- it's clear that they
related to CUDA given their containing type.

Reviewers: tra

Subscribers: cfe-commits

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

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

8 years ago[CUDA] Add utility functions for dealing with CUDA versions / architectures.
Justin Lebar [Wed, 6 Jul 2016 21:21:39 +0000 (21:21 +0000)]
[CUDA] Add utility functions for dealing with CUDA versions / architectures.

Summary:
Currently our handling of CUDA architectures is scattered all around
clang.  This patch centralizes it.

A key advantage of this centralization is that you can now write a C++
switch on e.g. CudaArch and get a compile error if you don't handle one
of the enum values.

Reviewers: tra

Subscribers: cfe-commits

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

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

8 years ago[CUDA] Add support for CUDA 8 and sm_60-62.
Justin Lebar [Wed, 6 Jul 2016 21:21:14 +0000 (21:21 +0000)]
[CUDA] Add support for CUDA 8 and sm_60-62.

Summary: Also add sm_32, which was missing.

Reviewers: tra

Subscribers: cfe-commits

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

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

8 years ago[CodeGen, DebugInfo] Use hasLocalLinkage instead of hasInternalLinkage
David Majnemer [Wed, 6 Jul 2016 21:07:53 +0000 (21:07 +0000)]
[CodeGen, DebugInfo] Use hasLocalLinkage instead of hasInternalLinkage

For the purpose of emitting debug info, entities with private linkage
should be treated the same as internal linkage.  While this doesn't
change anything in practice, it makes the code a little less confusing.

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

8 years agoNVPTX: Rename __builtin_ptx_shfl -> __nvvm_shfl
Justin Bogner [Wed, 6 Jul 2016 19:52:32 +0000 (19:52 +0000)]
NVPTX: Rename __builtin_ptx_shfl -> __nvvm_shfl

To match "NVPTX: Make the llvm.nvvm.shfl intrinsics and builtin names
consistent" in LLVM.

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

8 years agoEnsuring the bit-fields have the same type; MSVC will place the fields in different...
Aaron Ballman [Wed, 6 Jul 2016 18:33:01 +0000 (18:33 +0000)]
Ensuring the bit-fields have the same type; MSVC will place the fields in different allocation units otherwise.

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

8 years agoAdd AST matchers for handling bit-fields and narrowing based on their width.
Aaron Ballman [Wed, 6 Jul 2016 18:25:16 +0000 (18:25 +0000)]
Add AST matchers for handling bit-fields and narrowing based on their width.

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

8 years ago[SemaExpr] Support assignments from vector to scalars with same size
Bruno Cardoso Lopes [Wed, 6 Jul 2016 18:05:23 +0000 (18:05 +0000)]
[SemaExpr] Support assignments from vector to scalars with same size

Before r266366, clang used to support constructs like:

  typedef __attribute__((vector_size(8))) double float64x1_t;
  typedef __attribute__((vector_size(16))) double float64x2_t;
  float64x1_t vget_low_f64(float64x2_t __p0);

  double y = 3.0 + vget_low_f64(v);

But it would reject:

  double y = vget_low_f64(v) + 3.0;

It also always rejected assignments:

  double y = vget_low_f64(v);

This patch: (a) revivies the behavior of `3.0 + vget_low_f64(v)` prior to
r266366, (b) add support for `vget_low_f64(v) + 3.0` and (c) add support for
assignments.

These vector semantics have never really been tied up but it seems
odd that we used to support some binop froms but do not support
assignment. If we did support scalar for the purposes of arithmetic, we
should probably be able to reinterpret as scalar for the purposes of
assignment too.

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

rdar://problem/26093791

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

8 years agoRevert "Include debug info for nested structs and classes"
Adrian McCarthy [Wed, 6 Jul 2016 15:15:38 +0000 (15:15 +0000)]
Revert "Include debug info for nested structs and classes"

This reverts commit 0af5ee9631c7c167dc40498b415876553e314c95.

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

8 years agoInclude debug info for nested structs and classes
Adrian McCarthy [Wed, 6 Jul 2016 14:46:42 +0000 (14:46 +0000)]
Include debug info for nested structs and classes

This includes nested types in the member list, even if there are no members of that type. Note that structs and classes have themselves as an "implicit struct" as the first member, so we skip implicit ones.

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

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

8 years agoAdd negative test for TBAA
Roger Ferrer Ibanez [Wed, 6 Jul 2016 07:13:49 +0000 (07:13 +0000)]
Add negative test for TBAA

Revision r178818 added tests for TBAA but was missing negative tests to ensure
that TBAA markers are not emitted when TBAA is off.

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

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

8 years ago[X86] Use native IR for immediate values 0-7 of packed fp cmp builtins. This makes...
Craig Topper [Wed, 6 Jul 2016 06:27:31 +0000 (06:27 +0000)]
[X86] Use native IR for immediate values 0-7 of packed fp cmp builtins. This makes them the same as what is done when using the SSE builtins for these same encodings.

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

8 years ago[OpenMP] Sema and parsing for 'distribute simd' pragma
Kelvin Li [Wed, 6 Jul 2016 04:45:38 +0000 (04:45 +0000)]
[OpenMP] Sema and parsing for 'distribute simd' pragma

Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute simd'.

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

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

8 years ago[AVX512] Use the generic ctlz intrinsic to implement the vplzcntd/q builtins.
Craig Topper [Wed, 6 Jul 2016 04:24:29 +0000 (04:24 +0000)]
[AVX512] Use the generic ctlz intrinsic to implement the vplzcntd/q builtins.

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

8 years ago[AST] Use ArrayRef in more interfaces
David Majnemer [Wed, 6 Jul 2016 04:19:16 +0000 (04:19 +0000)]
[AST] Use ArrayRef in more interfaces

ArrayRef is a little better than passing around a pointer/length pair.

No functional change is intended.

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

8 years ago[AVX512] The 128 and 256-bit vplzcnt builtins require avx512cd in addition to avx512vl.
Craig Topper [Wed, 6 Jul 2016 03:25:17 +0000 (03:25 +0000)]
[AVX512] The 128 and 256-bit vplzcnt builtins require avx512cd in addition to avx512vl.

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

8 years agoDelete some dead code, NFC
Vedant Kumar [Wed, 6 Jul 2016 03:08:47 +0000 (03:08 +0000)]
Delete some dead code, NFC

Found using clang's code coverage tool.

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

8 years ago[OpenMP] remove outdated comment (NFC)
Kelvin Li [Tue, 5 Jul 2016 21:38:53 +0000 (21:38 +0000)]
[OpenMP] remove outdated comment (NFC)

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

8 years ago[Sema] Fix a bug where pack expansion was not expanded in type alias
Erik Pilkington [Tue, 5 Jul 2016 17:57:24 +0000 (17:57 +0000)]
[Sema] Fix a bug where pack expansion was not expanded in type alias

The problem is that the parameter pack in a function type type alias is not
reexpanded after being transformed. Also remove an incorrect comment in a
similar function. Fixes PR26017.

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

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

8 years agoRe-apply "test: Use add_lit_testsuites so that subsets of tests can be specified"
Justin Bogner [Tue, 5 Jul 2016 17:54:40 +0000 (17:54 +0000)]
Re-apply "test: Use add_lit_testsuites so that subsets of tests can be specified"

This version should actually remove the empty directories I removed
all of the files from. Thanks to tstellar for pointing out git-svn's
--rmdir flag.

Original message:

This creates make/ninja targets like check-clang-codegen and
check-clang-unit, much like LLVM already has. I had to move some input
files into Input directories so they weren't picked up as test
directories.

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

8 years agoRevert "test: Use add_lit_testsuites so that subsets of tests can be specified"
Justin Bogner [Tue, 5 Jul 2016 16:14:58 +0000 (16:14 +0000)]
Revert "test: Use add_lit_testsuites so that subsets of tests can be specified"

This reverts r274560. It's breaking a bunch of bots due to a directory
with a space in the name. Doesn't repro locally for some reason.

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

8 years agotest: Use add_lit_testsuites so that subsets of tests can be specified
Justin Bogner [Tue, 5 Jul 2016 16:06:12 +0000 (16:06 +0000)]
test: Use add_lit_testsuites so that subsets of tests can be specified

This creates make/ninja targets like check-clang-codegen and
check-clang-unit, much like LLVM already has. I had to move some input
files into Input directories so they weren't picked up as test
directories.

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

8 years ago[Clang][Feature] Adding CLFLUSHOPT feature and intrinsic to clang
Michael Zuckerman [Tue, 5 Jul 2016 15:56:03 +0000 (15:56 +0000)]
[Clang][Feature] Adding CLFLUSHOPT feature and intrinsic to clang

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

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

8 years ago[X86][AVX512] Remove vector BROADCAST builtins.
Simon Pilgrim [Tue, 5 Jul 2016 14:49:31 +0000 (14:49 +0000)]
[X86][AVX512] Remove vector BROADCAST builtins.

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

8 years ago[X86][AVX512] Converted the VBROADCAST intrinsics to generic IR
Simon Pilgrim [Tue, 5 Jul 2016 12:59:33 +0000 (12:59 +0000)]
[X86][AVX512] Converted the VBROADCAST intrinsics to generic IR

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

8 years ago[X86][AVX512F] add float/double abs intrinsics
Asaf Badouh [Tue, 5 Jul 2016 12:24:14 +0000 (12:24 +0000)]
[X86][AVX512F]  add float/double abs intrinsics
add abs intrinsics that use native LLVM-IR.
change _mm512_mask[z]_and_epi{32|64} to use select intrinsic

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

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

8 years ago[AVX512] minor fix in sqrt{ss|sd} intrinsics arguments
Asaf Badouh [Tue, 5 Jul 2016 11:36:21 +0000 (11:36 +0000)]
[AVX512] minor fix in sqrt{ss|sd} intrinsics arguments

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

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

8 years ago[OpenCL] An implementation of device side enqueue (DSE) from OpenCL v2.0 s6.13.17.
Anastasia Stulova [Tue, 5 Jul 2016 11:31:24 +0000 (11:31 +0000)]
[OpenCL] An implementation of device side enqueue (DSE) from OpenCL v2.0 s6.13.17.

- Added new Builtins: enqueue_kernel, get_kernel_work_group_size
and get_kernel_preferred_work_group_size_multiple.

These Builtins use custom check to diagnose parameters of the passed Blocks
i. e. variable number of 'local void*' type params, and check different
overloads specified in Table 6.31 of OpenCL v2.0.

- IR is generated as an internal library call for each OpenCL Builtin,
reusing ObjC Block implementation.

Review: http://reviews.llvm.org/D20249

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

8 years agontrinsics _mm256_permutexvar_epi64 doesn't accept three parameters as specify bellow.
Michael Zuckerman [Tue, 5 Jul 2016 11:30:31 +0000 (11:30 +0000)]
ntrinsics _mm256_permutexvar_epi64 doesn't accept three parameters as specify bellow.
I deleted the extra mask parameter.

__m256i _mm256_permutexvar_epi64 (__m256i idx, __m256i a)
#include "immintrin.h"
Instruction: vpermq
CPUID Flags: AVX512VL + AVX512F
Description
Shuffle 64-bit integers in a across lanes using the corresponding index in idx, and store the results in dst.
Operation
FOR j := 0 to 3
  i := j*64
    id := idx[i+1:i]*64
      dst[i+63:i] := a[id+63:id]
      ENDFOR
      dst[MAX:256] := 0
      dst[MAX:256] := 0

(From: Intel intrinsics guide)

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

8 years ago[Clang][BuiltIn][AVX512] adding _mm{|256|512}_mask_cvt{s|us|}epi16_storeu_epi8 intrinsics
Michael Zuckerman [Tue, 5 Jul 2016 08:08:01 +0000 (08:08 +0000)]
[Clang][BuiltIn][AVX512] adding _mm{|256|512}_mask_cvt{s|us|}epi16_storeu_epi8 intrinsics

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

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

8 years ago[ASTMatchers] New forEachOverriden matcher.
Clement Courbet [Tue, 5 Jul 2016 07:49:31 +0000 (07:49 +0000)]
[ASTMatchers] New forEachOverriden matcher.

Matches methods overridden by the given method.

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

8 years ago[OpenMP] Sema and parse for 'distribute parallel for simd'
Kelvin Li [Tue, 5 Jul 2016 05:00:15 +0000 (05:00 +0000)]
[OpenMP] Sema and parse for 'distribute parallel for simd'

Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute parallel for simd'.

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

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

8 years ago[X86] Use undefined instead of setzero in shufflevector based intrinsics when the...
Craig Topper [Mon, 4 Jul 2016 22:18:01 +0000 (22:18 +0000)]
[X86] Use undefined instead of setzero in shufflevector based intrinsics when the second source is unused. Rewrite immediate extractions in shuffle intrinsics to be in ((c >> x) & y) form instead of ((c & z) >> x). This way only x varies between each use instead of having to vary x and z.

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

8 years ago[X86][AVX512] Converted the VSHUFPD intrinsics to generic IR
Simon Pilgrim [Mon, 4 Jul 2016 21:30:47 +0000 (21:30 +0000)]
[X86][AVX512] Converted the VSHUFPD intrinsics to generic IR

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

8 years ago[AVX512] Remove VPERMD/VPERMQ/VPERMILPS/VPERMILPD builtins. These were made unused...
Craig Topper [Mon, 4 Jul 2016 19:27:50 +0000 (19:27 +0000)]
[AVX512] Remove VPERMD/VPERMQ/VPERMILPS/VPERMILPD builtins. These were made unused in r274492 and r274502.

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

8 years ago[OpenCL] Make OpenCL Builtins added according to the right version.
Anastasia Stulova [Mon, 4 Jul 2016 16:07:18 +0000 (16:07 +0000)]
[OpenCL] Make OpenCL Builtins added according to the right version.

Currently we only have OpenCL 2.0 Builtins i.e. pipes or address space conversions.

They have to be added only in the version 2.0 compilation mode to make the identifiers
available for use in the other versions.

Review: http://reviews.llvm.org/D20249

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

8 years ago[X86][AVX512] Converted the VPERMPD/VPERMQ intrinsics to generic IR
Simon Pilgrim [Mon, 4 Jul 2016 13:34:44 +0000 (13:34 +0000)]
[X86][AVX512] Converted the VPERMPD/VPERMQ intrinsics to generic IR

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

8 years ago[X86][AVX512] Converted the VPERMILPD/VPERMILPS intrinsics to generic IR
Simon Pilgrim [Mon, 4 Jul 2016 11:06:15 +0000 (11:06 +0000)]
[X86][AVX512] Converted the VPERMILPD/VPERMILPS intrinsics to generic IR

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

8 years ago[Sparc] Allow LEON cpu models to be selected with -mcpu
Jacob Baungard Hansen [Mon, 4 Jul 2016 08:56:08 +0000 (08:56 +0000)]
[Sparc] Allow LEON cpu models to be selected with -mcpu

Summary: This change exposes the recently added LEON CPUs (D19359) in the LLVM Sparc backend to Clang, allowing the cpu's to be selected using the -mcpu flag.

Reviewers: jyknight, lero_chris

Subscribers: jyknight, cfe-commits

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

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

8 years ago[AVX512] Modify what indices we emit for the zero vector we use for zero extension...
Craig Topper [Mon, 4 Jul 2016 07:09:46 +0000 (07:09 +0000)]
[AVX512] Modify what indices we emit for the zero vector we use for zero extension of the result of a v2i1 or v4i1 masked compare. This way we emit something that the backend easily interprets as a concatenation rather than a true shuffle. This delivers slightly better codegen with the current backend capabilities.

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

8 years ago[Sema] A flexible array member must not be the only named member
David Majnemer [Mon, 4 Jul 2016 00:24:59 +0000 (00:24 +0000)]
[Sema] A flexible array member must not be the only named member

We didn't correctly detect situations where a flexible array member was
the only named member in a record.

This fixes PR28407.

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

8 years ago[AST] Use ArrayRef in more interfaces
David Majnemer [Sun, 3 Jul 2016 21:17:51 +0000 (21:17 +0000)]
[AST] Use ArrayRef in more interfaces

ArrayRef is a little better than passing around a pointer/length pair.

No functional change is intended.

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

8 years ago[Refactor NFC] Rename the (non-CCE, fold-failure) Diag during constant expression...
Faisal Vali [Sat, 2 Jul 2016 22:34:24 +0000 (22:34 +0000)]
[Refactor NFC] Rename the (non-CCE, fold-failure) Diag during constant expression evaluation as FFDiag.

Currently, we have CCEDiags (C++11 core constant expression diags) and Fold failure diagnostics [I don't claim to yet fully understand exactly why we need the difference].  This patch explicitly replaces Info.Diag (whose use always represents a fold failure diag within the file) with Info.FFDiag.  This makes it more easily greppable in the file, and just like the name Info.CCEDiag, it gives the reader slight further insight into the nature of the diagnostic (as opposed to Info.Diag).

This patch is a preliminary refactoring step in an effort to allow support for compatibility-warnings and extensions (such as constexpr lambda) during constant expression evaluation.

All regressions pass.

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

8 years agofix two typos in the doc
Sylvestre Ledru [Sat, 2 Jul 2016 19:17:58 +0000 (19:17 +0000)]
fix two typos in the doc

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

8 years ago[X86][AVX512] Converted the MOVDDUP/MOVSLDUP/MOVSHDUP masked intrinsics to generic IR
Simon Pilgrim [Sat, 2 Jul 2016 17:16:25 +0000 (17:16 +0000)]
[X86][AVX512] Converted the MOVDDUP/MOVSLDUP/MOVSHDUP masked intrinsics to generic IR

llvm companion patch imminent

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

8 years ago[CUDA] Move argument type lists to the stack. NFC.
Benjamin Kramer [Sat, 2 Jul 2016 12:03:57 +0000 (12:03 +0000)]
[CUDA] Move argument type lists to the stack. NFC.

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

8 years agoUse arrays or initializer lists to feed ArrayRefs instead of SmallVector where possible.
Benjamin Kramer [Sat, 2 Jul 2016 11:41:41 +0000 (11:41 +0000)]
Use arrays or initializer lists to feed ArrayRefs instead of SmallVector where possible.

No functionality change intended

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

8 years ago[X86] Replace 128-bit and 256 masked vpermilps/vpermilpd builtins with native IR.
Craig Topper [Sat, 2 Jul 2016 05:36:43 +0000 (05:36 +0000)]
[X86] Replace 128-bit and 256 masked vpermilps/vpermilpd builtins with native IR.

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

8 years agoPR28394: For compatibility with c++11 and c++14, if a static constexpr data
Richard Smith [Sat, 2 Jul 2016 01:32:16 +0000 (01:32 +0000)]
PR28394: For compatibility with c++11 and c++14, if a static constexpr data
member is redundantly redeclared outside the class definition in code built in
c++17 mode, ensure we emit a non-discardable definition of the data member for
c++11 and c++14 compilations to use.

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

8 years agoAdd TargetInfo for 32-bit and 64-bit RenderScript
Pirama Arumuga Nainar [Sat, 2 Jul 2016 00:05:42 +0000 (00:05 +0000)]
Add TargetInfo for 32-bit and 64-bit RenderScript

Summary:
The TargetInfo for 'renderscript32' and 'renderscript64' ArchTypes are
subclasses of ARMleTargetInfo and AArch64leTargetInfo respectively.

RenderScript32TargetInfo modifies the ARM ABI to set LongWidth and
LongAlign to be 64-bits.  Other than this modification, the underlying
TargetInfo base classes is initialized as if they have "armv7" and
"aarch64" architecture type respectively.

Reviewers: rsmith, echristo

Subscribers: aemerson, tberghammer, cfe-commits, danalbert, mehdi_amini, srhines

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

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

8 years ago[CodeView] Include MSVC style names for unnamed types
David Majnemer [Fri, 1 Jul 2016 23:12:54 +0000 (23:12 +0000)]
[CodeView] Include MSVC style names for unnamed types

The CodeView printer expects to be able to generate fully qualified
names from the debug info graph.  This means that we need to include the
MSVC-style name in the debug info for anonymous types.

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

8 years agoRemoves CHECKs for symbolic label names (as Debug Clang will generate).
Tim Shen [Fri, 1 Jul 2016 22:50:00 +0000 (22:50 +0000)]
Removes CHECKs for symbolic label names (as Debug Clang will generate).

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

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

8 years agoC++14 init-capture: error out instead of crashing.
Manman Ren [Fri, 1 Jul 2016 22:27:16 +0000 (22:27 +0000)]
C++14 init-capture: error out instead of crashing.

When we have template arguments, we have a function and a pattern, the variable
in init-capture belongs to the pattern decl when checking if the lhs of
"max = current" is modifiable:
  auto find = [max = init](auto current) {
    max = current;
  };

In function isReferenceToNonConstCapture, we handle the case where the decl
context for the variable is not part of the current context.

Instead of crashing, we emit an error message:
cannot assign to a variable captured by copy in a non-mutable lambda

rdar://26997922

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

8 years agoRemove unncessary CHECKs from r274385
Tim Shen [Fri, 1 Jul 2016 21:16:58 +0000 (21:16 +0000)]
Remove unncessary CHECKs from r274385

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

8 years ago[Temporary, Lifetime] Add lifetime marks for temporaries
Tim Shen [Fri, 1 Jul 2016 21:08:47 +0000 (21:08 +0000)]
[Temporary, Lifetime] Add lifetime marks for temporaries

With all MaterializeTemporaryExprs coming with a ExprWithCleanups, it's
easy to add correct lifetime.end marks into the right RunCleanupsScope.

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

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

8 years ago[Driver] Delete some dead code (NFC)
Vedant Kumar [Fri, 1 Jul 2016 19:41:20 +0000 (19:41 +0000)]
[Driver] Delete some dead code (NFC)

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

8 years ago[libclang] Sync-up the way top-level decls in an ASTUnit are handled with how decls...
Argyrios Kyrtzidis [Fri, 1 Jul 2016 19:10:54 +0000 (19:10 +0000)]
[libclang] Sync-up the way top-level decls in an ASTUnit are handled with how decls in a DeclContext are handled.

rdar://19775013

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

8 years agoEmit more intrinsics for builtin functions
Matt Arsenault [Fri, 1 Jul 2016 17:38:14 +0000 (17:38 +0000)]
Emit more intrinsics for builtin functions

This is important for building libclc. Since r273039 tests are failing
due to now emitting calls to these functions instead of emitting the
DAG node. The libm function names are implemented for OpenCL, and should
call the locally defined versions, so -fno-builtin is used. The IR
Some functions use the __builtins and expect the intrinsics to be
emitted. Without this we end up with nobuiltin calls to intrinsics
or to unsupported library calls.

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

8 years agoRevert r274348 and r274349 until the Windows failures are fixed.
Vassil Vassilev [Fri, 1 Jul 2016 16:07:57 +0000 (16:07 +0000)]
Revert r274348 and r274349 until the Windows failures are fixed.

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

8 years agoDriver: support -L for MSVC toolchain under the GNU driver
Saleem Abdulrasool [Fri, 1 Jul 2016 15:36:31 +0000 (15:36 +0000)]
Driver: support -L for MSVC toolchain under the GNU driver

When not using clang in the CL emulation mode, honour the -L flags as additional
library paths to pass to the linker invocation.

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

8 years ago[OpenMP] Issue warning if a simd construct nested inside another simd
Kelvin Li [Fri, 1 Jul 2016 14:30:25 +0000 (14:30 +0000)]
[OpenMP] Issue warning if a simd construct nested inside another simd
construct

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

8 years agoAdd forgotten test to r274348.
Vassil Vassilev [Fri, 1 Jul 2016 13:30:08 +0000 (13:30 +0000)]
Add forgotten test to r274348.

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

8 years agoAdd postorder traversal support to the RecursiveASTVisitor.
Vassil Vassilev [Fri, 1 Jul 2016 13:28:31 +0000 (13:28 +0000)]
Add postorder traversal support to the RecursiveASTVisitor.

This feature needs to be explicitly enabled by overriding shouldTraversePostOrder()
as it has performance drawbacks for the iterative Stmt-traversal.

Patch by Raphael Isemann!

Reviewed by Richard Smith and Benjamin Kramer.

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

8 years ago[DebugInfo] Set DISubprogram ThisAdjustment in the MS ABI
Reid Kleckner [Fri, 1 Jul 2016 02:41:25 +0000 (02:41 +0000)]
[DebugInfo] Set DISubprogram ThisAdjustment in the MS ABI

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

8 years ago[Feature] Add a builtin for indexing into parameter packs. Patch by Louis Dionne.
Eric Fiselier [Fri, 1 Jul 2016 01:24:09 +0000 (01:24 +0000)]
[Feature] Add a builtin for indexing into parameter packs. Patch by Louis Dionne.

This patch adds a __nth_element builtin that allows fetching the n-th type of a
parameter pack with very little compile-time overhead. The patch was inspired by
r252036 and r252115 by David Majnemer, which add a similar __make_integer_seq
builtin for efficiently creating a std::integer_sequence.

Reviewed as D15421. http://reviews.llvm.org/D15421

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