]> granicus.if.org Git - clang/log
clang
8 years agoPR27989: only enqueue binary operators into the data recursive int expression
Richard Smith [Sat, 4 Jun 2016 00:22:31 +0000 (00:22 +0000)]
PR27989: only enqueue binary operators into the data recursive int expression
evaluator if they are actually int expressions.

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

8 years agoCodeGen: correct assertion
Saleem Abdulrasool [Fri, 3 Jun 2016 23:26:30 +0000 (23:26 +0000)]
CodeGen: correct assertion

The assertion added earlier was overly strict.  We need to strip the pointer
casts (as when constructing the GV).  Correct the types (Function or Variable).

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

8 years agoBump libclang API minor version after r271351.
Manman Ren [Fri, 3 Jun 2016 23:11:41 +0000 (23:11 +0000)]
Bump libclang API minor version after r271351.

Also use the next enum value for CXObjCPropertyAttr_class.

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

8 years agoUse the name of the file on disk to issue a new diagnostic about non-portable #includ...
Taewook Oh [Fri, 3 Jun 2016 18:52:51 +0000 (18:52 +0000)]
Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths.

Differential Revision: http://reviews.llvm.org/D19843
Corresponding LLVM change: http://reviews.llvm.org/D19842

Patch by Eric Niebler

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

8 years ago[Title] Revert test commit
Taewook Oh [Fri, 3 Jun 2016 18:30:12 +0000 (18:30 +0000)]
[Title] Revert test commit

Summary: Revert test commit

Trac Bug: #

Blame Rev:

Reviewed By:

Test Plan:

Revert Plan:

Database Impact:

Memcache Impact:

Other Notes:

EImportant:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

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

8 years agoTest commit
Taewook Oh [Fri, 3 Jun 2016 18:27:39 +0000 (18:27 +0000)]
Test commit

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

8 years agoDon't pass --build-id to ld by default.
Rafael Espindola [Fri, 3 Jun 2016 17:26:16 +0000 (17:26 +0000)]
Don't pass --build-id to ld by default.

We now have a cmake option to change the default: ENABLE_LINKER_BUILD_ID.

The reason is that build-id is fairly expensive, so we shouldn't impose
it in the regular edit/build cycle.

This is similar to gcc, that has an off by default --enable-linker-build-id
option.

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

8 years agoFix test for LLVM_LIBDIR_SUFFIX=64 case.
Ismail Donmez [Fri, 3 Jun 2016 17:06:52 +0000 (17:06 +0000)]
Fix test for LLVM_LIBDIR_SUFFIX=64 case.

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

8 years agoObj-C: Fix assert-on-invalid (PR27822)
Hans Wennborg [Fri, 3 Jun 2016 16:59:13 +0000 (16:59 +0000)]
Obj-C: Fix assert-on-invalid (PR27822)

Clang would assert when isObjCInstancetype() was called on a
tok::annot_cxxscope token.

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

8 years agoRAS extensions are part of ARMv8.2.
Sjoerd Meijer [Fri, 3 Jun 2016 14:08:20 +0000 (14:08 +0000)]
RAS extensions are part of ARMv8.2.

This patch enables +ras +noras to AArch64 in clang.

Patch by: Roger Ferrer Ibanez and Oliver Stannard

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

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

8 years ago[clang-format] skip empty lines and comments in the top of the code when inserting...
Eric Liu [Fri, 3 Jun 2016 12:52:59 +0000 (12:52 +0000)]
[clang-format] skip empty lines and comments in the top of the code when inserting new headers.

Summary:
[clang-format] skip empty lines and comments in the top of the code when inserting new headers.

Pair-programmed with @hokein

Reviewers: djasper

Subscribers: ioeric, cfe-commits, hokein, klimek

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

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

8 years ago[mips] Slightly simplify MipsTargetInfo::setDataLayout(). NFC.
Daniel Sanders [Fri, 3 Jun 2016 10:11:01 +0000 (10:11 +0000)]
[mips] Slightly simplify MipsTargetInfo::setDataLayout(). NFC.

Summary:

Reviewers: atanasyan

Subscribers: atanasyan, cfe-commits

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

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

8 years agoAdd a few missing Clang regression tests for Cortex-A53, Cortex-A57, Cortex-A72
Sjoerd Meijer [Fri, 3 Jun 2016 08:47:56 +0000 (08:47 +0000)]
Add a few missing Clang regression tests for Cortex-A53, Cortex-A57, Cortex-A72

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

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

8 years agoDelete configure left over.
Rafael Espindola [Thu, 2 Jun 2016 23:45:37 +0000 (23:45 +0000)]
Delete configure left over.

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

8 years agoclangFrontend: Make intrinsics_gen optional for standalone build.
NAKAMURA Takumi [Thu, 2 Jun 2016 20:24:07 +0000 (20:24 +0000)]
clangFrontend: Make intrinsics_gen optional for standalone build.

FIXME: intrinsics_gen may be exported from llvm.

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

8 years ago[cmake] Fix-up r271533
Pavel Labath [Thu, 2 Jun 2016 18:49:42 +0000 (18:49 +0000)]
[cmake] Fix-up r271533

I was appending to the wrong variable (over-zealous copy-paste from llvm on my part).

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

8 years ago[docs] Add a limitations section to SourceBasedCodeCoverage.rst
Vedant Kumar [Thu, 2 Jun 2016 17:19:45 +0000 (17:19 +0000)]
[docs] Add a limitations section to SourceBasedCodeCoverage.rst

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

8 years ago[cmake] Fix builds with LLVM_ENABLE_PIC=0
Pavel Labath [Thu, 2 Jun 2016 16:35:24 +0000 (16:35 +0000)]
[cmake] Fix builds with LLVM_ENABLE_PIC=0

Summary:
When this flag is specified, the target llvm-lto is not built, but is still
used as a dependency of the test targets. cmake 2.8 silently ignored this
situation, but with cmake_minimum_required(3.4) it becomes an error. Fix this
by avoiding the inclusion the target as a dependency.

Reviewers: beanz

Subscribers: cfe-commits

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

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

8 years agoSuppress clang/test/CodeGen/lifetime-asan.c for targeting mingw.
NAKAMURA Takumi [Thu, 2 Jun 2016 10:54:45 +0000 (10:54 +0000)]
Suppress clang/test/CodeGen/lifetime-asan.c for targeting mingw.

  clang.EXE: error: unsupported option '-fsanitize=address' for target 'x86_64-w64-windows-gnu'

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

8 years agoThis adds target support and tests for Cortex-A73
Sjoerd Meijer [Thu, 2 Jun 2016 10:48:37 +0000 (10:48 +0000)]
This adds target support and tests for Cortex-A73

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

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

8 years ago[X86][AVX512] add intrinsics of Scalar FP to integer
Asaf Badouh [Thu, 2 Jun 2016 08:11:35 +0000 (08:11 +0000)]
[X86][AVX512] add intrinsics of Scalar FP to integer

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

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

8 years ago[Clang][AVX512][INTRINSICS] adding round cvt and fix regular cvtps_ph
Michael Zuckerman [Thu, 2 Jun 2016 07:44:08 +0000 (07:44 +0000)]
[Clang][AVX512][INTRINSICS] adding round cvt and fix regular cvtps_ph

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

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

8 years ago[docs] Fix misplaced comma
Vedant Kumar [Thu, 2 Jun 2016 02:45:59 +0000 (02:45 +0000)]
[docs] Fix misplaced comma

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

8 years ago[docs] Minor formatting changes and typo fixes
Vedant Kumar [Thu, 2 Jun 2016 02:25:13 +0000 (02:25 +0000)]
[docs] Minor formatting changes and typo fixes

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

8 years ago[docs] Use cpp code-blocks where appropriate
Vedant Kumar [Thu, 2 Jun 2016 01:15:59 +0000 (01:15 +0000)]
[docs] Use cpp code-blocks where appropriate

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

8 years ago[docs] Add missing newline to console section
Vedant Kumar [Thu, 2 Jun 2016 01:01:48 +0000 (01:01 +0000)]
[docs] Add missing newline to console section

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

8 years ago[docs] Document the source-based code coverage feature
Vedant Kumar [Thu, 2 Jun 2016 00:51:50 +0000 (00:51 +0000)]
[docs] Document the source-based code coverage feature

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

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

8 years ago[asan] Added -fsanitize-address-use-after-scope flag
Vitaly Buka [Thu, 2 Jun 2016 00:24:20 +0000 (00:24 +0000)]
[asan] Added -fsanitize-address-use-after-scope flag

Summary:
Also emit lifetime markers for -fsanitize-address-use-after-scope.
Asan uses life-time markers for use-after-scope check.

PR27453

Reviewers: kcc, eugenis, aizatsky

Subscribers: llvm-commits

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

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

8 years agoclang/test/Driver/android-ndk-standalone.cpp: Tweak for dos r'\\'.
NAKAMURA Takumi [Thu, 2 Jun 2016 00:19:14 +0000 (00:19 +0000)]
clang/test/Driver/android-ndk-standalone.cpp: Tweak for dos r'\\'.

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

8 years agoFixIt: use getLocForEndOfToken to insert fix-it after a type name.
Manman Ren [Thu, 2 Jun 2016 00:11:03 +0000 (00:11 +0000)]
FixIt: use getLocForEndOfToken to insert fix-it after a type name.

Instead of setting DeclSpec's range end to point to the next token
after the DeclSpec, we use getLocForEndOfToken to insert fix-it after a type
name.

Before this fix, fix-it will change
^(NSView view) to ^(*NSView view)

This commit correctly updates the source to ^(NSView* view).

rdar://21042144
Differential Revision: http://reviews.llvm.org/D20844

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

8 years agoSummary: Remove unused option
Vitaly Buka [Thu, 2 Jun 2016 00:00:38 +0000 (00:00 +0000)]
Summary: Remove unused option

Reviewers: kcc, eugenis, aizatsky

Subscribers: llvm-commits

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

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

8 years ago[driver][arm] change regular expression to work on Windows
Chih-Hung Hsieh [Wed, 1 Jun 2016 22:53:59 +0000 (22:53 +0000)]
[driver][arm] change regular expression to work on Windows

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

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

8 years ago[X86][SSE] Replace (V)CVTTPS2DQ and VCVTTPD2DQ truncating (round to zero) f32/f64...
Simon Pilgrim [Wed, 1 Jun 2016 21:46:51 +0000 (21:46 +0000)]
[X86][SSE] Replace (V)CVTTPS2DQ and VCVTTPD2DQ truncating (round to zero) f32/f64 to i32 with generic IR (clang)

The 'cvtt' truncation (round to zero) conversions can be safely represented as generic __builtin_convertvector (fptosi) calls instead of x86 intrinsics. We already do this (implicitly) for the scalar equivalents.

Note: I looked at updating _mm_cvttpd_epi32 as well but this still requires a lot more backend work to correctly lower (both for debug and optimized builds).

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

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

8 years ago[Sema] Fix incorrect enum token namespace
Etienne Bergeron [Wed, 1 Jun 2016 21:17:32 +0000 (21:17 +0000)]
[Sema] Fix incorrect enum token namespace

Summary:
This patch fix the scoping of enum literal. They were not resolving
to the right type.

It was not causing any problem as one is a copy of the other one.

The literal in the switch are resolving to Sema.h:5527
```
  enum AccessResult {
    AR_accessible,
    AR_inaccessible,
    AR_dependent,
    AR_delayed
  };
```

Instead of SemaAccess.cpp:27
```
/// A copy of Sema's enum without AR_delayed.
enum AccessResult {
  AR_accessible,
  AR_inaccessible,
  AR_dependent
};
```

This issue was found by a new clang-tidy check (still on-going).

Reviewers: rsmith, aaron.ballman

Subscribers: cfe-commits

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

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

8 years ago[driver][arm] add armv7 and thumb include and lib paths
Chih-Hung Hsieh [Wed, 1 Jun 2016 20:48:46 +0000 (20:48 +0000)]
[driver][arm] add armv7 and thumb include and lib paths

Add a new test android-ndk-standalone.cpp
with new Android NDK release tree structure.
Detect armv7 sub architecture and thumb mode,
to add system include and link search paths.

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

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

8 years agoDisable warning about core features by default
Jan Vesely [Wed, 1 Jun 2016 18:04:53 +0000 (18:04 +0000)]
Disable warning about core features by default

Reviewers: Anastasia, yaxunl

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

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

8 years agoFixup list of available extensions
Jan Vesely [Wed, 1 Jun 2016 18:04:50 +0000 (18:04 +0000)]
Fixup list of available extensions

Reviewers: Anastasia

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

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

8 years agoObjC lifetime: pull sugar off when the qualifiers conflict.
Manman Ren [Wed, 1 Jun 2016 17:14:19 +0000 (17:14 +0000)]
ObjC lifetime: pull sugar off when the qualifiers conflict.

It's possible to have multiple local ObjCLifetime qualifiers. When there is
a conflict, we can't stop after we reach a type that is directly qualified.
We need to keep pulling sugar off and removing the ObjCLifetime qualifers.

rdar://25804796

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

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

8 years agoclang-format: [JS] no ASI on `import {x as\n y}`.
Martin Probst [Wed, 1 Jun 2016 15:22:47 +0000 (15:22 +0000)]
clang-format: [JS] no ASI on `import {x as\n y}`.

Summary: ASI did not handle the ES6 `as` operator correctly.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

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

8 years agoclang-format: [JS] Sort imported symbols.
Martin Probst [Wed, 1 Jun 2016 15:19:53 +0000 (15:19 +0000)]
clang-format: [JS] Sort imported symbols.

Summary: E.g. sort `import {b, a} from 'x';` into `import {a, b} from 'x';`.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

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

8 years agoIt seems we need to add SemaExpr.cpp to the /bigobj list; I am getting consistent...
Aaron Ballman [Wed, 1 Jun 2016 15:17:54 +0000 (15:17 +0000)]
It seems we need to add SemaExpr.cpp to the /bigobj list; I am getting consistent failures of hitting the section count limit.

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

8 years ago[Clang][Intrinsics][avx512] Continue Adding round cvt to clang
Michael Zuckerman [Wed, 1 Jun 2016 14:41:41 +0000 (14:41 +0000)]
[Clang][Intrinsics][avx512] Continue Adding round cvt to clang

And remove trailing spaces in intrinsic f test
Differential Revision: http://reviews.llvm.org/D20810

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

8 years agoFix the CLANG_ENABLE_STATIC_ANALYZER=OFF build.
Yaron Keren [Wed, 1 Jun 2016 13:47:26 +0000 (13:47 +0000)]
Fix the CLANG_ENABLE_STATIC_ANALYZER=OFF build.

tools/clang/tools/CMakeLists.txt does not create the
clang-check target when CLANG_ENABLE_STATIC_ANALYZER=OFF.

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

8 years agoAdding front-end support to several intrinsics (bit scanning, conversion and state...
Michael Zuckerman [Wed, 1 Jun 2016 12:21:00 +0000 (12:21 +0000)]
Adding front-end support to several intrinsics (bit scanning, conversion and state reading intrinsics)

Adding LLVM front-end support to two intrinsics dealing with bit scan: _bit_scan_forward and _bit_scan_reverse.
 Their functionality is as described in Intel intrinsics guide:
 https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_bit_scan_forward&expand=371,370
 https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_bit_scan_reverse&expand=371,370

 Furthermore, adding clang front-end support to these conversion intrinsics: _mm256_cvtsd_f64, _mm256_cvtsi256_si32 and _mm256_cvtss_f32.

 Finally, adding tests to all of the above, as well as to the state reading intrinsics _rdpmc and _rdtsc.
  Their functionality is also specified in the Intel intrinsics guide.

Commit on behalf of Omer Paparo Bivas

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

8 years ago[Clang][Intrinsics][avx512] Adding round intrinsics fot max/min/sqrt instruction...
Michael Zuckerman [Wed, 1 Jun 2016 08:34:03 +0000 (08:34 +0000)]
[Clang][Intrinsics][avx512] Adding round intrinsics fot max/min/sqrt instruction set to clang

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

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

8 years ago[Clang][Intrinsics][avx512] Adding round roundscale to clang
Michael Zuckerman [Wed, 1 Jun 2016 07:35:44 +0000 (07:35 +0000)]
[Clang][Intrinsics][avx512] Adding round roundscale to clang

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

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

8 years agoCodeGen: tweak CFString emission for COFF targets
Saleem Abdulrasool [Wed, 1 Jun 2016 04:22:24 +0000 (04:22 +0000)]
CodeGen: tweak CFString emission for COFF targets

The `isa' member was previously not given the correct DLL Storage.  Ensure that
we give the `isa' constant `__CFConstantStringClassReference' the correct DLL
storage.  Default to dllimport unless an explicit specification gives it a
dllexport storage.

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

8 years agoIndexer: add CXObjCPropertyAttr_class for class properties.
Manman Ren [Tue, 31 May 2016 23:22:04 +0000 (23:22 +0000)]
Indexer: add CXObjCPropertyAttr_class for class properties.

rdar://25963227

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

8 years ago[AMDGPU] Set default dwarf version to 2
Konstantin Zhuravlyov [Tue, 31 May 2016 22:47:11 +0000 (22:47 +0000)]
[AMDGPU] Set default dwarf version to 2

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

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

8 years ago[CUDA] Conservatively mark inline asm as convergent.
Justin Lebar [Tue, 31 May 2016 21:27:13 +0000 (21:27 +0000)]
[CUDA] Conservatively mark inline asm as convergent.

Summary:
This is particularly important because a some convergent CUDA intrinsics
(e.g.  __shfl_down) are implemented in terms of inline asm.

Reviewers: tra

Subscribers: cfe-commits

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

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

8 years ago[Coverage] Remove redundant handleFileExit() call (NFC)
Vedant Kumar [Tue, 31 May 2016 20:35:12 +0000 (20:35 +0000)]
[Coverage] Remove redundant handleFileExit() call (NFC)

I added this call in r271308. It's redundant because it's dominated by a
call to extendRegion().

Thanks to Justin Bogner for pointing this out!

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

8 years ago[CMake] Update to requiring CMake 3.4.3
Chris Bieneman [Tue, 31 May 2016 20:21:38 +0000 (20:21 +0000)]
[CMake] Update to requiring CMake 3.4.3

Summary:
This is as per the discussions on developer lists:

http://lists.llvm.org/pipermail/llvm-dev/2016-April/098780.html
http://lists.llvm.org/pipermail/llvm-dev/2016-May/100058.html

Subscribers: cfe-commits

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

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

8 years ago[Parser] Fix look ahead after EOF while parsing objc message and lambdas
Bruno Cardoso Lopes [Tue, 31 May 2016 18:46:31 +0000 (18:46 +0000)]
[Parser] Fix look ahead after EOF while parsing objc message and lambdas

If a closing ')' isn't found for a macro instantiation inside a '[',
the next token is EOF, this leads to crashes if we try to look ahead of
that. This could be triggered whenever trying to parse lambdas or objs
message expressions.

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

rdar://problem/25662647

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

8 years agoPCH + module: make sure we write out macros associated with builtin identifiers.
Manman Ren [Tue, 31 May 2016 18:19:32 +0000 (18:19 +0000)]
PCH + module: make sure we write out macros associated with builtin identifiers.

When we import a module that defines a builtin identifier from prefix header and
precompile the prefix header, the macro information related to the identifier
is lost.

If we don't precompile the prefix header, the source file can still see the
macro information. The reason is that we write out the identifier in the pch
but not the macro information since the macro is not defined locally.

This is related to r251565. In that commit, if we read a builtin identifier from
a module that wasn't "interesting" to that module, we will still write it out to
a PCH that imports that module.

The fix is to write exported module macros for PCH as well.

rdar://24666630

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

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

8 years ago[Coverage] Fix crash on a switch partially covered by a macro (PR27948)
Vedant Kumar [Tue, 31 May 2016 18:06:19 +0000 (18:06 +0000)]
[Coverage] Fix crash on a switch partially covered by a macro (PR27948)

We have to handle file exits before and after visiting regions in the
switch body. Fixes PR27948.

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

8 years agoWork around MinGW's macro definition of 'interface' to 'struct'
Reid Kleckner [Tue, 31 May 2016 17:42:56 +0000 (17:42 +0000)]
Work around MinGW's macro definition of 'interface' to 'struct'

Previous attempts to rename the IBOutletCollection argument to something
other than "Interface" were undone (r127127 and r139620).  Instead of
renaming it, work around this in tablegen, so the public facing getter
can have the usual name of 'getInterface'.

Fixes PR26682

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

8 years agoAMDGPU: Update datalayout string
Matt Arsenault [Tue, 31 May 2016 16:58:18 +0000 (16:58 +0000)]
AMDGPU: Update datalayout string

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

8 years agoFixed bug
Piotr Padlewski [Tue, 31 May 2016 15:56:26 +0000 (15:56 +0000)]
Fixed bug

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

8 years agoclang-c: Add the clang_getCursorVisibility() API
Ehsan Akhgari [Tue, 31 May 2016 15:55:51 +0000 (15:55 +0000)]
clang-c: Add the clang_getCursorVisibility() API

This patch adds an API for querying the visibility of the entity
referred to by a cursor.

Patch by Michael Wu <mwu@mozilla.com>.

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

8 years agoRevert r253909 because it was committed with an incorrect message
Ehsan Akhgari [Tue, 31 May 2016 15:39:10 +0000 (15:39 +0000)]
Revert r253909 because it was committed with an incorrect message

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

8 years ago[ASTMatchers] Breaking change of `has` matcher
Piotr Padlewski [Tue, 31 May 2016 15:25:05 +0000 (15:25 +0000)]
[ASTMatchers] Breaking change of `has` matcher

has matcher can now match to implicit and paren casts

http://reviews.llvm.org/D20801

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

8 years agoAvoid unused variable warning in release builds.
Benjamin Kramer [Tue, 31 May 2016 14:14:42 +0000 (14:14 +0000)]
Avoid unused variable warning in release builds.

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

8 years ago[clang-format] insert new #includes into correct blocks when cleaning up Replacement...
Eric Liu [Tue, 31 May 2016 13:34:20 +0000 (13:34 +0000)]
[clang-format] insert new #includes into correct blocks when cleaning up Replacement with cleanupAroundReplacements().

Summary:
When a replacement's offset is set to UINT_MAX or -1U, it is treated as
a header insertion replacement by cleanupAroundReplacements(). The new #include
directive is then inserted into the correct block.

Reviewers: klimek, djasper

Subscribers: klimek, cfe-commits, bkramer

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

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

8 years ago[ARM] Add load/store co-processor intrinsics.
Ranjeet Singh [Tue, 31 May 2016 13:31:25 +0000 (13:31 +0000)]
[ARM] Add load/store co-processor intrinsics.

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

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

8 years ago[Clang][Intrinsics][avx512] Adding round cvt to clang
Michael Zuckerman [Tue, 31 May 2016 11:27:34 +0000 (11:27 +0000)]
[Clang][Intrinsics][avx512] Adding round cvt to clang

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

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

8 years ago[OPENMP] Update in ReleaseNotes for OpenMP support.
Alexey Bataev [Tue, 31 May 2016 11:17:08 +0000 (11:17 +0000)]
[OPENMP] Update in ReleaseNotes for OpenMP support.

Added notes about full support of all non-offloading features of OpenMP
4.5 + info about option -fopenmp-version=[31|40|45] that allows to
control supported OpenMP version.

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

8 years ago[CommonOptionsParser] Return source paths as const ref.
Benjamin Kramer [Tue, 31 May 2016 10:17:46 +0000 (10:17 +0000)]
[CommonOptionsParser] Return source paths as const ref.

This saves a superfluous copy and makes managing the lifetime of the
returned strings a bit easier.

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

8 years ago[AVX512] Convert masked load builtins to generic masked load intrinsics instead of...
Craig Topper [Tue, 31 May 2016 06:58:07 +0000 (06:58 +0000)]
[AVX512] Convert masked load builtins to generic masked load intrinsics instead of the x86 specific ones.

This will allow the x86 intrinsics to be removed from the backend.

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

8 years ago[MSVC] Fix stack overflow in unqualified type lookup logic, by Will
Alexey Bataev [Tue, 31 May 2016 06:21:27 +0000 (06:21 +0000)]
[MSVC] Fix stack overflow in unqualified type lookup logic, by Will
Wilson.

An unqualified lookup for in base classes may cause stack overflow if
the base class is a specialization of current class.
Patch by Will Wilson.

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

8 years ago[X86] Use unaligned load intrinsics to implement other intrinsics instead of manually...
Craig Topper [Tue, 31 May 2016 05:49:13 +0000 (05:49 +0000)]
[X86] Use unaligned load intrinsics to implement other intrinsics instead of manually creating the unaligned load.

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

8 years ago[AVX512] Emit generic masked store instrinsics instead of using x86 specific intrinsics.
Craig Topper [Tue, 31 May 2016 01:50:10 +0000 (01:50 +0000)]
[AVX512] Emit generic masked store instrinsics instead of using x86 specific intrinsics.

This will allow us to remove the x86 instrinics from the backend.

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

8 years ago[X86] Ensure load/store tests unaligned pointers really are align 1
Simon Pilgrim [Mon, 30 May 2016 19:20:55 +0000 (19:20 +0000)]
[X86] Ensure load/store tests unaligned pointers really are align 1

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

8 years agoCodeGen: address post-commit review comments
Saleem Abdulrasool [Mon, 30 May 2016 18:26:06 +0000 (18:26 +0000)]
CodeGen: address post-commit review comments

David Majnemer pointed out that isOSBinFormatMachO is more compact.  NFC.

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

8 years ago[X86][SSE] Added missing tests (merge failure)
Simon Pilgrim [Mon, 30 May 2016 17:58:38 +0000 (17:58 +0000)]
[X86][SSE] Added missing tests (merge failure)

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

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

8 years ago[X86][SSE] _mm_store1_ps/_mm_store1_pd should require an aligned pointer
Simon Pilgrim [Mon, 30 May 2016 17:55:25 +0000 (17:55 +0000)]
[X86][SSE] _mm_store1_ps/_mm_store1_pd should require an aligned pointer

According to the gcc headers, intel intrinsics docs and msdn codegen the _mm_store1_pd (and its _mm_store_pd1 equivalent) should use an aligned pointer - the clang headers are the only implementation I can find that assume non-aligned stores (by storing with _mm_storeu_pd).

Additionally, according to the intel intrinsics docs and msdn codegen the _mm_store1_ps (_mm_store_ps1) requires a similarly aligned pointer.

This patch raises the alignment requirements to match the other implementations by calling _mm_store_ps/_mm_store_pd instead.

I've also added the missing _mm_store_pd1 intrinsic (which maps to _mm_store1_pd like _mm_store_ps1 does to _mm_store1_ps).

As a followup I'll update the llvm fast-isel tests to match this codegen.

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

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

8 years ago[CUDA] Fix order of vectorized ldg intrinsics' elements.
Justin Lebar [Mon, 30 May 2016 17:12:55 +0000 (17:12 +0000)]
[CUDA] Fix order of vectorized ldg intrinsics' elements.

Summary: The order is [x, y, z, w], not [w, x, y, z].

Subscribers: cfe-commits, tra

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

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

8 years ago[X86] Replace unaligned store builtins in SSE/AVX intrinsic files with code that...
Craig Topper [Mon, 30 May 2016 17:10:30 +0000 (17:10 +0000)]
[X86] Replace unaligned store builtins in SSE/AVX intrinsic files with code that will compile to a native unaligned store. Remove the builtins since they are no longer used.

Intrinsics will be removed from llvm in a future commit.

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

8 years agotest: add explicit targets for some tests
Saleem Abdulrasool [Mon, 30 May 2016 16:36:48 +0000 (16:36 +0000)]
test: add explicit targets for some tests

These tests currently expect MachO section names and do not provide a target.
Explicitly provide one.

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

8 years agoCodeGen: tweak CFConstantStrings for COFF and ELF
Saleem Abdulrasool [Mon, 30 May 2016 16:23:07 +0000 (16:23 +0000)]
CodeGen: tweak CFConstantStrings for COFF and ELF

Adjust the constant CFString emission to emit into more appropriate sections on
ELF and COFF targets.  It would previously try to use MachO section names
irrespective of the file format.

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

8 years ago[ASTMatchers] Add support of hasCondition for SwitchStmt.
Etienne Bergeron [Mon, 30 May 2016 15:25:25 +0000 (15:25 +0000)]
[ASTMatchers] Add support of hasCondition for SwitchStmt.

Summary:
The switch statement could be added to the hasCondition matcher.

Example:
```
clang-query> match switchStmt(hasCondition(ignoringImpCasts(declRefExpr())))
```

Output:
```
Match #1:

Binding for "root":
SwitchStmt 0x2f9b528 </usr/local/google/home/etienneb/examples/enum.cc:35:3, line:38:3>
|-<<<NULL>>>
|-ImplicitCastExpr 0x2f9b510 <line:35:11> 'int' <IntegralCast>
| `-ImplicitCastExpr 0x2f9b4f8 <col:11> 'enum Color' <LValueToRValue>
|   `-DeclRefExpr 0x2f9b4d0 <col:11> 'enum Color' lvalue Var 0x2f9a118 'C' 'enum Color'
`-CompoundStmt 0x2f9b610 <col:14, line:38:3>
  |-CaseStmt 0x2f9b578 <line:36:3, col:22>
  | |-ImplicitCastExpr 0x2f9b638 <col:8> 'int' <IntegralCast>
  | | `-DeclRefExpr 0x2f9b550 <col:8> 'enum Size' EnumConstant 0x2f99e40 'Small' 'enum Size'
  | |-<<<NULL>>>
  | `-ReturnStmt 0x2f9b5d0 <col:15, col:22>
  |   `-IntegerLiteral 0x2f9b5b0 <col:22> 'int' 1
  `-DefaultStmt 0x2f9b5f0 <line:37:3, col:12>
    `-BreakStmt 0x2f9b5e8 <col:12>

1 match.
```

Reviewers: aaron.ballman, sbenza, klimek

Subscribers: klimek, cfe-commits

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

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

8 years ago[Clang][avx512][builtin] Adding missing intrinsics for cvt
Michael Zuckerman [Mon, 30 May 2016 13:22:12 +0000 (13:22 +0000)]
[Clang][avx512][builtin] Adding missing intrinsics for cvt

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

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

8 years ago[OPENMP 4.5] Additional codegen for statically scheduled loops with
Alexey Bataev [Mon, 30 May 2016 13:05:14 +0000 (13:05 +0000)]
[OPENMP 4.5] Additional codegen for statically scheduled loops with
'simd' modifier.

Runtime library defines new schedule constant kmp_sch_static_balanced_chunked = 45 for static loop-based directives  static with chunk adjustment (e.g., simd). Added codegen for this kind of schedule.

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

8 years ago[OPENMP 4.5] Fixed codegen for 'priority' and destructors in task-based
Alexey Bataev [Mon, 30 May 2016 09:06:50 +0000 (09:06 +0000)]
[OPENMP 4.5] Fixed codegen for 'priority' and destructors in task-based
directives.

'kmp_task_t' record type added a new field for 'priority' clause and
changed the representation of pointer to destructors for privates used
within loop-based directives.
Old representation:

typedef struct kmp_task {                   /* GEH: Shouldn't this be
aligned somehow? */
  void *shareds;                            /**< pointer to block of
    pointers to shared vars   */
  kmp_routine_entry_t routine;              /**< pointer to routine
    to call for executing task */
  kmp_int32 part_id;                        /**< part id for the
    task                          */
  kmp_routine_entry_t destructors;        /* pointer to function to
  invoke deconstructors of firstprivate C++ objects */
  /*  private vars  */
} kmp_task_t;

New representation:

typedef struct kmp_task {                   /* GEH: Shouldn't this be
aligned somehow? */
  void *shareds;                            /**< pointer to block of
    pointers to shared vars   */
  kmp_routine_entry_t routine;              /**< pointer to routine
    to call for executing task */
  kmp_int32 part_id;                        /**< part id for the
    task                          */
  kmp_cmplrdata_t data1; /* Two known
optional additions: destructors and priority */
  kmp_cmplrdata_t data2; /* Process
destructors first, priority second */
/* future data */
  /*  private vars  */
} kmp_task_t;

Also excessive initialization of 'destructors' fields to 'null' was
removed from codegen if it is known that no destructors shal be used.
Currently a special bit is used in 'kmp_tasking_flags_t' bitfields
('destructors_thunk' bitfield).

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

8 years ago[OpenCL] Remove tests without triple from test/Headers/opencl-c-header.cl.
Yaxun Liu [Mon, 30 May 2016 06:42:48 +0000 (06:42 +0000)]
[OpenCL] Remove tests without triple from test/Headers/opencl-c-header.cl.

This test requires triples with Itanium C++ ABI whereas triples with MSVC environment uses Microsoft C++ ABI.

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

8 years ago[OpenCL] Add the default header file opencl-c.h for OpenCL C language
Yaxun Liu [Mon, 30 May 2016 02:22:28 +0000 (02:22 +0000)]
[OpenCL] Add the default header file opencl-c.h for OpenCL C language

OpenCL has large number of "builtin" functions ("builtin" in the sense of OpenCL spec) which are defined in header files. To compile OpenCL kernels using these builtin functions, a header file is needed.

This header file is based on the Khronos implementation (https://github.com/KhronosGroup/SPIR/blob/spirv-1.0/lib/Headers/opencl.h) with heavy refactoring.

Re-commit after fixing failures on ppc64/systemz etc.

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

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

8 years agoclang-format: Fix segfault introduced by allowing wraps after comments.
Daniel Jasper [Sun, 29 May 2016 22:07:22 +0000 (22:07 +0000)]
clang-format: Fix segfault introduced by allowing wraps after comments.

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

8 years agoEnable some accidentally dead tests and fix up the bitrot
David Blaikie [Sun, 29 May 2016 19:50:23 +0000 (19:50 +0000)]
Enable some accidentally dead tests and fix up the bitrot

Problem found by Nico, originally committed by me in r213213. The .test
prefix wasn't actually being run. Once that was fixed the test cases had
outdated command line syntax and IR debug info format, so updated for
those issues to get them back up and running.

Thanks Nico!

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

8 years ago[X86][SSE] Make unsigned integer vector types generally available
Simon Pilgrim [Sun, 29 May 2016 18:49:08 +0000 (18:49 +0000)]
[X86][SSE] Make unsigned integer vector types generally available

As discussed on http://reviews.llvm.org/D20684, move the unsigned integer vector types used for zero extension to make them available for general use.

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

8 years agoclang-format: [JS] Support shebang lines on the very first line.
Martin Probst [Sun, 29 May 2016 14:41:36 +0000 (14:41 +0000)]
clang-format: [JS] Support shebang lines on the very first line.

Summary:
Shebang lines (`#!/bin/blah`) can be used in JavaScript scripts to indicate
they should be run using e.g. node. This change treats # lines on the first line
as line comments.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

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

8 years agoclang-format: [JS] fix async parsing.
Martin Probst [Sun, 29 May 2016 14:41:07 +0000 (14:41 +0000)]
clang-format: [JS] fix async parsing.

Summary:
Only treat the sequence `async function` as the start of a function expression,
as opposed to every occurrence of the token `async` (whoops).

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

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

8 years agoclang-format: [JS] FormatToken.startsSequence/endsSequence.
Martin Probst [Sun, 29 May 2016 14:41:02 +0000 (14:41 +0000)]
clang-format: [JS] FormatToken.startsSequence/endsSequence.

Refactors AnnotatedLine.startsWith/endsWith by extracting the core functionality
into FormatToken.startsSequence/endsSequence. This allows checking tokens within
the pointered linked list structure with a lookahead, automatically ignoring
comments, which is useful in many places (e.g. see subsequent commit).

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

8 years agoAvoid unnecessary std::string copies. NFC.
Benjamin Kramer [Sun, 29 May 2016 11:04:56 +0000 (11:04 +0000)]
Avoid unnecessary std::string copies. NFC.

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

8 years ago[X86] Simplify alignr builtin support by recognizing that NumLaneElts is always 16...
Craig Topper [Sun, 29 May 2016 07:06:02 +0000 (07:06 +0000)]
[X86] Simplify alignr builtin support by recognizing that NumLaneElts is always 16. NFC

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

8 years agoFix typo.
Rafael Espindola [Sun, 29 May 2016 03:03:22 +0000 (03:03 +0000)]
Fix typo.

Thanks to David Majnemer for noticing.

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

8 years ago[CodeGen] Use the ArrayRef form CreateShuffleVector instead of building ConstantVecto...
Craig Topper [Sun, 29 May 2016 02:39:30 +0000 (02:39 +0000)]
[CodeGen] Use the ArrayRef form CreateShuffleVector instead of building ConstantVectors or ConstantDataVectors and calling the other form.

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

8 years agoMark test as requiring x86-registered-target.
Rafael Espindola [Sun, 29 May 2016 02:36:16 +0000 (02:36 +0000)]
Mark test as requiring x86-registered-target.

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

8 years agoHandle -Wa,--mrelax-relocations=[no|yes].
Rafael Espindola [Sun, 29 May 2016 02:01:14 +0000 (02:01 +0000)]
Handle -Wa,--mrelax-relocations=[no|yes].

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

8 years agoRevert r271136 [OpenCL] Add the default header file opencl-c.h for OpenCL C language...
Yaxun Liu [Sat, 28 May 2016 19:50:40 +0000 (19:50 +0000)]
Revert r271136 [OpenCL] Add the default header file opencl-c.h for OpenCL C language due to build failure on ppc64/hexagon/systemz.

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

8 years agoCodeGen: support blocks on COFF targets in DLLs
Saleem Abdulrasool [Sat, 28 May 2016 19:41:35 +0000 (19:41 +0000)]
CodeGen: support blocks on COFF targets in DLLs

This extends the blocks support to support blocks with a dynamically linked
blocks runtime.  The previous code generation would work only for static builds
of the blocks runtime.  Mark the block "isa" pointers and functions as dllimport
if no explicit declaration marked with __declspec(dllexport) is found.  This
additional check allows for the use of the functionality in the runtime library
if desired.

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

8 years ago[OpenCL] Add the default header file opencl-c.h for OpenCL C language
Yaxun Liu [Sat, 28 May 2016 19:09:01 +0000 (19:09 +0000)]
[OpenCL] Add the default header file opencl-c.h for OpenCL C language

OpenCL has large number of "builtin" functions ("builtin" in the sense of OpenCL spec) which are defined in header files. To compile OpenCL kernels using these builtin functions, a header file is needed.

This header file is based on the Khronos implementation (https://github.com/KhronosGroup/SPIR/blob/spirv-1.0/lib/Headers/opencl.h) with heavy refactoring.

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

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