]> granicus.if.org Git - clang/log
clang
8 years ago[analyzer] Make it possible to query the function name from a CallDescription.
Gabor Horvath [Thu, 14 Apr 2016 11:56:28 +0000 (11:56 +0000)]
[analyzer] Make it possible to query the function name from a CallDescription.

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

8 years ago[ASTImporter] Implement some expression-related AST node import.
Artem Dergachev [Thu, 14 Apr 2016 11:51:27 +0000 (11:51 +0000)]
[ASTImporter] Implement some expression-related AST node import.

Introduce ASTImporter unit test framework.

Fix a memory leak introduced in cf8ccff5: an array is allocated
in ImportArray and never freed.

Support new node kinds:

- GCCAsmStmt

- AddrLabelExpr
- AtomicExpr
- CompoundLiteralExpr
- CXXBoolLiteralExpr
- CXXNullPtrLiteralExpr
- CXXThisExpr
- DesignatedInitExpr
- GNUNullExpr
- ImplicitValueInitExpr
- InitListExpr
- OpaqueValueExpr
- PredefinedExpr
- ParenListExpr
- StmtExpr
- VAArgExpr

- BinaryConditionalOperator
- ConditionalOperator

- FloatingLiteral
- StringLiteral

- InjectedClassNameType
- TemplateTypeParmType

- LabelDecl

Patch by Aleksei Sidorin!

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

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

8 years agoReapply r258505 after r266254, this time with a comment to make it more sticky.
Nico Weber [Thu, 14 Apr 2016 11:12:32 +0000 (11:12 +0000)]
Reapply r258505 after r266254, this time with a comment to make it more sticky.

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

8 years ago[MSVC] Fix check for wchar_t type in case of -fno-wchar
Dmitry Polukhin [Thu, 14 Apr 2016 09:52:06 +0000 (09:52 +0000)]
[MSVC] Fix check for wchar_t type in case of -fno-wchar

The example below should work identically with and without compiler native
wchar_t support.

void foo(wchar_t * t = L"");

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

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

8 years ago[Clang][AVX512][BUILTIN] Adding support for intrinsics of vpmov{d|q}{b|w|d}{128|256...
Michael Zuckerman [Thu, 14 Apr 2016 07:56:51 +0000 (07:56 +0000)]
[Clang][AVX512][BUILTIN] Adding support for intrinsics of vpmov{d|q}{b|w|d}{128|256|512} instruction set

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

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

8 years ago[Clang][AVX512][Builtin] Adding intrinsics of vpmovus{d|q}{b|w|d}{128|256|512} instru...
Michael Zuckerman [Thu, 14 Apr 2016 06:48:09 +0000 (06:48 +0000)]
[Clang][AVX512][Builtin] Adding intrinsics of vpmovus{d|q}{b|w|d}{128|256|512} instruction set

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

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

8 years agoMake sure the LLVMContext outlive the CompilerInstance
Mehdi Amini [Thu, 14 Apr 2016 05:37:41 +0000 (05:37 +0000)]
Make sure the LLVMContext outlive the CompilerInstance

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoDo not use llvm:getGlobalContext() in unittests
Mehdi Amini [Thu, 14 Apr 2016 05:34:32 +0000 (05:34 +0000)]
Do not use llvm:getGlobalContext() in unittests

Currently trying to nuke this API from LLVM.

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years ago[modules] Store the location of the lexical update record in a decl update as
Richard Smith [Thu, 14 Apr 2016 00:50:18 +0000 (00:50 +0000)]
[modules] Store the location of the lexical update record in a decl update as
an offset from the current record rather than as an absolute bit number. This
gives a minor .pcm file size reduction.

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

8 years agoReorder ASTNodeKind::AllKindInfo to match NodeKindId.
Alexander Kornienko [Thu, 14 Apr 2016 00:47:40 +0000 (00:47 +0000)]
Reorder ASTNodeKind::AllKindInfo to match NodeKindId.

Summary:
AllKindInfo is being indexed by NodeKindId, so the order must match.
Extended ASTTypeTraits tests to cover this.

Reviewers: sbenza

Subscribers: cfe-commits, klimek

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

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

8 years ago[modules] Remove CXX_BASE_SPECIFIERS_OFFSETS table. Instead of storing an ID of
Richard Smith [Thu, 14 Apr 2016 00:29:55 +0000 (00:29 +0000)]
[modules] Remove CXX_BASE_SPECIFIERS_OFFSETS table. Instead of storing an ID of
a table entry in the corresponding decl, store an offset from the current
record to the relevant CXX_BASE_SPECIFIERS record. This results in fewer
indirections and a minor .pcm file size reduction.

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

8 years agoObjC kindof: order the methods in global pool relative to availability.
Manman Ren [Wed, 13 Apr 2016 23:43:56 +0000 (23:43 +0000)]
ObjC kindof: order the methods in global pool relative to availability.

r265877 tries to put methods that are deprecated or unavailable to the
front of the global pool to emit diagnostics, but it breaks some of
our existing codes that depend on choosing a certain method for id
lookup.

This commit orders the methods with the same declaration with respect
to the availability, but do not order methods with different declaration.

rdar://25707511

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

8 years ago[CodeGen] Avoid ctor/dtor boilerplate with some C++11
Reid Kleckner [Wed, 13 Apr 2016 23:37:17 +0000 (23:37 +0000)]
[CodeGen] Avoid ctor/dtor boilerplate with some C++11

Non-owning pointers that cache LLVM types and constants can use
'nullptr' default member initializers so that we don't need to mention
them in the constructor initializer list.

Owning pointers should use std::unique_ptr so that we don't need to
manually delete them in the destructor. They also don't need to be
mentioned in the constructor at that point.

NFC

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

8 years ago[modules] Remove CXX_CTOR_INITIALIZERS_OFFSETS table. Instead of storing an ID
Richard Smith [Wed, 13 Apr 2016 21:57:08 +0000 (21:57 +0000)]
[modules] Remove CXX_CTOR_INITIALIZERS_OFFSETS table. Instead of storing an ID
of a table entry in the corresponding decl, store an offset from the current
record to the relevant CXX_CTOR_INITIALIZERS record. This results in fewer
indirections and a minor .pcm file size reduction.

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

8 years ago[SemaObjC] Properly handle mix between type arguments and protocols.
Bruno Cardoso Lopes [Wed, 13 Apr 2016 20:59:07 +0000 (20:59 +0000)]
[SemaObjC] Properly handle mix between type arguments and protocols.

Under certain conditions clang currently fails to properly diagnostic ObjectC
parameter list when type args and protocols are mixed in the same list. This
happens when the first item in the parameter list is a (1) protocol, (2)
unknown type or (3) a list of protocols/unknown types up to the first type
argument. Fix the problem to report the proper error, example:

NSArray<M, NSValue *, NSURL, NSArray <id <M>>> *foo = @[@"a"];
NSNumber *bar = foo[0];
NSLog(@"%@", bar);

$ clang ...
x.m:7:13: error: angle brackets contain both a type ('NSValue') and a protocol ('M')
        NSArray<M, NSValue *, NSURL, NSArray <id <M>>> *foo = @[@"a"];
                ~  ^

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

rdar://problem/22204367

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

8 years agoMake sure CheckDestructor gets called on dllimported classes if the vtable is used...
Hans Wennborg [Wed, 13 Apr 2016 20:21:15 +0000 (20:21 +0000)]
Make sure CheckDestructor gets called on dllimported classes if the vtable is used (PR27319)

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

8 years agoLit C++11 Compatibility Patch #7
Charles Li [Wed, 13 Apr 2016 20:00:45 +0000 (20:00 +0000)]
Lit C++11 Compatibility Patch #7

13 tests have been updated for C++11 compatibility.
Differential Revision: http://reviews.llvm.org/D19068

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

8 years ago[CrashReproducer] Add test to run the reproducer script + modules
Bruno Cardoso Lopes [Wed, 13 Apr 2016 19:28:24 +0000 (19:28 +0000)]
[CrashReproducer] Add test to run the reproducer script + modules

Now that we have basic support in place, make sure the reproducer script
works with modules for a simple testcase.

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

8 years ago[CrashReproducer] Setup 'use-external-names' in YAML files.
Bruno Cardoso Lopes [Wed, 13 Apr 2016 19:28:21 +0000 (19:28 +0000)]
[CrashReproducer] Setup 'use-external-names' in YAML files.

Hide the real paths when rebuilding from VFS by setting up the crash
reproducer to use 'use-external-names' = false. This way we avoid
module redifinition errors and consistently use the same paths against
all modules.

With this change on Darwin we are able to simulate a crash for a simple
application using "Foundation/Foundation.h" (which relies on a bunch of
different frameworks and headers) and successfully rebuild all the
modules by relying solely at the VFS overlay.

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

8 years ago[VFS] Move default values to in-class member initialization. NFC
Bruno Cardoso Lopes [Wed, 13 Apr 2016 19:28:16 +0000 (19:28 +0000)]
[VFS] Move default values to in-class member initialization. NFC

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

8 years agoRemove redundant null-check; NFC
Hubert Tong [Wed, 13 Apr 2016 18:41:03 +0000 (18:41 +0000)]
Remove redundant null-check; NFC

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

8 years agolibclang: Use early-return to reduce indentation.
David Blaikie [Wed, 13 Apr 2016 18:36:19 +0000 (18:36 +0000)]
libclang: Use early-return to reduce indentation.

& since I'll get blamed for all the lines anyway, remove some
else-after-return and otherwise tidy things up.

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

8 years agoSimplify memory management of CXEvalResultKind/ExprEvalResult using unique_ptr and...
David Blaikie [Wed, 13 Apr 2016 18:23:33 +0000 (18:23 +0000)]
Simplify memory management of CXEvalResultKind/ExprEvalResult using unique_ptr and a dtor

This doesn't seem to need to be a C type, C only handles a void*, so use
new/delete as usual to simplify allocation and cleanup.

Follow-up to r265994

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

8 years ago[analyzer] Nullability: Suppress diagnostic on bind with cast.
Devin Coughlin [Wed, 13 Apr 2016 17:59:24 +0000 (17:59 +0000)]
[analyzer] Nullability: Suppress diagnostic on bind with cast.

Update the nullability checker to allow an explicit cast to nonnull to
suppress a warning on an assignment of nil to a nonnull:

id _Nonnull x = (id _Nonnull)nil; // no-warning

This suppression as already possible for diagnostics on returns and
function/method arguments.

rdar://problem/25381178

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

8 years ago[OrderFiles] Don't allow lit to run dtrace multithreaded
Chris Bieneman [Wed, 13 Apr 2016 17:12:56 +0000 (17:12 +0000)]
[OrderFiles] Don't allow lit to run dtrace multithreaded

Dtrace is implemented to try and minimize performance impact on the process being traced. This results in dtrace dropping samples if it is taking too many CPU resources. Multi-threading dtrace increases the sample drop rate dramatically.

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

8 years agoAArch64: allow 64-bit access to sysregs.
Tim Northover [Wed, 13 Apr 2016 17:08:55 +0000 (17:08 +0000)]
AArch64: allow 64-bit access to sysregs.

Although all the registers are actually 32-bits, I think we have to assume the
high 32-bits could be RES0 (the ARM ARM is unclear). If so, reading as a 32-bit
register can require extra zero extension operations.

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

8 years agoARM: make Darwin's "-arch armv7em" default to hard-float.
Tim Northover [Wed, 13 Apr 2016 17:08:51 +0000 (17:08 +0000)]
ARM: make Darwin's "-arch armv7em" default to hard-float.

We've already paid the price for separate "armv7m" and "armv7em" slices
(support in other tools), it's silly to make them identical other than the
default CPU.

rdar://23055688

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

8 years ago[Clang][AVX512][Builtin] Adding support to intrinsics of pmovs{d|q}{b|w|d}{128|256...
Michael Zuckerman [Wed, 13 Apr 2016 15:02:04 +0000 (15:02 +0000)]
[Clang][AVX512][Builtin] Adding support to intrinsics of pmovs{d|q}{b|w|d}{128|256|512} instruction set

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

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

8 years agoReverting r266199; it causes build bot failures.
Aaron Ballman [Wed, 13 Apr 2016 14:53:52 +0000 (14:53 +0000)]
Reverting r266199; it causes build bot failures.

http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/3255
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/3517

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

8 years agoAdd functions declared in ctype.h to builtin function database. All functions are...
Aaron Ballman [Wed, 13 Apr 2016 13:55:58 +0000 (13:55 +0000)]
Add functions declared in ctype.h to builtin function database. All functions are annotated with nothrow and pure attribute, which enables better optimization.

Patch by Taewook Oh.

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

8 years ago[OPENMP 4.0] Fixed DSA analysis for taskloop directives.
Alexey Bataev [Wed, 13 Apr 2016 13:36:48 +0000 (13:36 +0000)]
[OPENMP 4.0] Fixed DSA analysis for taskloop directives.

Patch make clang to perform analysis for task-based directives also for
taskloop-based directives.

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

8 years ago[Clang][AVX512][Builtin] Adding support for VBROADCAST and VPBROADCASTB/W/D/Q instruc...
Michael Zuckerman [Wed, 13 Apr 2016 12:58:01 +0000 (12:58 +0000)]
[Clang][AVX512][Builtin] Adding support for VBROADCAST and VPBROADCASTB/W/D/Q instruction set

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

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

8 years agoAdd AST Matchers for CXXConstructorDecl::isDelegatingConstructor and CXXMethodDecl...
Alexander Kornienko [Wed, 13 Apr 2016 11:13:08 +0000 (11:13 +0000)]
Add AST Matchers for CXXConstructorDecl::isDelegatingConstructor and CXXMethodDecl::isUserProvided.

Summary: Added two AST matchers: isDelegatingConstructor for CXXConstructorDecl::IsDelegatingConstructor; and isUserProvided corresponding to CXXMethodDecl::isUserProvided.

Reviewers: aaron.ballman, alexfh

Subscribers: klimek, cfe-commits

Patch by Michael Miller!

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

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

8 years ago[Clang][AVX512][Builtin] Adding supporting to intrinsics of cvt{b|d|q}2mask{128|256...
Michael Zuckerman [Wed, 13 Apr 2016 10:49:37 +0000 (10:49 +0000)]
[Clang][AVX512][Builtin] Adding supporting to intrinsics of cvt{b|d|q}2mask{128|256|512} and cvtmask2{b|d|q}{128|256|512} instruction set.

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

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

8 years ago[modules] Add OpenCLImageTypes.def to module map to fix the modules build.
Alexey Bader [Wed, 13 Apr 2016 09:54:47 +0000 (09:54 +0000)]
[modules] Add OpenCLImageTypes.def to module map to fix the modules build.

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

8 years agoEnable support for __float128 in Clang
Nemanja Ivanovic [Wed, 13 Apr 2016 09:49:45 +0000 (09:49 +0000)]
Enable support for __float128 in Clang

This patch corresponds to review:
http://reviews.llvm.org/D15120

It adds support for the __float128 keyword, literals and a target feature to
enable it. This support is disabled by default on all targets and any target
that has support for this type is free to add it.

Based on feedback that I've received from target maintainers, this appears to
be the right thing for most targets. I have not heard from the maintainers of
X86 which I believe supports this type. I will subsequently investigate the
impact of enabling this on X86.

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

8 years agoTry to use readability-identifier-naming check on Clang.
Alexander Kornienko [Wed, 13 Apr 2016 08:59:49 +0000 (08:59 +0000)]
Try to use readability-identifier-naming check on Clang.

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

8 years ago[clang-tidy] Disable misc-unused-parameters for clang.
Alexander Kornienko [Wed, 13 Apr 2016 08:47:42 +0000 (08:47 +0000)]
[clang-tidy] Disable misc-unused-parameters for clang.

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

8 years ago[OpenCL] Move OpenCLImageTypes.def from clangAST to clangBasic library.
Alexey Bader [Wed, 13 Apr 2016 08:33:41 +0000 (08:33 +0000)]
[OpenCL] Move OpenCLImageTypes.def from clangAST to clangBasic library.

Putting OpenCLImageTypes.def to clangAST library violates layering requirement: "It's not OK for a Basic/ header to include an AST/ header".
This fixes the modules build.

Differential revision: http://reviews.llvm.org/D18954
Reviewers: Richard Smith, Vassil Vassilev.

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

8 years agoconstexpr -> const to appease MSVC bots.
Richard Smith [Wed, 13 Apr 2016 07:47:38 +0000 (07:47 +0000)]
constexpr -> const to appease MSVC bots.

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

8 years agoASTWriterDecl.cpp: Prune a couple of \param(s), corresponding to r266160. [-Wdocument...
NAKAMURA Takumi [Wed, 13 Apr 2016 07:45:10 +0000 (07:45 +0000)]
ASTWriterDecl.cpp: Prune a couple of \param(s), corresponding to r266160. [-Wdocumentation]

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

8 years ago[modules] Add some missing blockinfo records. No functionality change except to llvm...
Richard Smith [Wed, 13 Apr 2016 07:41:35 +0000 (07:41 +0000)]
[modules] Add some missing blockinfo records. No functionality change except to llvm-bcanalyzer output.

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

8 years ago[PPC64][VSX] Add a couple of new data types for vec_vsx_ld and vec_vsx_st intrinsics...
Chuang-Yu Cheng [Wed, 13 Apr 2016 05:16:31 +0000 (05:16 +0000)]
[PPC64][VSX] Add a couple of new data types for vec_vsx_ld and vec_vsx_st intrinsics and fix incorrect testcases with minor refactoring

New added data types:
  vector double vec_vsx_ld (int, const double *);
  vector float vec_vsx_ld (int, const float *);
  vector bool short vec_vsx_ld (int, const vector bool short *);
  vector bool int vec_vsx_ld (int, const vector bool int *);
  vector signed int vec_vsx_ld (int, const signed int *);
  vector unsigned int vec_vsx_ld (int, const unsigned int *);

  void vec_vsx_st (vector double, int, double *);
  void vec_vsx_st (vector float, int, float *);
  void vec_vsx_st (vector bool short, int, vector bool short *);
  void vec_vsx_st (vector bool short, int, signed short *);
  void vec_vsx_st (vector bool short, int, unsigned short *);
  void vec_vsx_st (vector bool int, int, vector bool int *);
  void vec_vsx_st (vector bool int, int, signed int *);
  void vec_vsx_st (vector bool int, int, unsigned int *);

Also fix testcases which use non-vector argument version of vec_vsx_ld or
vec_vsx_st, but pass incorrect parameter.

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

8 years ago[modules] Refactor handling of cases where we write an offset to a prior record into...
Richard Smith [Wed, 13 Apr 2016 02:12:03 +0000 (02:12 +0000)]
[modules] Refactor handling of cases where we write an offset to a prior record into the bitstream and simplify a little, in preparation for doing this in more cases.

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

8 years ago[analyzer] Nullability: Treat nil _Nonnull ivar as invariant violation.
Devin Coughlin [Wed, 13 Apr 2016 00:41:54 +0000 (00:41 +0000)]
[analyzer] Nullability: Treat nil _Nonnull ivar as invariant violation.

Treat a _Nonnull ivar that is nil as an invariant violation in a similar
fashion to how a nil _Nonnull parameter is treated as a precondition violation.

This avoids warning on defensive returns of nil on defensive internal
checks, such as the following common idiom:

@class InternalImplementation
@interface PublicClass {
  InternalImplementation * _Nonnull _internal;
}
-(id _Nonnull)foo;
@end

@implementation PublicClass
-(id _Nonnull)foo {
  if (!_internal)
    return nil; // no-warning

  return [_internal foo];
}
@end

rdar://problem/24485171

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

8 years agoclang/test/Driver/cl-options.c: Fix an expression to recognize dos r'\\'.
NAKAMURA Takumi [Wed, 13 Apr 2016 00:22:25 +0000 (00:22 +0000)]
clang/test/Driver/cl-options.c: Fix an expression to recognize dos r'\\'.

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

8 years ago[ObjC] Pop all cleanups created in EmitObjCForCollectionStmt before
Akira Hatanaka [Tue, 12 Apr 2016 23:10:58 +0000 (23:10 +0000)]
[ObjC] Pop all cleanups created in EmitObjCForCollectionStmt before
exiting the for-in loop.

This commit fixes a bug where EmitObjCForCollectionStmt didn't pop
cleanups for captures.

For example, in the following for-in loop, a block which captures self
is passed to foo1:

for (id x in [self foo1:^{ use(self); }]) {
  use(x);
  break;
}

Previously, the code in EmitObjCForCollectionStmt wouldn't pop the
cleanup for the captured self before exiting the loop, which caused
code-gen to generate an IR in which objc_release was called twice on
the captured self.

This commit fixes the bug by entering a RunCleanupsScope before the
loop condition is evaluated and forcing its cleanup before exiting the
loop.

rdar://problem/16865751

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

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

8 years agoObjC class properties: add diagnostics for unimplemented class properties.
Manman Ren [Tue, 12 Apr 2016 23:01:55 +0000 (23:01 +0000)]
ObjC class properties: add diagnostics for unimplemented class properties.

rdar://24711047

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

8 years ago[AMDGPU] Add debugger related target options
Konstantin Zhuravlyov [Tue, 12 Apr 2016 21:42:15 +0000 (21:42 +0000)]
[AMDGPU] Add debugger related target options

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

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

8 years agoAdd a fixme for an old patch I had lying around that I'm not going to finish any...
David Blaikie [Tue, 12 Apr 2016 21:22:48 +0000 (21:22 +0000)]
Add a fixme for an old patch I had lying around that I'm not going to finish any time so n

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

8 years agoAlways use --eh-frame-hdr on FreeBSD, even for -static
Ed Maste [Tue, 12 Apr 2016 21:11:46 +0000 (21:11 +0000)]
Always use --eh-frame-hdr on FreeBSD, even for -static

FreeBSD uses LLVM's libunwind on FreeBSD/arm64 today (and is expected to
use it more widely in the future), and it requires the EH frame segment
in static binaries.

This is the same as r203742 for NetBSD.

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

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

8 years agoAdd a couple of missing vsx load and store intrinsics.
Eric Christopher [Tue, 12 Apr 2016 21:08:54 +0000 (21:08 +0000)]
Add a couple of missing vsx load and store intrinsics.

Patch by Jing Yu!

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

8 years agoPass -backend-option to LLVM when there is no target machine.
Yaxun Liu [Tue, 12 Apr 2016 20:22:32 +0000 (20:22 +0000)]
Pass -backend-option to LLVM when there is no target machine.

Clang should pass -backend-option to LLVM even though there is no target machine, since LLVM passes are used when emitting LLVM IR.

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

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

8 years ago[modules] Extend r266113 to cope with submodules.
Richard Smith [Tue, 12 Apr 2016 20:20:33 +0000 (20:20 +0000)]
[modules] Extend r266113 to cope with submodules.

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

8 years ago[modules] When an incompatible module file is explicitly provided for a module,
Richard Smith [Tue, 12 Apr 2016 19:58:30 +0000 (19:58 +0000)]
[modules] When an incompatible module file is explicitly provided for a module,
and we fall back to textual inclusion, don't require the module as a whole to
be marked available; it's OK if some other file in the same module is missing,
just as it would be if the header were explicitly marked textual.

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

8 years agoPR19957: [OpenCL] Incorrectly accepts implicit address space conversion with ternary...
Yaxun Liu [Tue, 12 Apr 2016 19:43:36 +0000 (19:43 +0000)]
PR19957: [OpenCL] Incorrectly accepts implicit address space conversion with ternary operator.

Generates addrspacecast instead of bitcast for ternary operator when necessary, and diagnose ternary operator with incompatible second and third operands.

https://llvm.org/bugs/show_bug.cgi?id=19957

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

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

8 years ago[analyzer] Nullability: Suppress return diagnostics in inlined functions.
Devin Coughlin [Tue, 12 Apr 2016 19:29:52 +0000 (19:29 +0000)]
[analyzer] Nullability: Suppress return diagnostics in inlined functions.

The nullability checker can sometimes miss detecting nullability precondition
violations in inlined functions because the binding for the parameter
that violated the precondition becomes dead before the return:

int * _Nonnull callee(int * _Nonnull p2) {
  if (!p2)
    // p2 becomes dead here, so binding removed.
    return 0; // warning here because value stored in p2 is symbolic.
  else
   return p2;
}

int *caller(int * _Nonnull p1) {
  return callee(p1);
}

The fix, which is quite blunt, is to not warn about null returns in inlined
methods/functions. This won’t lose much coverage for ObjC because the analyzer
always analyzes each ObjC method at the top level in addition to inlined. It
*will* lose coverage for C â€” but there aren’t that many codebases with C
nullability annotations.

rdar://problem/25615050

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

8 years agoclang-cl: Remove -isystem, add -imsvc.
Nico Weber [Tue, 12 Apr 2016 19:04:37 +0000 (19:04 +0000)]
clang-cl: Remove -isystem, add -imsvc.

r260990 exposed -isystem in clang-cl. -isystem adds a directory to the front of
the system include search path. The idea was to use this to point to a hermetic
msvc install, but as it turns out this doesn't work: -isystem then adds the
hermetic headers in front of clang's builtin headers, and clang's headers that
are supposed to wrap msvc headers (say, stdarg.h) aren't picked up at all
anymore.

So revert that, and instead expose -imsvc which works as if the passed
directory was part of %INCLUDE%: The header is treated as a system header, but
it is searched after clang's lib/Header headers.

Fixes half of PRPR26751.

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

8 years ago[OpenCL] Handle AddressSpaceConversion when target address space does not change.
Yaxun Liu [Tue, 12 Apr 2016 19:03:49 +0000 (19:03 +0000)]
[OpenCL] Handle AddressSpaceConversion when target address space does not change.

In codegen different address spaces may be mapped to the same address
space for a target, e.g. in x86/x86-64 all address spaces are mapped
to 0. Therefore AddressSpaceConversion should be translated by
CreatePointerBitCastOrAddrSpaceCast instead of CreateAddrSpaceCast.

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

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

8 years agoStricter checks in the stack-protector codegen test.
Evgeniy Stepanov [Tue, 12 Apr 2016 17:51:59 +0000 (17:51 +0000)]
Stricter checks in the stack-protector codegen test.

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

8 years agoRevert 266090, needs more testing first.
Nico Weber [Tue, 12 Apr 2016 16:52:30 +0000 (16:52 +0000)]
Revert 266090, needs more testing first.

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

8 years agoclang-cl: Expose -nostdlibinc.
Nico Weber [Tue, 12 Apr 2016 16:38:07 +0000 (16:38 +0000)]
clang-cl: Expose -nostdlibinc.

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

8 years ago[FileManager] Don't crash if reading from stdin and stat(".") fails
David Majnemer [Tue, 12 Apr 2016 16:33:53 +0000 (16:33 +0000)]
[FileManager] Don't crash if reading from stdin and stat(".") fails

addAncestorsAsVirtualDirs("<stdin>") quickly returns without doing work
because "<stdin>" has no parent_path.  This violates the expectation
that a subsequent call to getDirectoryFromFile("<stdin>") would succeed.
Instead, it fails because it uses the "." if the file has no path
component.

Fix this by keeping the behavior between addAncestorsAsVirtualDirs and
getDirectoryFromFile symmetric.

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

8 years agoVerify commit right by adding a blank line to test/CodeGenOpenCL/address-spaces-conve...
Yaxun Liu [Tue, 12 Apr 2016 15:46:24 +0000 (15:46 +0000)]
Verify commit right by adding a blank line to test/CodeGenOpenCL/address-spaces-conversions.cl.

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

8 years agoMoving clang-test-depends into the Clang tests folder and moving vtables_blacklist...
Aaron Ballman [Tue, 12 Apr 2016 15:09:17 +0000 (15:09 +0000)]
Moving clang-test-depends into the Clang tests folder and moving vtables_blacklist into the Misc folder; NFC, this simply cleans up the generated solution so that these targets don't live in the root folder of the IDE.

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

8 years agoRemove unused diagnostics. NFC.
Benjamin Kramer [Tue, 12 Apr 2016 11:49:52 +0000 (11:49 +0000)]
Remove unused diagnostics. NFC.

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

8 years ago[OPENMP 4.0] Support for 'linear' clause in 'declare simd' directive.
Alexey Bataev [Tue, 12 Apr 2016 11:02:11 +0000 (11:02 +0000)]
[OPENMP 4.0] Support for 'linear' clause in 'declare simd' directive.

The linear clause declares one or more list items to be private to a SIMD lane and to have a linear relationship with respect to the iteration space of a loop.
'linear' '(' <linear-list> [ ':' <linear-step> ] ')'
When a linear-step expression is specified in a linear clause it must be
either a constant integer expression or an integer-typed parameter that is specified in a uniform clause on the directive.
The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses.

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

8 years ago[OPENMP 4.0] Support for 'aligned' clause in 'declare simd' directive.
Alexey Bataev [Tue, 12 Apr 2016 09:35:56 +0000 (09:35 +0000)]
[OPENMP 4.0] Support for 'aligned' clause in 'declare simd' directive.

The aligned clause declares that the object to which each list item points is aligned to the number of bytes expressed in the optional parameter of the aligned clause.
'aligned' '(' <argument-list> [ ':' <alignment> ] ')'
The optional parameter of the aligned clause, alignment, must be a constant positive integer expression. If no optional parameter is specified, implementation-defined default alignments for SIMD instructions on the target platforms are assumed.
The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses.

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

8 years ago[Clang][BuiltIn][avx512] Adding avx512 (shuf,sqrt{ss|sd},rsqrt ) builtin to clang
Michael Zuckerman [Tue, 12 Apr 2016 07:59:39 +0000 (07:59 +0000)]
[Clang][BuiltIn][avx512] Adding avx512 (shuf,sqrt{ss|sd},rsqrt ) builtin to clang

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

8 years ago[ASTMatchers]: fix crash in hasReturnValue
Matthias Gehre [Tue, 12 Apr 2016 05:43:18 +0000 (05:43 +0000)]
[ASTMatchers]: fix crash in hasReturnValue

Summary:
The crash was reproduced by the included test case. It was initially
found through a crash of clang-tidy's misc-misplaced-widening-cast
check.

Reviewers: klimek, alexfh

Subscribers: cfe-commits, klimek

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

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

8 years ago[OPENMP 4.0] Support for 'uniform' clause in 'declare simd' directive.
Alexey Bataev [Tue, 12 Apr 2016 05:28:34 +0000 (05:28 +0000)]
[OPENMP 4.0] Support for 'uniform' clause in 'declare simd' directive.

OpenMP 4.0 defines clause 'uniform' in 'declare simd' directive:
'uniform' '(' <argument-list> ')'
The uniform clause declares one or more arguments to have an invariant value for all concurrent invocations of the function in the execution of a single SIMD loop.
The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses.

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

8 years agoBasic: fix profiling with GNU EABI
Saleem Abdulrasool [Tue, 12 Apr 2016 03:05:03 +0000 (03:05 +0000)]
Basic: fix profiling with GNU EABI

The GNU profiling support indicates that the interface is `_mcount` rather than
`mcount`.  Conditionalise the behaviour according to the `-meabi gnu` flag.

Resolves PR27311

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

8 years ago[analyzer] Fix assertion in ReturnVisitor for body-farm synthesized getters
Devin Coughlin [Tue, 12 Apr 2016 00:53:26 +0000 (00:53 +0000)]
[analyzer] Fix assertion in ReturnVisitor for body-farm synthesized getters
Don't emit a path note marking the return site if the return statement does not
have a valid location. This fixes an assertion failure I introduced in r265839.

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

8 years agoAllow simultaneous safestack and stackprotector attributes.
Evgeniy Stepanov [Mon, 11 Apr 2016 22:27:55 +0000 (22:27 +0000)]
Allow simultaneous safestack and stackprotector attributes.

This is the clang part of http://reviews.llvm.org/D18846.
SafeStack instrumentation pass adds stack protector canaries if both
attributes are present on a function. StackProtector pass will step
back if the function has a safestack attribute.

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

8 years agolibclang: fix two memory leaks (PR26292)
Hans Wennborg [Mon, 11 Apr 2016 20:53:59 +0000 (20:53 +0000)]
libclang: fix two memory leaks (PR26292)

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

8 years agoAdjust tests to have consistent integer sizes.
Richard Trieu [Mon, 11 Apr 2016 20:37:04 +0000 (20:37 +0000)]
Adjust tests to have consistent integer sizes.

Add a triple to the run lines so that integers will the same sizes across runs.
Also add a compile time check to ensure the assumptions about sizes are met.

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

8 years agoLit C++11 Compatibility Patch #6
Charles Li [Mon, 11 Apr 2016 19:30:25 +0000 (19:30 +0000)]
Lit C++11 Compatibility Patch #6

Updated the expected diagnostics of 17 OpenMP tests.
The changes to each test are identical.

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

8 years agoEmit the module hash by default with -flto=thin.
Mehdi Amini [Mon, 11 Apr 2016 18:45:20 +0000 (18:45 +0000)]
Emit the module hash by default with -flto=thin.

Reviewers: tejohnson

Subscribers: joker.eph, cfe-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years ago[Clang][AVX512][BuiltIn] Adding avx512 ( psll{d|q}512,psllv{16si|8di},psra{d|q}512...
Michael Zuckerman [Mon, 11 Apr 2016 17:04:21 +0000 (17:04 +0000)]
[Clang][AVX512][BuiltIn] Adding avx512 ( psll{d|q}512,psllv{16si|8di},psra{d|q}512,psrav{16si|8di},pternlog{d|q}{128|256|512} ) builtin to clang

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

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

8 years agoUpdate getting started docs
Reid Kleckner [Mon, 11 Apr 2016 17:02:34 +0000 (17:02 +0000)]
Update getting started docs

compiler-rt is optional. We often get email from users with compiler-rt
build errors who don't actually need compiler-rt. Marking it optional
should help them avoid those potential problems.

While I'm here, update a reference to the build directory and remove an
obsolete reference to llvm-gcc. Nobody today is under the impression
that Clang depends on GCC.

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding PSRA{Q|D|QI|DI}{128|256|512} builtin
Michael Zuckerman [Mon, 11 Apr 2016 15:46:39 +0000 (15:46 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding PSRA{Q|D|QI|DI}{128|256|512} builtin

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

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

8 years ago[Clang][AVX512][BuiltIn] Adding avx512 ( punpck{h|l}{dq|qdq}{128|256|512},rndscale...
Michael Zuckerman [Mon, 11 Apr 2016 12:32:31 +0000 (12:32 +0000)]
[Clang][AVX512][BuiltIn] Adding avx512 ( punpck{h|l}{dq|qdq}{128|256|512},rndscale{ss|sd}, {scalef{ss|sd|pd512|ps512} ) builtin to clang

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

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

8 years ago[clang-format] Walk backwards from end() instead of forwards from rend().
Benjamin Kramer [Mon, 11 Apr 2016 12:19:19 +0000 (12:19 +0000)]
[clang-format] Walk backwards from end() instead of forwards from rend().

This should've been forwards from rbegin(), reverse iterators are just
too confusing to be used by mere mortals. Fixes out-of-bounds walks over
the list.

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

8 years ago[Clang][AVX512][BuiltIn] Adding avx512 ( ptest{n}m{b|w}{128|256|512} ) builtin to...
Michael Zuckerman [Mon, 11 Apr 2016 10:22:07 +0000 (10:22 +0000)]
[Clang][AVX512][BuiltIn] Adding avx512 ( ptest{n}m{b|w}{128|256|512} ) builtin to clang

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

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

8 years agoDon't clutter the test directory with temporary IR files.
Benjamin Kramer [Mon, 11 Apr 2016 10:16:37 +0000 (10:16 +0000)]
Don't clutter the test directory with temporary IR files.

-emit-llvm emits a file, -emit-llvm-only doesn't.

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

8 years agoclang-format: [JS] Test for parameter annotations.
Martin Probst [Mon, 11 Apr 2016 09:17:57 +0000 (09:17 +0000)]
clang-format: [JS] Test for parameter annotations.

Summary: Just to ensure no regressions, this already works fine.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

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

8 years agoRemove redundant conditions of the form (A || (!A && B)) -> (A || B)
Benjamin Kramer [Mon, 11 Apr 2016 08:26:13 +0000 (08:26 +0000)]
Remove redundant conditions of the form (A || (!A && B)) -> (A || B)

Found by cppcheck! PR27286 PR27287 PR27288 PR27289

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

8 years ago[GCC] Attribute ifunc support in clang
Dmitry Polukhin [Mon, 11 Apr 2016 07:48:59 +0000 (07:48 +0000)]
[GCC] Attribute ifunc support in clang

This patch add support for GCC attribute((ifunc("resolver"))) for
targets that use ELF as object file format. In general ifunc is a
special kind of function alias with type @gnu_indirect_function. LLVM
patch http://reviews.llvm.org/D15525

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

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

8 years agoclang-format: [JS] do not insert semicolons after wrapped annotations.
Martin Probst [Mon, 11 Apr 2016 07:35:57 +0000 (07:35 +0000)]
clang-format: [JS] do not insert semicolons after wrapped annotations.

Reviewers: djasper

Subscribers: klimek

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

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

8 years ago[Clang][AVX512][BuiltIn] Adding avx512 ( vperm{i|t}2var, vpermil{var}{ps|pd}{256...
Michael Zuckerman [Mon, 11 Apr 2016 07:15:34 +0000 (07:15 +0000)]
[Clang][AVX512][BuiltIn] Adding avx512 ( vperm{i|t}2var, vpermil{var}{ps|pd}{256|512} ) builtin to clang.

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

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

8 years ago[Clang][AVX512][BuiltIn] Adding avx512 ( vcvt ) builtin to clang
Michael Zuckerman [Sun, 10 Apr 2016 17:24:03 +0000 (17:24 +0000)]
[Clang][AVX512][BuiltIn] Adding avx512 ( vcvt ) builtin to clang

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

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

8 years agoCorrect pg instrumentation for AArch64
Saleem Abdulrasool [Sun, 10 Apr 2016 14:29:55 +0000 (14:29 +0000)]
Correct pg instrumentation for AArch64

It seems that there was a miscommunication between Renato and I, and the
original behaviour of AArch64 was to be preserved and not to mirror the new
behaviour.  Restore the original behaviour for AArch64.  Addresses post-commit
review comments from Renato Golin.

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

8 years agoAdding avx512 (unpck{h|l}{pd|ps}, rcp14{pd|ps}{128|256},vplzcnt{d|q} ) builtin to...
Michael Zuckerman [Sun, 10 Apr 2016 12:54:23 +0000 (12:54 +0000)]
Adding avx512 (unpck{h|l}{pd|ps}, rcp14{pd|ps}{128|256},vplzcnt{d|q} ) builtin to clang

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

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

8 years ago[Clang][AVX512][BuiltIn] Adding avx512 ( store ) builtin to clang
Michael Zuckerman [Sun, 10 Apr 2016 10:51:04 +0000 (10:51 +0000)]
[Clang][AVX512][BuiltIn] Adding avx512 ( store ) builtin to clang

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

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

8 years agotest: add additional tests for SVN r265888
Saleem Abdulrasool [Sun, 10 Apr 2016 03:31:09 +0000 (03:31 +0000)]
test: add additional tests for SVN r265888

Add test cases for AArch64 as well as that was changed as part of that change.

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

8 years agoAdd support for __gnu_mcount_nc as the pg interface
Saleem Abdulrasool [Sun, 10 Apr 2016 03:19:47 +0000 (03:19 +0000)]
Add support for __gnu_mcount_nc as the pg interface

This adds support to optionally support using `__gnu_mcount_nc` as the mcount
interface rather than `mcount` for Linux and EABI.  The other targets do not
provide an implementation for `__gnu_mcount_nc`.  This can be activated via the
`-meabi gnu` flag.

Resolves PR23969.

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

8 years agoBasic: thread TargetOptions into TargetInfo
Saleem Abdulrasool [Sat, 9 Apr 2016 19:09:25 +0000 (19:09 +0000)]
Basic: thread TargetOptions into TargetInfo

This threads TargetOptions into the TargetInfo hierarchy.  This is a rework of
the original attempt to thread additional information into the TargetInfo to
make decisions based on additional ABI related options.

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

8 years agoObjC kindof: check the context when inserting methods to global pool.
Manman Ren [Sat, 9 Apr 2016 18:59:48 +0000 (18:59 +0000)]
ObjC kindof: check the context when inserting methods to global pool.

To make kindof lookup work, we need to insert methods with different
context into the global pool, even though they have the same siganture.

Since diagnosis of availability is performed on the best candidate,
which is often the first candidate from the global pool, we prioritize
the methods that are unavaible or deprecated to the head of the list.

Since we now have more methods in the global pool, we need to watch
out for performance impact.

rdar://25635831

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

8 years ago[Concepts] Implement subsection [dcl.spec.concept]p7 of the Concepts TS
Nathan Wilson [Sat, 9 Apr 2016 02:55:27 +0000 (02:55 +0000)]
[Concepts] Implement subsection [dcl.spec.concept]p7 of the Concepts TS

Summary: A program shall not declare an explicit instantiation (14.8.2), an explicit specialization (14.8.3), or a partial specialization of a concept definition.

Reviewers: rsmith, hubert.reinterpretcast, faisalv, aaron.ballman

Subscribers: cfe-commits

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

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

8 years ago[Perf-Training] Reworked workflow improvements for order-file generation
Chris Bieneman [Fri, 8 Apr 2016 22:48:18 +0000 (22:48 +0000)]
[Perf-Training] Reworked workflow improvements for order-file generation

This is re-landing r260742. I've reworked the conditionals so that it only hits when targeting Apple platforms with ld64.

Original Summary:
With this change generating clang order files using dtrace uses the following workflow:

cmake <whatever options you want>

ninja generate-order-file

ninja clang

This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one.

CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file.

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