]> granicus.if.org Git - clang/log
clang
8 years agoUpdate FIXME.
Richard Smith [Thu, 5 May 2016 02:14:06 +0000 (02:14 +0000)]
Update FIXME.

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

8 years agoFix implementation of C++'s restrictions on using-declarations referring to enumerators:
Richard Smith [Thu, 5 May 2016 02:13:49 +0000 (02:13 +0000)]
Fix implementation of C++'s restrictions on using-declarations referring to enumerators:

 * an unscoped enumerator whose enumeration is a class member is itself a class
   member, so can only be the subject of a class-scope using-declaration.

 * a scoped enumerator cannot be the subject of a class-scope using-declaration.

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

8 years agoDo not add uwtable attribute by default for MachO targets.
Akira Hatanaka [Thu, 5 May 2016 01:41:07 +0000 (01:41 +0000)]
Do not add uwtable attribute by default for MachO targets.

r217178 changed clang to add function attribute uwtable by default on
Win64, which caused the __eh_frame section to be emitted by default.
This commit restores the previous behavior for MachO targets.

rdar://problem/25282627

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

8 years ago[modules] Enforce the rules that an explicit or partial specialization must be
Richard Smith [Thu, 5 May 2016 00:56:12 +0000 (00:56 +0000)]
[modules] Enforce the rules that an explicit or partial specialization must be
declared before it is used. Because we don't use normal name lookup to find
these, the normal code to filter out non-visible names from name lookup results
does not apply.

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

8 years ago[SystemZ] Add -mbackchain option.
Marcin Koscielnicki [Wed, 4 May 2016 23:37:40 +0000 (23:37 +0000)]
[SystemZ] Add -mbackchain option.

This option, like the corresponding gcc option, is SystemZ-specific and
enables storing frame backchain links, as specified in the ABI.

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

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

8 years agoAdd the Pure attribute to C99 builtin functions from ctype.h. This is a corrected...
Aaron Ballman [Wed, 4 May 2016 21:08:13 +0000 (21:08 +0000)]
Add the Pure attribute to C99 builtin functions from ctype.h. This is a corrected version of r266199 with test case fixes.

Patch by Taewook Oh.

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

8 years agoFix the doc extraction script to work with hasAnyName and with equalsNode.
Samuel Benzaquen [Wed, 4 May 2016 20:45:00 +0000 (20:45 +0000)]
Fix the doc extraction script to work with hasAnyName and with equalsNode.

The change from llvm::VariadicFunction to internal::VariadicFunction
broke the extraction of hasAnyName().
equalsNode was broken because the argument type is 'const XXXX*' and
the internal space caused a failure on the regex.

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

8 years agofix docs
Kostya Serebryany [Wed, 4 May 2016 20:24:54 +0000 (20:24 +0000)]
fix docs

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

8 years agodocument -f[no-]sanitize-recover=all and mention it in warning messages
Kostya Serebryany [Wed, 4 May 2016 20:21:47 +0000 (20:21 +0000)]
document -f[no-]sanitize-recover=all and mention it in warning messages

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

8 years ago[CodeGenObjCXX] Fix handling of blocks in lambda.
Akira Hatanaka [Wed, 4 May 2016 18:40:33 +0000 (18:40 +0000)]
[CodeGenObjCXX] Fix handling of blocks in lambda.

This fixes a crash that occurs when a block captures a reference that is
captured by its enclosing lambda.

rdar://problem/18586651

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

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

8 years ago[ObjC] Enter a new evaluation context before calling
Akira Hatanaka [Wed, 4 May 2016 18:07:20 +0000 (18:07 +0000)]
[ObjC] Enter a new evaluation context before calling
BuildBlockForLambdaConversion.

Previously, clang would build an incorrect AST for the following code:

id test() {
  return @{@"a": [](){}, @"b": [](){}};
}

ReturnStmt 0x10d080448
`-ExprWithCleanups 0x10d080428
  |-cleanup Block 0x10d0801f0 // points to the second BlockDecl
    ...
    -BlockDecl 0x10d07f150 // First block
    ...
    -BlockDecl 0x10d0801f0 // Second block
    ...
     `-ExprWithCleanups 0x10d0801d0
       |-cleanup Block 0x10d07f150 // points to the first BlockDecl

To fix the bug, this commit enters a new evaluation context to reset
ExprNeedsCleanups before each block is parsed.

rdar://problem/16879958

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

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

8 years agoUpdate test CHECK lines after r268509. NFC.
Pete Cooper [Wed, 4 May 2016 17:37:27 +0000 (17:37 +0000)]
Update test CHECK lines after r268509.  NFC.

r268509 causes this test case to be fully unrolled, so checking for an icmp is
no longer valid.  Given that this test is for ARC anyway, checking for the icmp seems
unecessary.

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

8 years ago[Coverage] Fix an issue where a coverage region might not be created for a macro...
Igor Kudrin [Wed, 4 May 2016 15:38:26 +0000 (15:38 +0000)]
[Coverage] Fix an issue where a coverage region might not be created for a macro containing a loop statement.

The issue happened when a macro contained a full for or
while statement, which body ended at the end of the macro.

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

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

8 years agoDo not disable completely loop unroll when optimizing for size.
Marianne Mailhot-Sarrasin [Wed, 4 May 2016 15:26:28 +0000 (15:26 +0000)]
Do not disable completely loop unroll when optimizing for size.

Let the loop unroll pass handle /Os. It already checks that option and adjust its thresholds accordingly. Also, will allow the #pragma unroll to have an effect in /Os.

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

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

8 years ago[ASTMatchers] New matcher forFunction
Gabor Horvath [Wed, 4 May 2016 11:59:39 +0000 (11:59 +0000)]
[ASTMatchers] New matcher forFunction

Summary: Matcher proposed in the review of checker misc-assign-operator (name pending). Its goal is to find the direct enclosing function declaration of a statement and run the inner matcher on it. Two version is attached in this patch (thus it will not compile), to be decided which approach to take. The second one always chooses one single parent while the first one does a depth-first search upwards (thus a height-first search) and returns the first positive match of the inner matcher (thus it always returns zero or one matches, not more). Further questions: is it enough to implement it in-place, or ASTMatchersInternals or maybe ASTMatchFinder should be involved?

Reviewers: sbenza

Subscribers: aaron.ballman, klimek, o.gyorgy, xazax.hun, cfe-commits

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

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

8 years ago[X86] Add -m[no-]x87 and -m[no-]80387 options to control FeatureX87.
Andrey Turetskiy [Wed, 4 May 2016 11:28:22 +0000 (11:28 +0000)]
[X86] Add -m[no-]x87 and -m[no-]80387 options to control FeatureX87.

Add -m[no-]x87 and -m[no-]80387 options to control FeatureX87.
-m[no-]80387 options is added for compatibility with GCC.

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

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

8 years agoAdd missing -mno-cx16 driver option.
Andrey Turetskiy [Wed, 4 May 2016 11:19:41 +0000 (11:19 +0000)]
Add missing -mno-cx16 driver option.

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

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

8 years agoAdd a test for driver options from m_x86_Features_Group.
Andrey Turetskiy [Wed, 4 May 2016 11:10:29 +0000 (11:10 +0000)]
Add a test for driver options from m_x86_Features_Group.

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

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

8 years ago[Sparc] Implement __builtin_setjmp, __builtin_longjmp back-end.
Chris Dewhurst [Wed, 4 May 2016 09:33:30 +0000 (09:33 +0000)]
[Sparc] Implement __builtin_setjmp, __builtin_longjmp back-end.

This code implements builtin_setjmp and builtin_longjmp exception handling intrinsics for 32-bit Sparc back-ends.

The code started as a mash-up of the PowerPC and X86 versions, although there are sufficient differences to both that had to be made for Sparc handling.

Note: I have manual tests running. I'll work on a unit test and add that to the rest of this diff in the next day.

Also, this implementation is only for 32-bit Sparc. I haven't focussed on a 64-bit version, although I have left the code in a prepared state for implementing this, including detecting pointer size and comments indicating where I suspect there may be differences.

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

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

8 years ago[Clang][Builtin][AVX512] Adding intrinsics fot cvt{u}si2s{d|s} cvt{sd|ss}2{ss|sd...
Michael Zuckerman [Wed, 4 May 2016 08:55:11 +0000 (08:55 +0000)]
[Clang][Builtin][AVX512] Adding intrinsics fot cvt{u}si2s{d|s} cvt{sd|ss}2{ss|sd} instruction set

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

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

8 years ago[X86] Add -malign-double support
Reid Kleckner [Wed, 4 May 2016 02:58:24 +0000 (02:58 +0000)]
[X86] Add -malign-double support

The -malign-double flag causes i64 and f64 types to have alignment 8
instead of 4. On x86-64, the behavior of -malign-double is enabled by default.

Rebases and cleans phosek's work here: http://reviews.llvm.org/D12860

Patch by Sean Klein

Reviewers: rnk

Subscribers: rnk, jfb, dschuff, phosek

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

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

8 years agoFix CodeCompletion & TypoCorrection when combining a PCH with Modules
Ben Langmuir [Wed, 4 May 2016 00:53:13 +0000 (00:53 +0000)]
Fix CodeCompletion & TypoCorrection when combining a PCH with Modules

This commit fixes the IdentifierIterator to actually include identifiers
from a PCH or precompiled preamble when there is also a global module
index. This was causing code-completion (outside of C++) and
typo-correction to be missing global identifiers defined in the
PCH/preamble. Typo-correction has been broken since we first started
using the module index, whereas code-completion only started relying on
identifier iterator in r232793.

rdar://problem/25642879

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

8 years ago[modules][debuginfo] Only include imported modules when targeting LLDB
David Blaikie [Tue, 3 May 2016 23:06:40 +0000 (23:06 +0000)]
[modules][debuginfo] Only include imported modules when targeting LLDB

These constructs are only applicable to a debugger capable of loading a
Clang AST, so omit them for brevity when not doing so.

We could potentially propagate more of CodeGenOptions through the
ObjectFilePCGContainerOperations for consistency (so the next person who
adds some CodeGenOpts feature that tweaks debug info output doesn't get
caught by this), so I'm open to objections/alternatives there, but went
with this for now.

Tested just a couple of basic cases (one direct, one indirect (through
the ObjectFilePCHContainerOperations) & fixed up other cases to pass the
-debugger-tuning flag as appropriate.

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

8 years ago[scan-build] fix dead store warnings emitted on clang code base
David Blaikie [Tue, 3 May 2016 22:14:14 +0000 (22:14 +0000)]
[scan-build] fix dead store warnings emitted on clang code base

This fixes dead store warnings of the type "dead assignment" reported
by CLang Static Analyzer on the following file:

- tools/c-index-test/c-index-test.c.

Patch by Apelete Seketeli <apelete@seketeli.net>!

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

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

8 years agoAdd address space 258 (X86 SS segment) to clang documentation.
David L Kreitzer [Tue, 3 May 2016 20:20:59 +0000 (20:20 +0000)]
Add address space 258 (X86 SS segment) to clang documentation.
The change reflects llvm r268431.

Patch by Michael Lemay (michael.lemay@intel.com)

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

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

8 years agoAArch64: fixup comment after change
Tim Northover [Tue, 3 May 2016 19:24:47 +0000 (19:24 +0000)]
AArch64: fixup comment after change

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

8 years agoAArch64: simplify illegal vector check. NFC.
Tim Northover [Tue, 3 May 2016 19:22:41 +0000 (19:22 +0000)]
AArch64: simplify illegal vector check. NFC.

Use a utility function to check whether the number of elements is a power of 2
and drop the redundant upper limit (a 128-bit vector with more than 16 elements
would have each element < 8 bits, not possible).

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

8 years agoFix use of LLVM IR names in lit test
Reid Kleckner [Tue, 3 May 2016 18:48:50 +0000 (18:48 +0000)]
Fix use of LLVM IR names in lit test

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

8 years ago[MS] Pass CalleeDecl to adjustThisArgumentForVirtualFunctionCall
Reid Kleckner [Tue, 3 May 2016 18:44:29 +0000 (18:44 +0000)]
[MS] Pass CalleeDecl to adjustThisArgumentForVirtualFunctionCall

If we are devirtualizing, then we want to compute the 'this' adjustment
of the devirtualized target, not the adjustment of the base's method
definition, which is usually zero.

Fixes PR27621

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

8 years agoChange test to use regex instead of explicit value numbers. NFC.
Pete Cooper [Tue, 3 May 2016 18:32:01 +0000 (18:32 +0000)]
Change test to use regex instead of explicit value numbers.  NFC.

We were seeing an internal failure when running this test.  I can't
see a good reason for the difference, but the simple fix is to use
%{{.*}} instead of %1.

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

8 years ago[clang][AVX512][BuiltIn] Adding intrinsics for cast{pd|ps|si}128_{pd|ps|si}512 and...
Michael Zuckerman [Tue, 3 May 2016 14:26:52 +0000 (14:26 +0000)]
[clang][AVX512][BuiltIn] Adding intrinsics for cast{pd|ps|si}128_{pd|ps|si}512 and castsi256_si512 instruction set

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

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

8 years ago[Clang][avx512][Builtin] Adding intrinsics for cvtw2mask{128|256|512} instruction set
Michael Zuckerman [Tue, 3 May 2016 14:12:23 +0000 (14:12 +0000)]
[Clang][avx512][Builtin] Adding intrinsics for cvtw2mask{128|256|512} instruction set

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

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

8 years ago[Clang][AVX512][Builtin] Adding intrinsics for vcvt{ph|ps}2{ps|ph} instruction set
Michael Zuckerman [Tue, 3 May 2016 12:45:04 +0000 (12:45 +0000)]
[Clang][AVX512][Builtin] Adding intrinsics for vcvt{ph|ps}2{ps|ph} instruction set

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

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

8 years ago[Clang][AVX512][Builtin] Adding intrinsics for vcvttpd2udq instruction set
Michael Zuckerman [Tue, 3 May 2016 11:05:24 +0000 (11:05 +0000)]
[Clang][AVX512][Builtin] Adding intrinsics for vcvttpd2udq instruction set

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

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

8 years ago[Clang][AVX512][BUILTIN] Adding intrinsics for compressstore{df|di|sf|si} instruction...
Michael Zuckerman [Tue, 3 May 2016 10:42:46 +0000 (10:42 +0000)]
[Clang][AVX512][BUILTIN] Adding intrinsics for compressstore{df|di|sf|si} instruction set.

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

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

8 years ago[libclang] Expose the ElaboratedType
Sergey Kalinichev [Tue, 3 May 2016 06:58:29 +0000 (06:58 +0000)]
[libclang] Expose the ElaboratedType

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

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

8 years ago[OpenCL] Fix pipe type dump.
Xiuli Pan [Tue, 3 May 2016 05:37:07 +0000 (05:37 +0000)]
[OpenCL] Fix pipe type dump.

Summary:
Fix the dump of PipeType.
Now we will have "pipe int" and element type.

Reviewers: yaxunl, Anastasia

Subscribers: cfe-commits, bader

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

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

8 years agoAdding a test for a compiler crash that was fixed in r248069.
Douglas Yung [Tue, 3 May 2016 00:29:56 +0000 (00:29 +0000)]
Adding a test for a compiler crash that was fixed in r248069.

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

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

8 years ago[CMake] Enable LIBCXX HEADERS in Apple-Stage2.cmake
Chris Bieneman [Mon, 2 May 2016 22:43:23 +0000 (22:43 +0000)]
[CMake] Enable LIBCXX HEADERS in Apple-Stage2.cmake

This enables installing the libcxx headers.

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

8 years agoFix argument expansion of reference fields of structs
Reid Kleckner [Mon, 2 May 2016 22:42:34 +0000 (22:42 +0000)]
Fix argument expansion of reference fields of structs

r268261 made Clang "expand" more struct arguments on Windows. It removed
the check for 'RD->isCLike()', which was preventing us from attempting
to expand structs with reference type fields.

Our expansion code was attempting to load and pass each field of the
type in turn. We were accidentally doing one to many loads on reference
type fields.

On the function prologue side, we can use
EmitLValueForFieldInitialization, which obviously gets the address of
the field. On the call side, I tweaked EmitRValueForField directly,
since this is the only use of this method.

Fixes PR27607

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

8 years ago[CMake] Install libcxx-headers as part of the Apple-stage2 distribution
Chris Bieneman [Mon, 2 May 2016 22:42:09 +0000 (22:42 +0000)]
[CMake] Install libcxx-headers as part of the Apple-stage2 distribution

This installs the clang headers as part of the install-distribution target.

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

8 years ago[CMake] Adding clang-headers to the Apple-stage2 distribution
Chris Bieneman [Mon, 2 May 2016 22:38:06 +0000 (22:38 +0000)]
[CMake] Adding clang-headers to the Apple-stage2 distribution

This installs the clang headers as part of the install-distribution target.

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

8 years agoRemove unneeded test in tryCaptureAsConstant.
Akira Hatanaka [Mon, 2 May 2016 22:29:40 +0000 (22:29 +0000)]
Remove unneeded test in tryCaptureAsConstant.

It isn't necessary to call hasDefaultArg because we can't rematerialize
a captured variable that is a function parameter, regardless of whether
or not it has a default argument. NFC.

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

8 years ago[CodeGenObjCXX] Don't rematerialize default arguments of function
Akira Hatanaka [Mon, 2 May 2016 21:52:57 +0000 (21:52 +0000)]
[CodeGenObjCXX] Don't rematerialize default arguments of function
parameters in the body of a block.

This fixes a bug where clang would materialize the default argument
inside the body of a block instead of passing the value via the block
descriptor.

For example, in the code below, foo1 would always print 42 regardless
of the value of argument "a" passed to foo1.

void foo1(const int a = 42 ) {
  auto block = ^{
    printf("%d\n", a);
  };
  block();
}

rdar://problem/24449235

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

8 years ago[CUDA] Make sure device-side __global__ functions are always visible.
Artem Belevich [Mon, 2 May 2016 20:30:03 +0000 (20:30 +0000)]
[CUDA] Make sure device-side __global__ functions are always visible.

__global__ functions are a special case in CUDA.

Even when the symbol would normally not be externally
visible according to C++ rules, they still must be visible
in CUDA GPU object so host-side stub can launch them.

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

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

8 years agoRevert "[Driver] Quote clang full version in dwarf producer when invoking cc1as"
Bruno Cardoso Lopes [Mon, 2 May 2016 20:20:49 +0000 (20:20 +0000)]
Revert "[Driver] Quote clang full version in dwarf producer when invoking cc1as"

This reverts commit r264813 / 6484b95d634f53dd929c75265ef3c4decf397584.

While using it in the shell is fine, this a problem when cc1as is
invoked directly by the driver because single quoting the clang full
version makes cc1as write out the version with the quotes in the final
binary.

If the user wants to copy-n-pastable output, it could use either -###
or CC_PRINT_OPTIONS=1 clang -v ...

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

8 years agoExpand aggregate arguments more often on 32-bit Windows
Reid Kleckner [Mon, 2 May 2016 17:41:07 +0000 (17:41 +0000)]
Expand aggregate arguments more often on 32-bit Windows

Before this change, we would pass all non-HFA record arguments on
Windows with byval. Byval often blocks optimizations and results in bad
code generation. Windows now uses the existing workaround that other
x86_32 platforms use.

I also expanded the workaround to handle C++ records with constructors
on Windows. On non-Windows platforms, we have to keep generating the
same LLVM IR prototypes if we want our bitcode to be ABI compatible.
Otherwise we will encounter mismatch issues like PR21573.

Essentially fixes PR27522 in Clang instead of LLVM.

Reviewers: hans

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

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

8 years ago[WebAssembly] Rename memory_size intrinsic to current_memory
Derek Schuff [Mon, 2 May 2016 17:26:19 +0000 (17:26 +0000)]
[WebAssembly] Rename memory_size intrinsic to current_memory

This follows the recent change in the wasm spec.

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

8 years ago[CLANG][AVX512][BUILTIN]movap{d|s}{128|256|512}
Michael Zuckerman [Mon, 2 May 2016 14:02:01 +0000 (14:02 +0000)]
[CLANG][AVX512][BUILTIN]movap{d|s}{128|256|512}

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

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

8 years ago[Clang][AVX512][BuiltIn] Adding intrinsics for cvtps2pd instruction set
Michael Zuckerman [Mon, 2 May 2016 09:42:31 +0000 (09:42 +0000)]
[Clang][AVX512][BuiltIn] Adding intrinsics for cvtps2pd instruction set

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

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

8 years ago[Clang][avx512][builtin] Adding intrinsics for vexpand{d|q|ps|pd} instrctuon set
Michael Zuckerman [Mon, 2 May 2016 08:36:41 +0000 (08:36 +0000)]
[Clang][avx512][builtin] Adding intrinsics for vexpand{d|q|ps|pd} instrctuon set

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

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

8 years ago[Clang][BuiltIn][avx512] Adding intrinsics for vpshufd instruction set
Michael Zuckerman [Mon, 2 May 2016 07:35:27 +0000 (07:35 +0000)]
[Clang][BuiltIn][avx512] Adding intrinsics for vpshufd instruction set

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

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

8 years ago[clang][Builtin][AVX512] Adding intrinsics for vmovshdup and vmovsldup instruction set
Michael Zuckerman [Sun, 1 May 2016 14:43:43 +0000 (14:43 +0000)]
[clang][Builtin][AVX512] Adding intrinsics for vmovshdup and vmovsldup instruction set

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

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

8 years agopython: add bindings for children of diagnostics
Saleem Abdulrasool [Sat, 30 Apr 2016 21:14:01 +0000 (21:14 +0000)]
python: add bindings for children of diagnostics

This exposes the Clang API bindings clang_getChildDiagnostics (which returns a
CXDiagnosticSet) and clang_getNumDiagnosticsInSet / clang_getDiagnosticInSet (to
traverse the CXDiagnosticSet), and adds a helper children property in the Python
Diagnostic wrapper.

Also, this adds the missing OVERLOAD_CANDIDATE (700) cursor type.

Patch by Hanson Wang!

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

8 years agoStab in the dark to fix the PS4 bot
Chris Bieneman [Sat, 30 Apr 2016 05:27:17 +0000 (05:27 +0000)]
Stab in the dark to fix the PS4 bot

r268127 is causing the PS4 bots to fail. Not sure what is causing it, but hopefully this will fix it.

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

8 years agoReverting 268055 as it caused PR27579.
Amjad Aboud [Sat, 30 Apr 2016 01:44:38 +0000 (01:44 +0000)]
Reverting 268055 as it caused PR27579.

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

8 years agoDelete store to Target option PositionIndependentExecutable as PIE is now set in...
Sriraman Tallam [Fri, 29 Apr 2016 23:38:53 +0000 (23:38 +0000)]
Delete store to Target option PositionIndependentExecutable as PIE is now set in module flags.

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

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

8 years ago[CUDA] Copy host builtin types to NVPTXTargetInfo.
Justin Lebar [Fri, 29 Apr 2016 23:05:19 +0000 (23:05 +0000)]
[CUDA] Copy host builtin types to NVPTXTargetInfo.

Summary:
Host and device types must match, otherwise when we pass values back and
forth between the host and device, we will get the wrong result.

This patch makes NVPTXTargetInfo inherit most of its type information
from the host's target info.

Reviewers: rsmith

Subscribers: cfe-commits, jhen, tra

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

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

8 years ago[NFC] Initialize a variable to make buildbot green.
Denis Zobnin [Fri, 29 Apr 2016 22:50:16 +0000 (22:50 +0000)]
[NFC] Initialize a variable to make buildbot green.

In r268085 "[MS] Make #pragma pack use PragmaStack<> class." there was an
uninitialized variable 'Alignment', which caused the following failure:
  http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/1758
Zero-initialize the variable to fix this failure.

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

8 years agoFix test case for incompatible sysroot warning
Chris Bieneman [Fri, 29 Apr 2016 22:44:33 +0000 (22:44 +0000)]
Fix test case for incompatible sysroot warning

r268127 broke some bots because it needs to specify a darwin target.

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

8 years agoAdd a new warning to notify users of mismatched SDK and deployment target
Chris Bieneman [Fri, 29 Apr 2016 22:28:34 +0000 (22:28 +0000)]
Add a new warning to notify users of mismatched SDK and deployment target

Summary:
This patch adds a new driver warning -Wincompatible-sdk which notifies the user when they are mismatching the version min options and the sysroot.

The patch works by checking the sysroot (if present) for an SDK name, then matching that against the target platform. In the case of a mismatch it logs a warning.

Reviewers: bob.wilson, rsmith

Subscribers: rsmith, edward-san, cfe-commits

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

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

8 years ago[Sema] Specify the underlying type for an enum. NFC.
George Burgess IV [Fri, 29 Apr 2016 21:32:53 +0000 (21:32 +0000)]
[Sema] Specify the underlying type for an enum. NFC.

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

8 years agoAdd the ability to determine whether a format string argument is of a double type...
Aaron Ballman [Fri, 29 Apr 2016 21:05:55 +0000 (21:05 +0000)]
Add the ability to determine whether a format string argument is of a double type or not. This change is tested by clang-tidy in r268100.

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

8 years agoMethod Pool in modules: we make sure that if a module contains an entry for
Manman Ren [Fri, 29 Apr 2016 19:04:05 +0000 (19:04 +0000)]
Method Pool in modules: we make sure that if a module contains an entry for
a selector, the entry should be complete, containing everything introduced by
that module and all modules it imports.

Before writing out the method pool of a module, we sync up the out of date
selectors by pulling in methods for the selectors, from all modules it imports.

In ReadMethodPool, after pulling in the method pool entry for module A, this
lets us skip the modules that module A imports.

rdar://problem/25900131

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

8 years agoUse the new path for coverage related headers and update CMakeLists.txt
Easwaran Raman [Fri, 29 Apr 2016 18:53:16 +0000 (18:53 +0000)]
Use the new path for coverage related headers and update CMakeLists.txt

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

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

8 years ago[MS] Make #pragma pack use PragmaStack<> class.
Denis Zobnin [Fri, 29 Apr 2016 18:17:40 +0000 (18:17 +0000)]
[MS] Make #pragma pack use PragmaStack<> class.

Make implementation of #pragma pack consistent with other "stack" pragmas.
Use PragmaStack<> class instead of old representation of internal stack.
Don't change compiler's behavior.

TODO:
  1. Introduce diagnostics on popping named slots from pragma stacks.

Reviewer: rnk

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

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

8 years agoFix crash in BuildCXXDefaultInitExpr.
Reid Kleckner [Fri, 29 Apr 2016 18:06:53 +0000 (18:06 +0000)]
Fix crash in BuildCXXDefaultInitExpr.

Fix crash in BuildCXXDefaultInitExpr when member of template class has
same name as the class itself.

Based on patch by Raphael "Teemperor" Isemann!

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

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

8 years ago[Concepts] Pass requires-clause to ActOnTemplateParameterList; NFC
Hubert Tong [Fri, 29 Apr 2016 18:05:37 +0000 (18:05 +0000)]
[Concepts] Pass requires-clause to ActOnTemplateParameterList; NFC

Summary:
Prepare to store requires-clause expression for access via
TemplateParameterList.

Reviewers: aaron.ballman, faisalv, rsmith

Subscribers: cfe-commits, nwilson

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

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

8 years ago[Clang][Darwin] Define __ARM_DWARF_EH__ for WatchABI
Chris Bieneman [Fri, 29 Apr 2016 17:53:00 +0000 (17:53 +0000)]
[Clang][Darwin] Define __ARM_DWARF_EH__ for WatchABI

Summary: The Darwin armv7k ABI uses Dwarf EH, so we need to set the OS define correctly. Without this the gcc_personality fails to build.

Reviewers: t.p.northover

Subscribers: aemerson, cfe-commits, rengolin

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

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

8 years agoImprove test coverage of -Wdouble-promotion
Robert Lougher [Fri, 29 Apr 2016 17:44:29 +0000 (17:44 +0000)]
Improve test coverage of -Wdouble-promotion

This patch adds coverage for additional cases where implicit conversion can
occur (assignment and return).  It also adds tests for some cases where a
warning should occur but none is produced.  These are marked as FIXME.

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

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

8 years agoAdd a Subjects line to NoDebugAttr [NFC].
Paul Robinson [Fri, 29 Apr 2016 17:03:34 +0000 (17:03 +0000)]
Add a Subjects line to NoDebugAttr [NFC].

The 'nodebug' attribute had hand-coded constraints; replace those with
a Subjects line in Attr.td.
Also add a missing test to verify the attribute is okay on an
Objective-C method.

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

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

8 years agoRecommitted r264281 "Supporting all entities declared in lexical scope in LLVM debug...
Amjad Aboud [Fri, 29 Apr 2016 16:08:08 +0000 (16:08 +0000)]
Recommitted r264281 "Supporting all entities declared in lexical scope in LLVM debug info."
After fixing PR26942 in r267004.

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

8 years ago[ARM] Guard the declarations of f16 to f32 vcvt intrinsics in arm_neon.h by testing...
Silviu Baranga [Fri, 29 Apr 2016 15:03:32 +0000 (15:03 +0000)]
[ARM] Guard the declarations of f16 to f32 vcvt intrinsics in arm_neon.h by testing __ARM_FP

Summary:
Conversions between float and half are only available when the
taraget has the half-precision extension. Guard these intrinsics
so that they don't cause crashes in the backend.

Fixes PR27550.

Reviewers: rengolin, t.p.northover

Subscribers: cfe-commits, aemerson, t.p.northover, rengolin

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

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

8 years agoRecommit "[MS] Improved implementation of stack pragmas (vtordisp, *_seg)"
Denis Zobnin [Fri, 29 Apr 2016 11:27:00 +0000 (11:27 +0000)]
Recommit "[MS] Improved implementation of stack pragmas (vtordisp, *_seg)"

Slightly updated version, double-checked build and tests.
Improve implementation of MS pragmas that use stack + compatibility fixes.
This patch:
  1. Changes implementation of #pragma vtordisp to use PragmaStack class
     that other stack pragmas use;
  2. Fixes "#pragma vtordisp()" behavior - it shouldn't affect the stack;
  3. Supports "save-restore" of pragma stacks on enter / exit a C++ method
     body, as MSVC does.

TODO:
  1. Change implementation of #pragma pack to use the same approach;
  2. Introduce diagnostics on popping named stack slots, as MSVC does.

Reviewers:
  rnk, thakis

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

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

8 years ago[clang][BuiltIn][AVX512]Adding intrinsics for cmp{ss|sd} instruction set.
Michael Zuckerman [Fri, 29 Apr 2016 11:01:16 +0000 (11:01 +0000)]
[clang][BuiltIn][AVX512]Adding intrinsics for cmp{ss|sd} instruction set.

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

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

8 years ago[OPENMP] Fix detection of explicit data-sharing attributes in templates.
Alexey Bataev [Fri, 29 Apr 2016 09:56:11 +0000 (09:56 +0000)]
[OPENMP] Fix detection of explicit data-sharing attributes in templates.

Fixes a bug with analysis of data-sharing attributes in templates.

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

8 years agoImplementation of VlA of GNU C++ extension, by Vladimir Yakovlev.
Alexey Bataev [Fri, 29 Apr 2016 09:39:50 +0000 (09:39 +0000)]
Implementation of VlA of GNU C++ extension, by Vladimir Yakovlev.

This enables GNU C++ extension "Variable length array" by default.
Differential Revision: http://reviews.llvm.org/D18823

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

8 years ago[Clang][AVX512][Builtin] Adding intrinsics for compress instruction set
Michael Zuckerman [Fri, 29 Apr 2016 08:52:02 +0000 (08:52 +0000)]
[Clang][AVX512][Builtin] Adding intrinsics for compress instruction set

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

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

8 years ago[Parser] Clear the TemplateParamScope bit of the current scope's flag
Akira Hatanaka [Fri, 29 Apr 2016 02:24:14 +0000 (02:24 +0000)]
[Parser] Clear the TemplateParamScope bit of the current scope's flag
if we are parsing a template specialization.

This commit makes changes to clear the TemplateParamScope bit and set
the TemplateParamParent field of the current scope to null if a template
specialization is being parsed.

Before this commit, Sema::ActOnStartOfLambdaDefinition would check
whether the parent template scope had any decls to determine whether
or not a template specialization was being parsed. This wasn't correct
since it couldn't distinguish between a real template specialization and
a template defintion with an unnamed template parameter (only template
parameters with names are added to the scope's decl list). To fix the
bug, this commit changes the code to check the pointer to the parent
template scope rather than the decl list.

rdar://problem/23440346

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

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

8 years ago[OPENMP] Enable correct generation of runtime call when target directive is separated...
Carlo Bertolli [Fri, 29 Apr 2016 01:37:30 +0000 (01:37 +0000)]
[OPENMP] Enable correct generation of runtime call when target directive is separated from teams directive by multiple curly brackets

http://reviews.llvm.org/D18474

This patch fixes a bug in code generation of the correct OpenMP runtime library call in presence of target and teams, when target is separated by teams with multiple curly brackets. The current implementation will not be able to see the teams directive inside target and issue a call to tgt_target instead of the correct one tgt_target_teams.

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

8 years agoPR27549: fix bug that resulted in us giving a translation-unit-scope variable a
Richard Smith [Fri, 29 Apr 2016 01:23:20 +0000 (01:23 +0000)]
PR27549: fix bug that resulted in us giving a translation-unit-scope variable a
mangled name if it happened to be declared in an 'extern "C++"' context. This
also causes us to use the '_ZL' mangling rather than the '_Z' mangling for
internal-linkage entities that are wrapped in a language linkage construct.

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

8 years agoAvoid -Wshadow warnings about constructor parameters named after fields
Reid Kleckner [Fri, 29 Apr 2016 00:37:43 +0000 (00:37 +0000)]
Avoid -Wshadow warnings about constructor parameters named after fields

Usually these parameters are used solely to initialize the field in the
initializer list, and there is no real shadowing confusion.

There is a new warning under -Wshadow called
-Wshadow-field-in-constructor-modified. It attempts to find
modifications of such constructor parameters that probably intended to
modify the field.

It has some false negatives, though, so there is another warning group,
-Wshadow-field-in-constructor, which always warns on this special case.
For users who just want the old behavior and don't care about these fine
grained groups, we have a new warning group called -Wshadow-all that
activates everything.

Fixes PR16088.

Reviewers: rsmith

Subscribers: cfe-commits

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

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

8 years ago[Sema] Fix a crash that occurs when a variable template is initialized
Akira Hatanaka [Thu, 28 Apr 2016 23:50:12 +0000 (23:50 +0000)]
[Sema] Fix a crash that occurs when a variable template is initialized
with a generic lambda.

This patch fixes Sema::InstantiateVariableInitializer to switch to the
context of the variable before instantiating its initializer, which is
necessary to set the correct type for VarTemplateSpecializationDecl.

This is the first part of the patch that was reviewed here:
http://reviews.llvm.org/D19175

rdar://problem/23440346

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

8 years agoDifferential Revision: http://reviews.llvm.org/D19687
Sriraman Tallam [Thu, 28 Apr 2016 22:34:00 +0000 (22:34 +0000)]
Differential Revision: http://reviews.llvm.org/D19687

Set module flag PIELevel. Simplify code that sets PICLevel flag.

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

8 years ago[clang][AVX512][Builtin] Adding intrinsics for the SAD instruction set.
Michael Zuckerman [Thu, 28 Apr 2016 21:21:08 +0000 (21:21 +0000)]
[clang][AVX512][Builtin] Adding intrinsics for the SAD instruction set.

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

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

8 years agoOne more fix for use of invalid PresumedLocs missed by r267914.
Richard Smith [Thu, 28 Apr 2016 19:54:51 +0000 (19:54 +0000)]
One more fix for use of invalid PresumedLocs missed by r267914.

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

8 years ago[analyzer] Add path note for localizability checker.
Devin Coughlin [Thu, 28 Apr 2016 19:44:40 +0000 (19:44 +0000)]
[analyzer] Add path note for localizability checker.

Add a path note indicating the location of the non-localized string
literal in NonLocalizedStringChecker.

rdar://problem/25981525

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

8 years agoFix use of uninitialized value exposed by r267802. Accessors of an invalid
Richard Smith [Thu, 28 Apr 2016 18:26:32 +0000 (18:26 +0000)]
Fix use of uninitialized value exposed by r267802. Accessors of an invalid
PresumedLoc should not be called.

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

8 years agoMake the test exercise all paths modified in r267746.
Paul Robinson [Thu, 28 Apr 2016 17:52:28 +0000 (17:52 +0000)]
Make the test exercise all paths modified in r267746.

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

8 years ago[OpenCL] Fix bug in mergeTypes which causes equivalent types treated as different.
Yaxun Liu [Thu, 28 Apr 2016 17:34:57 +0000 (17:34 +0000)]
[OpenCL] Fix bug in mergeTypes which causes equivalent types treated as different.

When comparing unqualified types, canonical types should be used, otherwise equivalent types may be treated as different type.

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

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

8 years agoDebug info: Apply an artificial debug location to __cyg_profile_func.* calls.
Adrian Prantl [Thu, 28 Apr 2016 17:21:56 +0000 (17:21 +0000)]
Debug info: Apply an artificial debug location to __cyg_profile_func.* calls.
The LLVM Verifier expects all inlinable calls in debuggable functions to
have a location.

rdar://problem/25818489

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

8 years agoRe-apply r267784, r267824 and r267830.
Peter Collingbourne [Thu, 28 Apr 2016 17:09:37 +0000 (17:09 +0000)]
Re-apply r267784, r267824 and r267830.

I have updated the compiler-rt tests.

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

8 years agoFix build.
Manuel Klimek [Thu, 28 Apr 2016 14:28:19 +0000 (14:28 +0000)]
Fix build.

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

8 years agoReland r267691 fixing PR27535.
Vassil Vassilev [Thu, 28 Apr 2016 14:13:28 +0000 (14:13 +0000)]
Reland r267691 fixing PR27535.

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

8 years agoAdd accidentally dropped test to r267880.
Tim Northover [Thu, 28 Apr 2016 14:01:49 +0000 (14:01 +0000)]
Add accidentally dropped test to r267880.

Forgot "git add".

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

8 years agoARMv7k: define __ARM_PCS_VFP since we're hard-float.
Tim Northover [Thu, 28 Apr 2016 13:59:55 +0000 (13:59 +0000)]
ARMv7k: define __ARM_PCS_VFP since we're hard-float.

It's a little debateable because we're not truly AAPCS, so I'm
certainly not going to define __ARM_PCS, but __ARM_PCS_VFP seems to be
really an "hard-float" define, which is a useful thing to have.

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

8 years ago[SystemZ] Support Swift calling convention
Bryan Chan [Thu, 28 Apr 2016 13:56:43 +0000 (13:56 +0000)]
[SystemZ] Support Swift calling convention

Summary:
Port rL265324 to SystemZ to allow using the 'swiftcall' attribute on that architecture.

Depends on D19414.

Reviewers: kbarton, rjmccall, uweigand

Subscribers: cfe-commits

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

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

8 years agoFix spuriously dematerializing reference bug. Fixes PR26612.
Manuel Klimek [Thu, 28 Apr 2016 13:37:45 +0000 (13:37 +0000)]
Fix spuriously dematerializing reference bug. Fixes PR26612.

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

8 years ago[Clang][BuiltIn][AVX512] Adding intrinsics fot align{d|q} and palignr instruction set
Michael Zuckerman [Thu, 28 Apr 2016 12:47:30 +0000 (12:47 +0000)]
[Clang][BuiltIn][AVX512] Adding intrinsics fot align{d|q} and palignr instruction set

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

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

8 years ago[OPENMP 4.5] Initial codegen for 'taskloop simd' directive.
Alexey Bataev [Thu, 28 Apr 2016 12:14:51 +0000 (12:14 +0000)]
[OPENMP 4.5] Initial codegen for 'taskloop simd' directive.

OpenMP 4.5 defines 'taskloop simd' directive, which is combined
directive for 'taskloop' and 'simd' directives. Patch adds initial
codegen support for this directive and its 2 basic clauses 'safelen' and
'simdlen'.

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