]> granicus.if.org Git - clang/log
clang
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

8 years ago[CodeCompletion] Allow system headers providing private symbols with a single underscore.
Argyrios Kyrtzidis [Fri, 1 Jul 2016 01:17:02 +0000 (01:17 +0000)]
[CodeCompletion] Allow system headers providing private symbols with a single underscore.

rdar://24677150

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

8 years ago[Sema] Implement C++14's DR1579: Prefer returning by converting move constructor
Erik Pilkington [Thu, 30 Jun 2016 23:09:13 +0000 (23:09 +0000)]
[Sema] Implement C++14's DR1579: Prefer returning by converting move constructor

Fixes PR28096.

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

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

8 years ago[OpenMP] Use fopenmp prefix for all options introduced by the offloading implementation.
Samuel Antao [Thu, 30 Jun 2016 21:22:08 +0000 (21:22 +0000)]
[OpenMP] Use fopenmp prefix for all options introduced by the offloading implementation.

Summary: This patch changes the options used by offloading to start with -fopenmp instead of -fomp. This makes the option naming more consistent and materializes a suggestion by Richard Smith in http://reviews.llvm.org/D9888.

Reviewers: hfinkel, carlo.bertolli, arpith-jacob, ABataev

Subscribers: kkwli0, cfe-commits, caomhin

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

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

8 years agofix typo; NFC
Sanjay Patel [Thu, 30 Jun 2016 21:02:40 +0000 (21:02 +0000)]
fix typo; NFC

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

8 years agoFix ASTMatchersNodeTest to work on Windows.
Justin Lebar [Thu, 30 Jun 2016 20:29:29 +0000 (20:29 +0000)]
Fix ASTMatchersNodeTest to work on Windows.

It was failing because it had an explicit check for whether we're on
Windows.

There are a few other similar explicit checks in this file which I
didn't remove because they serve as reasonable documentation that the
test doesn't work with a Windows triple.

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

8 years agoFix typo-correction crash if a typo occurs within the operand of a
Richard Smith [Thu, 30 Jun 2016 20:24:30 +0000 (20:24 +0000)]
Fix typo-correction crash if a typo occurs within the operand of a
function-style cast to a non-dependent type which is then used in an invalid
way. We'd lose the "type dependent" bit here, and downstream Sema processing
would then discard the expression if it was used in a context where its type
rendered it invalid.

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

8 years ago[CUDA] Give templated device functions internal linkage, templated kernels external...
Justin Lebar [Thu, 30 Jun 2016 18:41:33 +0000 (18:41 +0000)]
[CUDA] Give templated device functions internal linkage, templated kernels external linkage.

Summary:
This lets LLVM perform IPO over these functions.  In particular, it
allows LLVM to emit ld.global.nc for loads to __restrict pointers in
kernels that are never written to.

Reviewers: rsmith

Subscribers: cfe-commits, tra

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

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

8 years agoPR28373: fix crash-on-invalid if the condition of an if-statement fails typo-correction.
Richard Smith [Thu, 30 Jun 2016 18:36:34 +0000 (18:36 +0000)]
PR28373: fix crash-on-invalid if the condition of an if-statement fails typo-correction.

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

8 years agoDon't instantiate a full host toolchain in ASTMatchersTest.
Justin Lebar [Thu, 30 Jun 2016 18:12:25 +0000 (18:12 +0000)]
Don't instantiate a full host toolchain in ASTMatchersTest.

Summary:
This test was stat()'ing large swaths of /usr/lib hundreds of times, as
every invocation of matchesConditionally*() created a new Linux
toolchain.

In addition to being slow, perf indicated this was causing substantial
contention in the kernel.

Something is...interesting in the kernel, as without this patch I
sometimes see ~11m spent in the kernel, and sometimes ~5m.  This
corresponds to bimodal ninja check-clang times of ~30s and ~20s.

It's not clear to me exactly what causes the bimodality.  In any case,
this change makes this test run in 2.5s, down from 17s, and it seems to
cause us to get the 20s ninja check-clang time unconditionally.

Reviewers: chandlerc

Subscribers: cfe-commits, klimek

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

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

8 years ago[codeview] Emit qualified display names if -gline-tables-only is on
Reid Kleckner [Thu, 30 Jun 2016 17:41:31 +0000 (17:41 +0000)]
[codeview] Emit qualified display names if -gline-tables-only is on

When -gmlt is on, we don't emit namespace or class scope information,
and the CodeView emission code in LLVM can't compute the fully qualified
name. If we know LLVM won't be able to get the name right, go ahead and
emit the qualified name in the frontend.

We could change our -gmlt emission strategy to include those scopes when
emitting codeview, but that would increase memory usage and slow down
LTO and add more complexity to debug info emission.

The same problem exists when you debug a -gmlt binary with GDB, so we
should consider removing '&& EmitCodeView' from the condition here at
some point in the future after evaluating the impact on object file
size.

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

8 years agoPort some more debug info tests on Windows
Reid Kleckner [Thu, 30 Jun 2016 17:41:27 +0000 (17:41 +0000)]
Port some more debug info tests on Windows

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

8 years ago[AVX512][BUILTIN][vpermilps][intrinsics] Fixing two incorrect IMM check.
Michael Zuckerman [Thu, 30 Jun 2016 12:12:20 +0000 (12:12 +0000)]
[AVX512][BUILTIN][vpermilps][intrinsics] Fixing two incorrect IMM check.

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

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

8 years agoFix CodeGenCXX/mangle-abi-tag.cpp on clang-ppc64le-linux bot
Dmitry Polukhin [Thu, 30 Jun 2016 11:15:52 +0000 (11:15 +0000)]
Fix CodeGenCXX/mangle-abi-tag.cpp on clang-ppc64le-linux bot

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

8 years ago[GCC] PR23529 Mangler part of attrbute abi_tag support
Dmitry Polukhin [Thu, 30 Jun 2016 09:40:38 +0000 (09:40 +0000)]
[GCC] PR23529 Mangler part of attrbute abi_tag support

Original patch by Stefan Bühler http://reviews.llvm.org/D12834

Difference between original and this one:
- fixed all failing tests
- fixed mangling for global variable outside namespace
- emit ABI tags for guards and local names
- clang-format + other stylistic changes
- significantly reworked patch according to Richard's suggestions

Sema part, committed before http://reviews.llvm.org/D17567

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

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

8 years agoEnable opencl driver tests, which never ran.
Benjamin Kramer [Thu, 30 Jun 2016 09:17:46 +0000 (09:17 +0000)]
Enable opencl driver tests, which never ran.

Then mark it as XFAIL because it always fails. I'll let OpenCL people
figure this out.

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

8 years agoAMDGPU: Set amdgpu_kernel calling convention for OpenCL kernels.
Nikolay Haustov [Thu, 30 Jun 2016 09:06:33 +0000 (09:06 +0000)]
AMDGPU: Set amdgpu_kernel calling convention for OpenCL kernels.

Summary:
Summary:
Change Clang calling convention SpirKernel to OpenCLKernel.
Set calling convention OpenCLKernel for amdgcn as well.
Add virtual method .getOpenCLKernelCallingConv() to TargetCodeGenInfo
and use it to set target calling convention for AMDGPU and SPIR.
Update tests.

Reviewers: rsmith, tstellarAMD, Anastasia, yaxunl

Subscribers: kzhuravl, cfe-commits

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

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

8 years ago[Clang][Intrinsics][AVX512][BuiltIn] adding intrinsics for vrangesd instruction set
Michael Zuckerman [Thu, 30 Jun 2016 08:05:46 +0000 (08:05 +0000)]
[Clang][Intrinsics][AVX512][BuiltIn] adding intrinsics for vrangesd instruction set

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

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

8 years ago[ASTMatcher] Add a node matcher for EnumType.
Haojian Wu [Thu, 30 Jun 2016 07:50:01 +0000 (07:50 +0000)]
[ASTMatcher] Add a node matcher for EnumType.

Reviewers: aaron.ballman

Subscribers: cfe-commits, klimek

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

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

8 years ago[cmake] Remove stale comment. NFC.
Michael Gottesman [Thu, 30 Jun 2016 05:51:18 +0000 (05:51 +0000)]
[cmake] Remove stale comment. NFC.

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

8 years ago[MS ABI] Pick an inheritance model if we resolve an overload set
David Majnemer [Thu, 30 Jun 2016 03:02:03 +0000 (03:02 +0000)]
[MS ABI] Pick an inheritance model if we resolve an overload set

We didn't assign an inheritance model for 'Foo' if the event an
exrepssion like '&Foo::Bar' occured if 'Bar' could resolve to multiple
functions.

Once the overload set is resolved to a particular member, we enforce a
specific inheritance model.

This fixes PR28360.

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

8 years ago[CodeView] Implement support for bitfields in Clang
David Majnemer [Thu, 30 Jun 2016 03:01:59 +0000 (03:01 +0000)]
[CodeView] Implement support for bitfields in Clang

Emit the underlying storage offset in addition to the starting bit
position of the field.

This fixes PR28162.

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

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

8 years agoUse the same type for adjacent bit field members.
Akira Hatanaka [Thu, 30 Jun 2016 00:07:17 +0000 (00:07 +0000)]
Use the same type for adjacent bit field members.

MSVC doesn't pack the bit field members if different types are used.
This came up in a patch review.

http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160627/163107.html

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

8 years ago[Tooling] Add optional argument to getFullyQualifiedName to prepend "::".
Siva Chandra [Wed, 29 Jun 2016 22:38:59 +0000 (22:38 +0000)]
[Tooling] Add optional argument to getFullyQualifiedName to prepend "::".

Reviewers: rsmith, saugustine, rnk

Subscribers: klimek, cfe-commits

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

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

8 years ago[ClangConfig] Store all of the targets exported in the variable CLANG_EXPORTED_TARGETS.
Michael Gottesman [Wed, 29 Jun 2016 21:59:23 +0000 (21:59 +0000)]
[ClangConfig] Store all of the targets exported in the variable CLANG_EXPORTED_TARGETS.

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

8 years ago[ClangConfig] Unset some variables after we are done using them to configure ClangCon...
Michael Gottesman [Wed, 29 Jun 2016 21:59:20 +0000 (21:59 +0000)]
[ClangConfig] Unset some variables after we are done using them to configure ClangConfig.cmake.in files.

This ensures that the values do not bleed over in between computations. It may
make sense in the future to just refactor this code into functions to provide
"true scoping".

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

8 years ago[ClangConfig] Instead of hard coding the ClangTargets location to /ClangTargets.cmake...
Michael Gottesman [Wed, 29 Jun 2016 21:59:19 +0000 (21:59 +0000)]
[ClangConfig] Instead of hard coding the ClangTargets location to /ClangTargets.cmake, follow LLVM's example and use a pre-computed cmake variable @CLANG_CONFIG_EXPORTS_FILE@.

This just makes ClangConfig more consistent with LLVMConfig.

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

8 years ago[ClangConfig] Follow LLVM's example and only install Clang{Config,Target}.cmake when...
Michael Gottesman [Wed, 29 Jun 2016 21:59:15 +0000 (21:59 +0000)]
[ClangConfig] Follow LLVM's example and only install Clang{Config,Target}.cmake when LLVM_INSTALL_TOOLCHAIN_ONLY is disabled.

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

8 years ago[cmake] Instead of just copying ClangConfig.cmake, configure it using ClangConfig...
Michael Gottesman [Wed, 29 Jun 2016 21:59:14 +0000 (21:59 +0000)]
[cmake] Instead of just copying ClangConfig.cmake, configure it using ClangConfig.cmake.in.

This will allow for cmake to expand variables in ClangConfig.cmake for
downstream users.

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

8 years agoP0305R1: Parsing support for init-statements in 'if' and 'switch' statements.
Richard Smith [Wed, 29 Jun 2016 21:17:59 +0000 (21:17 +0000)]
P0305R1: Parsing support for init-statements in 'if' and 'switch' statements.
No semantic analysis yet.

This is a pain to disambiguate correctly, because the parsing rules for the
declaration form of a condition and of an init-statement are quite different --
for a token sequence that looks like a declaration, we frequently need to
disambiguate all the way to the ')' or ';'.

We could do better here in some cases by stopping disambiguation once we've
decided whether we've got an expression or not (rather than keeping going until
we know whether it's an init-statement declaration or a condition declaration),
by unifying our parsing code for the two types of declaration and moving the
syntactic checks into Sema; if this has a measurable impact on parsing
performance, I'll look into that.

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

8 years ago[ClangConfig] Copy ClangConfig.cmake to ${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_D...
Michael Gottesman [Wed, 29 Jun 2016 21:12:38 +0000 (21:12 +0000)]
[ClangConfig] Copy ClangConfig.cmake to ${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR} instead of to ${CLANG_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}.

This is an obvious bug since ClangConfig.cmake looks for ClangTargets.cmake in
${CMAKE_CURRENT_LIST_DIR}. But ClangTargets.cmake is in
${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}, so it will always fail with an
in tree build.

In the case where clang is built out of tree, this is still correct since
CMAKE_BINARY_DIR and CLANG_BINARY_DIR will be the same.

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

8 years agoConvert another case over to RevertingTentativeParsingAction.
Richard Smith [Wed, 29 Jun 2016 21:12:37 +0000 (21:12 +0000)]
Convert another case over to RevertingTentativeParsingAction.

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

8 years agoSwitch to an RAII object to revert tentative parsing automatically.
Richard Smith [Wed, 29 Jun 2016 21:06:51 +0000 (21:06 +0000)]
Switch to an RAII object to revert tentative parsing automatically.

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

8 years ago[ClangConfig] Replace paths with the same value as CLANG_INSTALL_PACKAGE_DIR with...
Michael Gottesman [Wed, 29 Jun 2016 20:22:46 +0000 (20:22 +0000)]
[ClangConfig] Replace paths with the same value as CLANG_INSTALL_PACKAGE_DIR with a deref of the variable.

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

8 years ago[cmake] Move creation of ClangTargets and installation of ClangConfig.cmake from...
Michael Gottesman [Wed, 29 Jun 2016 20:22:44 +0000 (20:22 +0000)]
[cmake] Move creation of ClangTargets and installation of ClangConfig.cmake from ./CMakeLists.txt -> ./cmake/modules/CMakeLists.txt.

This matches LLVM.

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

8 years ago[OpenCL] Allow -cl-std and other standard -cl- options in driver
Yaxun Liu [Wed, 29 Jun 2016 19:39:32 +0000 (19:39 +0000)]
[OpenCL] Allow -cl-std and other standard -cl- options in driver

Allow -cl-std and other standard -cl- options from cc1 to driver.

Added a test for the options moved.

Patch by Aaron En Ye Shi.

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

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

8 years agoAdd CapturedDecl::parameters() ArrayRef accessors following r273647.
Yaron Keren [Wed, 29 Jun 2016 18:55:53 +0000 (18:55 +0000)]
Add CapturedDecl::parameters() ArrayRef accessors following r273647.

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

8 years agoRe-land "[MS] Don't expect vftables to be provided for extern template instantiations"
Reid Kleckner [Wed, 29 Jun 2016 18:29:21 +0000 (18:29 +0000)]
Re-land "[MS] Don't expect vftables to be provided for extern template instantiations"

Reverts r273305 and re-instates r273296.

We needed to fix a bug in Sema::MarkVTableUsed to ensure that operator
delete lookup occurs when the vtable is referenced. We already had a
special case to look up operator delete when dllimport was used, but I
think should really mark virtual destructors referenced any time the
vtable is used.

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

8 years agoAvailabilityAttr: update the document for macosx
Manman Ren [Wed, 29 Jun 2016 15:50:08 +0000 (15:50 +0000)]
AvailabilityAttr: update the document for macosx

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

8 years ago[X86][SSE2] Updated tests to match llvm\test\CodeGen\X86\sse2-intrinsics-fast-isel...
Simon Pilgrim [Wed, 29 Jun 2016 14:04:08 +0000 (14:04 +0000)]
[X86][SSE2] Updated tests to match llvm\test\CodeGen\X86\sse2-intrinsics-fast-isel-x86_64.ll

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

8 years ago[OpenCL] Add attribute 'pure' to read_image built-in functions to enable optimizations.
Alexey Bader [Wed, 29 Jun 2016 12:30:26 +0000 (12:30 +0000)]
[OpenCL] Add attribute 'pure' to read_image built-in functions to enable optimizations.

Reviewers: Anastasia, yaxunl

Subscribers: pekka.jaaskelainen, pxli168, cfe-commits

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

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