]> granicus.if.org Git - clang/log
clang
10 years agoMerging r221832: release_35 origin/release_35
Tom Stellard [Mon, 8 Dec 2014 23:38:47 +0000 (23:38 +0000)]
Merging r221832:

------------------------------------------------------------------------
r221832 | richard-llvm | 2014-11-12 18:38:38 -0500 (Wed, 12 Nov 2014) | 5 lines

PR19372: Keep checking template arguments after we see an argument pack
expansion into a parameter pack; we know that we're still filling in that
parameter's arguments. Previously, if we hit this case for an alias template,
we'd try to substitute using non-canonical template arguments.

------------------------------------------------------------------------

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

10 years agoMerging r221748:
Tom Stellard [Mon, 8 Dec 2014 23:38:45 +0000 (23:38 +0000)]
Merging r221748:

------------------------------------------------------------------------
r221748 | richard-llvm | 2014-11-11 20:43:45 -0500 (Tue, 11 Nov 2014) | 4 lines

PR21536: Fix a corner case where we'd get confused by a pack expanding into the
penultimate parameter of a template parameter list, where the last parameter is
itself a pack, and build a bogus empty final pack argument.

------------------------------------------------------------------------

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

10 years agoMerging r217104:
David Majnemer [Mon, 8 Dec 2014 22:26:56 +0000 (22:26 +0000)]
Merging r217104:
------------------------------------------------------------------------
r217104 | majnemer | 2014-09-03 16:20:58 -0700 (Wed, 03 Sep 2014) | 1 line

Adjust test to handle fallout from r217102.
------------------------------------------------------------------------

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

10 years agoMerged from r222339*:
Daniel Sanders [Mon, 1 Dec 2014 10:45:46 +0000 (10:45 +0000)]
Merged from r222339*:
Please note that there is a significant change to the test compared to r222339.
This is because this branch generates different code compared to the trunk.
The code on this branch appears to be equivalent so the test has been updated
accordingly.
-------------------------------------------------------------------------------
Allow EmitVAArg() to promote types and use this to fix some N32/N64 vararg issues for Mips.

Summary:
With this patch, passing a va_list to another function and reading 10 int's from
it works correctly on a big-endian target.

Based on a pair of patches by David Chisnall, one of which I've reworked
for the current trunk.

Reviewers: theraven, atanasyan

Reviewed By: theraven, atanasyan

Subscribers: cfe-commits

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

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

10 years agoMerged from r220566:
Daniel Sanders [Mon, 1 Dec 2014 10:32:00 +0000 (10:32 +0000)]
Merged from r220566:

[mips] Mark aggregate arguments passed in registers with the inreg attribute

Summary:
This allows us to easily identify them in the backend which in turn allows us
to handle them correctly for big-endian targets (where they must be shifted
into the upper bits of the register).

Depends on D5961

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: cfe-commits, theraven

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

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

10 years agoMerged from r220563:
Daniel Sanders [Mon, 1 Dec 2014 10:26:16 +0000 (10:26 +0000)]
Merged from r220563:

[mips] Promote all integral/enumeration types to the GPR width

Summary:
Ensure all integral/enumeration types are appropriately annotated with
signext/zeroext. In particular, i32 now has these attributes when using the
N32/N64 ABI. This paves the way for accurately representing the way the
N32/N64 ABI's promotes integer arguments to i64.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: cfe-commits, theraven

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

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

10 years agoMerged from r218298:
Daniel Sanders [Mon, 1 Dec 2014 10:18:49 +0000 (10:18 +0000)]
Merged from r218298:

[mips] Fix r218248's testcase to use -O1 instead of -O3.

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

10 years agoMerged from r218260:
Daniel Sanders [Mon, 1 Dec 2014 10:17:46 +0000 (10:17 +0000)]
Merged from r218260:

Fix test/CodeGen/mips-varargs.c to use %clang_cc1

Only tests under test/Driver should use %clang, and test/CodeGen in
particular must always use %clang_cc1.

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

10 years agoMerged from r218256:
Daniel Sanders [Mon, 1 Dec 2014 10:16:19 +0000 (10:16 +0000)]
Merged from r218256:

clang/test/CodeGen/mips-varargs.c: Fixup for -Asserts.

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

10 years agoMerged from r218248:
Daniel Sanders [Mon, 1 Dec 2014 10:14:30 +0000 (10:14 +0000)]
Merged from r218248:

[mips] Correct alignment of vectors passed in varargs for the O32 ABI.

Summary:
Vectors are normally 16-byte aligned, however the O32 ABI enforces a
maximum alignment of 8-bytes since the base of the stack is 8-byte aligned.
Previously, this was enforced on the caller side, but not on the callee side.

This fixes the output of OpenCL's printf when given vectors.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: llvm-commits, pekka.jaaskelainen

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

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

10 years agoMerging r217160:
Daniel Sanders [Mon, 1 Dec 2014 10:07:55 +0000 (10:07 +0000)]
Merging r217160:

[mips] Mark aggregates returned in registers with the 'inreg' attribute.

Summary:
This allows us to easily find them in the backend after the aggregates have
been lowered to other types. This is important on big-endian targets using
the N32/N64 ABI's since these ABI's must shift small structures into the
upper bits of the register.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: llvm-commits

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

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

10 years agoMerging r213769:
Daniel Sanders [Wed, 26 Nov 2014 10:16:56 +0000 (10:16 +0000)]
Merging r213769:
------------------------------------------------------------------------
r213769 | askrobov | 2014-07-23 18:09:26 +0100 (Wed, 23 Jul 2014) | 6 lines

Fix test/Driver/cl-x86-flags.c by providing explicit --target

This isn't very neat, but we haven't found any better ways to
make this test work with non-X86 default target.

------------------------------------------------------------------------

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

10 years agoMerging r217147:
Daniel Sanders [Mon, 24 Nov 2014 21:30:06 +0000 (21:30 +0000)]
Merging r217147:
------------------------------------------------------------------------
r217147 | dsanders | 2014-09-04 14:28:14 +0100 (Thu, 04 Sep 2014) | 18 lines

[mips] Zero-sized structs cannot be ignored in MipsABIInfo::classifyReturnType() for O32

Summary:
They are returned indirectly which causes the other arguments to move to
the next argument slot.

With this, utils/ABITest does not discover any failing cases in the first
500 attempts on big/little endian for O32. Previously some of these failed.
Also tested N32/N64 little endian (big endian has other known issues) with
no issues.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: atanasyan, cfe-commits

Differential Revision: http://reviews.llvm.org/D4811
------------------------------------------------------------------------

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

10 years agoMerging r214662:
Daniel Sanders [Mon, 24 Nov 2014 21:24:31 +0000 (21:24 +0000)]
Merging r214662:
------------------------------------------------------------------------
r214662 | atanasyan | 2014-08-03 17:11:05 +0100 (Sun, 03 Aug 2014) | 2 lines

[Mips] Add the `mips64-linux-gnu` target to the test case to check `in128`
type handling.
------------------------------------------------------------------------

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

10 years agoMerging r214025:
Daniel Sanders [Mon, 24 Nov 2014 21:18:01 +0000 (21:18 +0000)]
Merging r214025:
------------------------------------------------------------------------
r214025 | atanasyan | 2014-07-26 10:52:21 +0100 (Sat, 26 Jul 2014) | 4 lines

[Driver][Mips] Check output of -dynamic-linker arguments by the Clang driver
for a couple of MIPS toolchains.

No functional changes.
------------------------------------------------------------------------

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

10 years agoMerging r220148:
Tom Stellard [Mon, 10 Nov 2014 18:19:09 +0000 (18:19 +0000)]
Merging r220148:

------------------------------------------------------------------------
r220148 | me | 2014-10-18 19:36:12 -0400 (Sat, 18 Oct 2014) | 6 lines

New round of fixes for "Always compile debuginfo-tests for the host triple"

clang tests were breaking, at least when compiling clang only, from an
installed llvm. Make the lit.cfg script deal with the case when we don't
have a host_triple available.

------------------------------------------------------------------------

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

10 years agoMerging r220112:
Tom Stellard [Mon, 10 Nov 2014 18:19:08 +0000 (18:19 +0000)]
Merging r220112:

------------------------------------------------------------------------
r220112 | me | 2014-10-17 19:50:47 -0400 (Fri, 17 Oct 2014) | 2 lines

Fix makefile for debuginfo-tests execution.

------------------------------------------------------------------------

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

10 years agoMerging r219989:
Tom Stellard [Mon, 10 Nov 2014 18:19:05 +0000 (18:19 +0000)]
Merging r219989:

------------------------------------------------------------------------
r219989 | me | 2014-10-16 19:41:40 -0400 (Thu, 16 Oct 2014) | 2 lines

Added %itanium_abi_host_triple to fix debuginfo-tests when clang is a cross-compiler by default

------------------------------------------------------------------------

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

10 years agoMerging r220874:
Hans Wennborg [Tue, 4 Nov 2014 09:47:45 +0000 (09:47 +0000)]
Merging r220874:
------------------------------------------------------------------------
r220874 | hans | 2014-10-29 14:20:57 -0700 (Wed, 29 Oct 2014) | 3 lines

Follow-up to r216619: use isCXXCLassMember() instead of trying to
check the context ourselves when selectively allowing late-added
dll attributes on unused free functions and variables (PR20746)
------------------------------------------------------------------------

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

10 years agoMerging r216619:
Hans Wennborg [Mon, 29 Sep 2014 23:33:05 +0000 (23:33 +0000)]
Merging r216619:
------------------------------------------------------------------------
r216619 | hans | 2014-08-27 14:27:40 -0700 (Wed, 27 Aug 2014) | 7 lines

Allow adding dll attributes on certain redecls with a warning if the decl hasn't been used yet (PR20746)

This shouldn't really be allowed, but it comes up in real code (see PR). As
long as the decl hasn't been used there's no technical difficulty in supporting
it, so downgrade the error to a warning.

Differential Revision: http://reviews.llvm.org/D5087
------------------------------------------------------------------------

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

10 years agoUpdate ReleaseNotes to remove empty sections.
Bill Wendling [Fri, 5 Sep 2014 01:16:32 +0000 (01:16 +0000)]
Update ReleaseNotes to remove empty sections.

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

10 years agoUpdate docs.
Bill Wendling [Tue, 2 Sep 2014 21:29:19 +0000 (21:29 +0000)]
Update docs.

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

10 years agoSome Clang 3.5 release note updates.
Richard Smith [Sun, 31 Aug 2014 03:54:48 +0000 (03:54 +0000)]
Some Clang 3.5 release note updates.

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

10 years agoMerging r216572:
Bill Wendling [Wed, 27 Aug 2014 20:07:31 +0000 (20:07 +0000)]
Merging r216572:
------------------------------------------------------------------------
r216572 | chandlerc | 2014-08-27 11:21:27 -0700 (Wed, 27 Aug 2014) | 3 lines

Fix PR20773 which I introduced with a silly edit mistake in r216531.
Trivial fix, and I've made the gentoo tests more representative. With
the changes, they would have caught this failure.
------------------------------------------------------------------------

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

10 years agoMerging r216531:
Bill Wendling [Wed, 27 Aug 2014 20:07:13 +0000 (20:07 +0000)]
Merging r216531:
------------------------------------------------------------------------
r216531 | chandlerc | 2014-08-27 01:41:41 -0700 (Wed, 27 Aug 2014) | 22 lines

Significantly fix Clang's header search for Ubuntu (and possibly other
modern Debian-based distributions) due to on-going multiarch madness.

It appears that when the multiarch heeader search support went into the
clang driver, it went in in a quite bad state. The order of includes
completely failed to match the order exhibited by GCC, and in a specific
case -- when the GCC triple and the multiarch triple don't match as with
i686-linux-gnu and i386-linux-gnu -- we would absolutely fail to find
the libstdc++ target-specific header files.

I assume that folks who have been using Clang on Ubuntu 32-bit systems
have been applying weird patches to hack around this. I can't imagine
how else it could have worked. This was originally reported by a 64-bit
operating system user who had a 32-bit crosscompiler installed. We tried
to use that rather than the bi-arch support of the 64-bit compiler, but
failed due to the triple differences.

I've corrected all the wrong orderings in the existing tests and added
a specific test for the multiarch triple strings that are different in
a significant way. This should significantly improve the usability of
Clang when checked out vanilla from upstream onto Ubuntu machines with
an i686 GCC installation for whatever reason.
------------------------------------------------------------------------

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

10 years agoupdated with clang openmp notes by Michael Wong
Michael Wong [Wed, 27 Aug 2014 19:22:48 +0000 (19:22 +0000)]
updated with clang openmp notes by Michael Wong

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

10 years agoUse C++14 flags.
Bill Wendling [Fri, 22 Aug 2014 20:54:39 +0000 (20:54 +0000)]
Use C++14 flags.

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

10 years agoIt fixes a regression with multiple address spaces in
Bill Wendling [Wed, 20 Aug 2014 07:39:19 +0000 (07:39 +0000)]
It fixes a regression with multiple address spaces in
OpenCL and blocks.

Patch by Pekka.

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

10 years agoMerging r215609:
Bill Wendling [Mon, 18 Aug 2014 05:18:35 +0000 (05:18 +0000)]
Merging r215609:
------------------------------------------------------------------------
r215609 | majnemer | 2014-08-13 17:49:23 -0700 (Wed, 13 Aug 2014) | 3 lines

Sema: Permit nullptr template args in MSVC compat mode

This fixes a regression I caused back in r211766.
------------------------------------------------------------------------

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

10 years agoMerging r215618:
Bill Wendling [Mon, 18 Aug 2014 05:18:12 +0000 (05:18 +0000)]
Merging r215618:
------------------------------------------------------------------------
r215618 | majnemer | 2014-08-13 23:35:08 -0700 (Wed, 13 Aug 2014) | 7 lines

Parse: Don't attempt to act on #pragma init_seg when not targeting MSVC

It doesn't really make sense to try and do stuff with #pragma init_seg
when targeting non-Microsoft platforms; notions like library vs user
initializers don't exist for other targets.

This fixes PR20639.
------------------------------------------------------------------------

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

10 years agoMerging r215808:
Bill Wendling [Mon, 18 Aug 2014 05:15:34 +0000 (05:15 +0000)]
Merging r215808:
------------------------------------------------------------------------
r215808 | nicholas | 2014-08-15 19:14:37 -0700 (Fri, 15 Aug 2014) | 2 lines

Clarify.

------------------------------------------------------------------------

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

10 years agoMerging r215807:
Bill Wendling [Mon, 18 Aug 2014 05:15:18 +0000 (05:15 +0000)]
Merging r215807:
------------------------------------------------------------------------
r215807 | nicholas | 2014-08-15 19:11:54 -0700 (Fri, 15 Aug 2014) | 2 lines

Try indenting to put all the text inside the block.

------------------------------------------------------------------------

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

10 years agoMerging r215806:
Bill Wendling [Mon, 18 Aug 2014 05:15:02 +0000 (05:15 +0000)]
Merging r215806:
------------------------------------------------------------------------
r215806 | nicholas | 2014-08-15 19:09:42 -0700 (Fri, 15 Aug 2014) | 2 lines

Document what's experimental about __attribute__((enable_if)). PR20392

------------------------------------------------------------------------

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

10 years agoDocument -Wabsolute-value with example
Sylvestre Ledru [Thu, 14 Aug 2014 16:10:10 +0000 (16:10 +0000)]
Document -Wabsolute-value with example

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

10 years agoDocument -Wtautological-pointer-compare & -Wtautological-undefined-compare with example
Sylvestre Ledru [Thu, 14 Aug 2014 16:09:45 +0000 (16:09 +0000)]
Document -Wtautological-pointer-compare & -Wtautological-undefined-compare with example

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

10 years agoDocument the new warning -Wabsolute-value
Sylvestre Ledru [Wed, 13 Aug 2014 07:41:41 +0000 (07:41 +0000)]
Document the new warning -Wabsolute-value

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

10 years agoMerging r215229:
Bill Wendling [Tue, 12 Aug 2014 05:38:53 +0000 (05:38 +0000)]
Merging r215229:
------------------------------------------------------------------------
r215229 | sylvestre | 2014-08-08 10:15:13 -0700 (Fri, 08 Aug 2014) | 11 lines

Fix a bug when scan-build is used in a cross-compilation environment with
the --use-cc option.

Instead, we will search in the PATH
For example:
 scan-build --use-cc=arm-none-eabi-gcc -o out make -e

Initially reported as a Debian Bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748777

------------------------------------------------------------------------

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

10 years agoAlso describe the new check 'alpha.core.TestAfterDivZero'
Sylvestre Ledru [Sun, 10 Aug 2014 12:41:40 +0000 (12:41 +0000)]
Also describe the new check 'alpha.core.TestAfterDivZero'

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

10 years agoUpdate of the release notes: '-z' is also forwarded to the linker
Sylvestre Ledru [Sun, 10 Aug 2014 12:38:46 +0000 (12:38 +0000)]
Update of the release notes: '-z' is also forwarded to the linker

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

10 years agoMerge r215245: Change __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ for versions...
Bob Wilson [Fri, 8 Aug 2014 22:59:37 +0000 (22:59 +0000)]
Merge r215245: Change __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ for versions > 10.9.

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

10 years agoMerging r215046:
Bill Wendling [Thu, 7 Aug 2014 04:51:51 +0000 (04:51 +0000)]
Merging r215046:
------------------------------------------------------------------------
r215046 | rsmith | 2014-08-06 17:24:21 -0700 (Wed, 06 Aug 2014) | 19 lines

Use -Rblah, not -Wblah, to control remark diagnostics. This was always the
intent when we added remark support, but was never implemented in the general
case, because the first -R flags didn't need it. (-Rpass= had special handling
to accomodate its argument.)

-Rno-foo, -Reverything, and -Rno-everything can be used to turn off a remark,
or to turn on or off all remarks. Per discussion on cfe-commits, -Weverything
does not affect remarks, and -Reverything does not affect warnings or errors.

The only "real" -R flag we have right now is -Rmodule-build; that flag is
effectively renamed from -Wmodule-build to -Rmodule-build by this change.

-Wpass and -Wno-pass (and their friends) are also renamed to -Rpass and
-Rno-pass by this change; it's not completely clear whether we intended to have
a -Rpass (with no =pattern), but that is unchanged by this commit, other than
the flag name. The default pattern is effectively one which matches no passes.
In future, we may want to make the default pattern be .*, so that -Reverything
works for -Rpass properly.

------------------------------------------------------------------------

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

10 years agoRevert renaming. Should rename tags instead.
Bill Wendling [Wed, 6 Aug 2014 23:15:28 +0000 (23:15 +0000)]
Revert renaming. Should rename tags instead.

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

10 years agoRenaming to coincide with updated tagging system. release_35@215011 origin/release_35@215011
Bill Wendling [Wed, 6 Aug 2014 23:13:45 +0000 (23:13 +0000)]
Renaming to coincide with updated tagging system.

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

10 years agoMerging r214735:
Bill Wendling [Tue, 5 Aug 2014 05:19:37 +0000 (05:19 +0000)]
Merging r214735:
------------------------------------------------------------------------
r214735 | ogoffart | 2014-08-04 10:28:11 -0700 (Mon, 04 Aug 2014) | 1 line

Fix crash when accessing a property of an invalid interface
------------------------------------------------------------------------

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

10 years agoMerging r214734:
Bill Wendling [Tue, 5 Aug 2014 05:19:17 +0000 (05:19 +0000)]
Merging r214734:
------------------------------------------------------------------------
r214734 | ogoffart | 2014-08-04 10:28:05 -0700 (Mon, 04 Aug 2014) | 7 lines

Fix crash when assiging to a property with an invalid type

This is a regression from clang 3.4

Set the result to ExprError and returns true, rather than simply
returns false because errors have been reported already and returning
false show a confusing error
------------------------------------------------------------------------

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

10 years agoMerging r214801:
Bill Schmidt [Mon, 4 Aug 2014 23:48:10 +0000 (23:48 +0000)]
Merging r214801:
------------------------------------------------------------------------
r214801 | wschmidt | 2014-08-04 18:21:26 -0500 (Mon, 04 Aug 2014) | 19 lines

[PPC64LE] Fix wrong IR for vec_sld and vec_vsldoi

My original LE implementation of the vsldoi instruction, with its
altivec.h interfaces vec_sld and vec_vsldoi, produces incorrect
shufflevector operations in the LLVM IR.  Correct code is generated
because the back end handles the incorrect shufflevector in a
consistent manner.

This patch and a companion patch for LLVM correct this problem by
removing the fixup from altivec.h and the corresponding fixup from the
PowerPC back end.  Several test cases are also modified to reflect the
now-correct LLVM IR.

The vec_sums and vec_vsumsws interfaces in altivec.h are also fixed,
because they used vec_perm calls intended to be recognized as vsldoi
instructions.  These vec_perm calls are now replaced with code that
more clearly shows the intent of the transformation.

------------------------------------------------------------------------

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

10 years agoMerging r214777:
Hans Wennborg [Mon, 4 Aug 2014 21:11:53 +0000 (21:11 +0000)]
Merging r214777:

Excluding the /Zp option, because that was added after the 3.5 branch.

------------------------------------------------------------------------
r214777 | hans | 2014-08-04 14:07:58 -0700 (Mon, 04 Aug 2014) | 1 line

UsersManual: update clang-cl options
------------------------------------------------------------------------

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

10 years agoMerging r214060:
Bill Wendling [Mon, 4 Aug 2014 19:58:38 +0000 (19:58 +0000)]
Merging r214060:
------------------------------------------------------------------------
r214060 | brad | 2014-07-27 18:57:32 -0700 (Sun, 27 Jul 2014) | 2 lines

Add missing override keyword to OpenBSD IsIntegratedAssemblerDefault().

------------------------------------------------------------------------

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

10 years agoMerging r213834:
Bill Wendling [Mon, 4 Aug 2014 18:38:09 +0000 (18:38 +0000)]
Merging r213834:
------------------------------------------------------------------------
r213834 | rsmith | 2014-07-23 19:27:39 -0700 (Wed, 23 Jul 2014) | 4 lines

Take the canonical type when forming a canonical template argument with
'nullptr' value. Fixes profiling of such template arguments to always give the
same value.

------------------------------------------------------------------------

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

10 years agoMerging r213913:
Bill Wendling [Mon, 4 Aug 2014 18:37:31 +0000 (18:37 +0000)]
Merging r213913:
------------------------------------------------------------------------
r213913 | rsmith | 2014-07-24 18:12:44 -0700 (Thu, 24 Jul 2014) | 4 lines

PR20445: Properly transform the initializer in a CXXNewExpr rather than running
it through the normal TreeTransform logic for Exprs (which will strip off
implicit parts of the initialization and never re-create them).

------------------------------------------------------------------------

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

10 years agoMerging r213999:
Bill Wendling [Mon, 4 Aug 2014 18:36:16 +0000 (18:36 +0000)]
Merging r213999:
------------------------------------------------------------------------
r213999 | tstellar | 2014-07-25 18:05:20 -0700 (Fri, 25 Jul 2014) | 1 line

R600: Add processor type for Mullins
------------------------------------------------------------------------

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

10 years agoMerging r214119:
Bill Wendling [Mon, 4 Aug 2014 18:34:05 +0000 (18:34 +0000)]
Merging r214119:
------------------------------------------------------------------------
r214119 | joerg | 2014-07-28 14:06:22 -0700 (Mon, 28 Jul 2014) | 7 lines

Change __INTx_TYPE__ to be always signed. This changes the value for
char-based types from "char" to "signed char". Adjust stdint.h to use
__INTx_TYPE__ directly without prefixing it with signed and to use
__UINTx_TYPE__ for unsigned ones.

The value of __INTx_TYPE__ now matches GCC.

------------------------------------------------------------------------

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

10 years agoMerging r214222:
Bill Wendling [Mon, 4 Aug 2014 18:33:13 +0000 (18:33 +0000)]
Merging r214222:
------------------------------------------------------------------------
r214222 | rsmith | 2014-07-29 14:20:12 -0700 (Tue, 29 Jul 2014) | 4 lines

PR20473: Don't "deduplicate" string literals with the same value but different
lengths! In passing, simplify string literal deduplication by relying on LLVM
to deduplicate the underlying constant values.

------------------------------------------------------------------------

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

10 years ago------------------------------------------------------------------------
Bill Wendling [Mon, 4 Aug 2014 18:31:55 +0000 (18:31 +0000)]
------------------------------------------------------------------------

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

10 years agoMerging r214369:
Bill Wendling [Mon, 4 Aug 2014 18:28:36 +0000 (18:28 +0000)]
Merging r214369:
------------------------------------------------------------------------
r214369 | rsmith | 2014-07-30 17:22:56 -0700 (Wed, 30 Jul 2014) | 2 lines

Rename this test so that it actually runs, and fix it so that it passes.

------------------------------------------------------------------------

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

10 years agoMerging r214050:
Bill Wendling [Mon, 4 Aug 2014 18:19:14 +0000 (18:19 +0000)]
Merging r214050:
------------------------------------------------------------------------
r214050 | rsmith | 2014-07-26 22:12:49 -0700 (Sat, 26 Jul 2014) | 7 lines

When looking for temporary dtors while building the CFG, do not walk into
lambda expressions (other than their capture initializers) nor blocks. Do walk
into default argument expressions and default initializer expressions.

These bugs were causing us to produce broken CFGs whenever a lambda expression
was used to initialize a libstdc++ std::function object!

------------------------------------------------------------------------

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

10 years agoMerging r214471:
Bill Wendling [Mon, 4 Aug 2014 18:18:40 +0000 (18:18 +0000)]
Merging r214471:
------------------------------------------------------------------------
r214471 | rtrieu | 2014-07-31 18:42:01 -0700 (Thu, 31 Jul 2014) | 5 lines

Remove this pointer that is converted to bool.  In well-defined contexts, the
this pointer is always non-null.  If the this pointer is null, it is undefined
and the compiler may optimize it away by assuming it is non-null.  The null
checks are pushed into the callers.

------------------------------------------------------------------------

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

10 years agoMerging r214008:
Bill Wendling [Mon, 4 Aug 2014 04:36:40 +0000 (04:36 +0000)]
Merging r214008:
------------------------------------------------------------------------
r214008 | rtrieu | 2014-07-25 19:10:52 -0700 (Fri, 25 Jul 2014) | 3 lines

If a template argument is non-evaluable expression, use the profile ID to see
if the two arguments are equal.

------------------------------------------------------------------------

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

10 years agoMerging r213912:
Bill Wendling [Mon, 4 Aug 2014 04:36:15 +0000 (04:36 +0000)]
Merging r213912:
------------------------------------------------------------------------
r213912 | rtrieu | 2014-07-24 17:24:02 -0700 (Thu, 24 Jul 2014) | 4 lines

Pass the PrintingPolicy when converting types to strings in template type
diffing.  This removes extra "struct"/"class" in the type names and gives
"bool" instead of "_Bool" for booleans.

------------------------------------------------------------------------

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

10 years agoMerging r213902:
Bill Wendling [Mon, 4 Aug 2014 04:35:58 +0000 (04:35 +0000)]
Merging r213902:
------------------------------------------------------------------------
r213902 | rtrieu | 2014-07-24 16:14:16 -0700 (Thu, 24 Jul 2014) | 3 lines

Print "(default)" for default template template arguments to match the
printing of other types.

------------------------------------------------------------------------

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

10 years agoMerging r213840:
Bill Wendling [Mon, 4 Aug 2014 04:35:31 +0000 (04:35 +0000)]
Merging r213840:
------------------------------------------------------------------------
r213840 | rtrieu | 2014-07-23 21:24:50 -0700 (Wed, 23 Jul 2014) | 2 lines

Add support for nullptr template arguments to template type diffing.

------------------------------------------------------------------------

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

10 years agoMerging r213613:
Bill Wendling [Mon, 4 Aug 2014 04:35:10 +0000 (04:35 +0000)]
Merging r213613:
------------------------------------------------------------------------
r213613 | rtrieu | 2014-07-21 21:42:15 -0700 (Mon, 21 Jul 2014) | 2 lines

Fix '&' printing for template arguments in parentheses in template diffing.

------------------------------------------------------------------------

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

10 years agoMerging r213611:
Bill Wendling [Mon, 4 Aug 2014 04:34:53 +0000 (04:34 +0000)]
Merging r213611:
------------------------------------------------------------------------
r213611 | rtrieu | 2014-07-21 21:06:54 -0700 (Mon, 21 Jul 2014) | 2 lines

More gracefully handle parentheses in templare arguments in template diffing.

------------------------------------------------------------------------

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

10 years agoMerging r213609:
Bill Wendling [Mon, 4 Aug 2014 04:34:27 +0000 (04:34 +0000)]
Merging r213609:
------------------------------------------------------------------------
r213609 | rtrieu | 2014-07-21 20:33:01 -0700 (Mon, 21 Jul 2014) | 3 lines

Fix a template diffing problem were an '&' is unexpectedly printed in
a template argument.

------------------------------------------------------------------------

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

10 years agoMerging r213993,213998:
Bob Wilson [Wed, 30 Jul 2014 00:07:54 +0000 (00:07 +0000)]
Merging r213993,213998:

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

10 years agoMerging r214208:
Bob Wilson [Tue, 29 Jul 2014 23:48:32 +0000 (23:48 +0000)]
Merging r214208:

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

10 years agoMerging r213714:
Renato Golin [Mon, 28 Jul 2014 18:27:07 +0000 (18:27 +0000)]
Merging r213714:
------------------------------------------------------------------------
r213714 | compnerd | 2014-07-23 02:32:32 +0100 (Wed, 23 Jul 2014) | 4 lines

test: add an explicit target triple

Now that we support WoA, this test fails on ARM build bots as __va_start has a
different signature on different architectures.
------------------------------------------------------------------------

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

10 years agoMerging r213937:
Simon Atanasyan [Sun, 27 Jul 2014 09:19:33 +0000 (09:19 +0000)]
Merging r213937:
------------------------------------------------------------------------
r213937 | atanasyan | 2014-07-25 15:20:21 +0400 (Fri, 25 Jul 2014) | 3 lines

[Driver][Mips] Remove "fp64" directories from the mips-mti-linux-gnu toolchain
directories description. Released version of this toolchain has not separate
libraries for -mfp64 command line option.
------------------------------------------------------------------------

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

10 years agoMerging r213733:
Yi Kong [Wed, 23 Jul 2014 19:55:09 +0000 (19:55 +0000)]
Merging r213733:
------------------------------------------------------------------------
r213733 | kongyi | 2014-07-23 10:25:02 +0100 (Wed, 23 Jul 2014) | 5 lines

ARM: Add doc for ACLE memory barrier intrinsics

Add documentations for ACLE memory barrier intrinsics, describing their motion
barrier characteristics.

------------------------------------------------------------------------

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

10 years agoMerging r213741:
Daniel Sanders [Wed, 23 Jul 2014 12:11:45 +0000 (12:11 +0000)]
Merging r213741:
------------------------------------------------------------------------
r213741 | dsanders | 2014-07-23 13:06:13 +0100 (Wed, 23 Jul 2014) | 5 lines

[mips] -mno-shared should only be given to the assembler when -fPIC/-fpic/-fPIE/-fpie is not in effect.

This fixes compiler recursion on MIPS32r2.

------------------------------------------------------------------------

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

10 years agoCreating release_35 branch
Bill Wendling [Tue, 22 Jul 2014 03:15:50 +0000 (03:15 +0000)]
Creating release_35 branch

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

10 years agoSema: correct handling for __va_start for WoA
Saleem Abdulrasool [Tue, 22 Jul 2014 02:01:04 +0000 (02:01 +0000)]
Sema: correct handling for __va_start for WoA

Windows ARM indicates __va_start as a variadic function.  However, the function
itself is treated as having 4 formal arguments:
  - (out) pointer to the va_list
  - (in) address of the last named argument
  - (in) slot size for the type of the last argument
  - address of the last named argument

The last argument does not seem to have any bearing on codegen, and thus is not
explicitly type checked at this point.

Unlike the previous handling for __va_start, it does not currently validate if
the parameter is the last named parameter (it seems that MSVC currently accepts
this).

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

10 years agoAvoid crash if default argument parsed with errors.
Serge Pavlov [Tue, 22 Jul 2014 01:54:49 +0000 (01:54 +0000)]
Avoid crash if default argument parsed with errors.

If function parameters have default values, and that of the second
parameter is parsed with errors, function declaration would have
a parameter without default value that follows a parameter with
that. Such declaration breaks logic of selecting overloaded
function. As a solution, put opaque object as default value in such case.

This patch fixes PR20055.

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

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

10 years ago-fms-extensions: Implement half of #pragma init_seg
Reid Kleckner [Tue, 22 Jul 2014 00:53:05 +0000 (00:53 +0000)]
-fms-extensions: Implement half of #pragma init_seg

Summary:
This pragma is very rare.  We could *hypothetically* lower some uses of
it down to @llvm.global_ctors, but given that GlobalOpt isn't able to
optimize prioritized global ctors today, there's really no point.

If we wanted to do this in the future, I would check if the section used
in the pragma started with ".CRT$XC" and had up to two characters after
it.  Those two characters could form the 16-bit initialization priority
that we support in @llvm.global_ctors.  We would have to teach LLVM to
lower prioritized global ctors on COFF as well.

This should let us compile some silly uses of this pragma in WebKit /
Blink.

Reviewers: rsmith, majnemer

Subscribers: cfe-commits

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

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

10 years agoclang-cl: ignore /showIncludes when combined with /E (PR20336)
Hans Wennborg [Mon, 21 Jul 2014 23:42:07 +0000 (23:42 +0000)]
clang-cl: ignore /showIncludes when combined with /E (PR20336)

Both /showIncludes and /E write to stdout. Allowing both results
in interleaved output and an error when double-closing the file
descriptor, intended to catch issues like this.

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

10 years agoRename metadata llvm.loop.vectorize.unroll to llvm.loop.vectorize.interleave.
Mark Heffernan [Mon, 21 Jul 2014 23:10:56 +0000 (23:10 +0000)]
Rename metadata llvm.loop.vectorize.unroll to llvm.loop.vectorize.interleave.

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

10 years agoclang-format vs plugin: set version number from cmake (PR20307)
Hans Wennborg [Mon, 21 Jul 2014 21:48:06 +0000 (21:48 +0000)]
clang-format vs plugin: set version number from cmake (PR20307)

Previously it was hard-coded to 1.0, which meant the installer would
not install the plugin over previous versions.

This commit makes us use LLVM's major.minor.patch version from cmake,
or whatever CLANG_FORMAT_VS_VERSION is set to when configuring the build.

It's pretty dirty to update a configuration file in the source directory
from the cmake build like this. However, the plugin build is already
dirty in this regard since it builds in the source dir when visual studio,
and then copies out the resulting vsix.

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

10 years agoRevert "Emit lifetime.start / lifetime.end markers for unnamed temporary objects."
Arnaud A. de Grandmaison [Mon, 21 Jul 2014 19:47:02 +0000 (19:47 +0000)]
Revert "Emit lifetime.start / lifetime.end markers for unnamed temporary objects."

This commit did break the sanitizer-x86 bot. Revert it while
investigating.

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

10 years agoFix build breakage caused by use of std::to_string(int). Replace with raw_string_ost...
Mark Heffernan [Mon, 21 Jul 2014 19:06:29 +0000 (19:06 +0000)]
Fix build breakage caused by use of std::to_string(int).  Replace with raw_string_ostream.

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

10 years agoEmit lifetime.start / lifetime.end markers for unnamed temporary objects.
Arnaud A. de Grandmaison [Mon, 21 Jul 2014 18:54:21 +0000 (18:54 +0000)]
Emit lifetime.start / lifetime.end markers for unnamed temporary objects.

This will give more information to the optimizers so that they can reuse stack slots.

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

10 years agoAdd support for '#pragma unroll'.
Mark Heffernan [Mon, 21 Jul 2014 18:08:34 +0000 (18:08 +0000)]
Add support for '#pragma unroll'.

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

10 years agoSema: Handle C11 atomics when diagnosing out of range comparisons
Justin Bogner [Mon, 21 Jul 2014 18:01:53 +0000 (18:01 +0000)]
Sema: Handle C11 atomics when diagnosing out of range comparisons

This fixes a couple of asserts when analyzing comparisons involving
C11 atomics that were uncovered by r205608 when we extended the
applicability of -Wtautological-constant-out-of-range-compare.

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

10 years ago[OPENMP] Initial parsing and sema analysis for 'flush' directive.
Alexey Bataev [Mon, 21 Jul 2014 11:26:11 +0000 (11:26 +0000)]
[OPENMP] Initial parsing and sema analysis for 'flush' directive.

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

10 years ago[OPENMP] Parsing/Sema of the OpenMP directive 'critical'.
Alexander Musman [Mon, 21 Jul 2014 09:42:05 +0000 (09:42 +0000)]
[OPENMP] Parsing/Sema of the OpenMP directive 'critical'.

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

10 years agoTrivial doc fixes: add missing whitespace, and s/overriden/overridden/g.
James Dennett [Mon, 21 Jul 2014 06:14:27 +0000 (06:14 +0000)]
Trivial doc fixes: add missing whitespace, and s/overriden/overridden/g.

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

10 years agoAdd clang::DesignatedInitExpr::designators() for range-based access,
James Dennett [Mon, 21 Jul 2014 06:03:12 +0000 (06:03 +0000)]
Add clang::DesignatedInitExpr::designators() for range-based access,
with overloads for designators_range and designators_const_range.

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

10 years agoAdd missing initialization found due to a valgrind false positive.
Richard Smith [Mon, 21 Jul 2014 05:27:31 +0000 (05:27 +0000)]
Add missing initialization found due to a valgrind false positive.
This field is never inspected in the object state initialized by this
constructor; however, initializing it seems reasonable, since it has
a meaningful value.

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

10 years ago[modules] Fix some of the confusion when computing the override set for a macro
Richard Smith [Mon, 21 Jul 2014 04:10:40 +0000 (04:10 +0000)]
[modules] Fix some of the confusion when computing the override set for a macro
introduced by finalization. This is still not entirely correct; more fixes to
follow.

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

10 years ago[OPENMP] Added several test cases for clauses 'ordered' and 'nowait': if there are...
Alexey Bataev [Mon, 21 Jul 2014 02:45:36 +0000 (02:45 +0000)]
[OPENMP] Added several test cases for clauses 'ordered' and 'nowait': if there are more than one 'nowait' or 'ordered' clause an error message is expected.

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

10 years ago[PowerPC] Optimize passing certain aggregates by value
Ulrich Weigand [Mon, 21 Jul 2014 00:56:36 +0000 (00:56 +0000)]
[PowerPC] Optimize passing certain aggregates by value

In addition to enabling ELFv2 homogeneous aggregate handling,
LLVM support to pass array types directly also enables a performance
enhancement.  We can now pass (non-homogeneous) aggregates that fit
fully in registers as direct integer arrays, using an element type
to encode the alignment requirement (that would otherwise go to the
"byval align" field).

This is preferable since "byval" forces the back-end to write the
aggregate out to the stack, even if it could be passed fully in
registers.  This is particularly annoying on ELFv2, if there is
no parameter save area available, since we then need to allocate
space on the callee's stack just to hold those aggregates.

Note that to implement this optimization, this patch does not attempt
to fully anticipate register allocation rules as (defined in the
ABI and) implemented in the back-end.  Instead, the patch is simply
passing *any* aggregate passed by value using the array mechanism
if its size is up to 64 bytes.   This means that some of those will
end up being passed in stack slots anyway, but the generated code
shouldn't be any worse either.  (*Large* aggregates remain passed
using "byval" to enable optimized copying via memcpy etc.)

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

10 years ago[PowerPC] Support the ELFv2 ABI
Ulrich Weigand [Mon, 21 Jul 2014 00:48:09 +0000 (00:48 +0000)]
[PowerPC] Support the ELFv2 ABI

This patch implements clang support for the PowerPC ELFv2 ABI.
Together with a series of companion patches in LLVM, this makes
clang/LLVM fully usable on powerpc64le-linux.

Most of the ELFv2 ABI changes are fully implemented on the LLVM side.
On the clang side, we only need to implement some changes in how
aggregate types are passed by value.   Specifically, we need to:
- pass (and return) "homogeneous" floating-point or vector aggregates in
  FPRs and VRs (this is similar to the ARM homogeneous aggregate ABI)
- return aggregates of up to 16 bytes in one or two GPRs

The second piece is trivial to implement in any case.  To implement
the first piece, this patch makes use of infrastructure recently
enabled in the LLVM PowerPC back-end to support passing array types
directly, where the array element type encodes properties needed to
handle homogeneous aggregates correctly.

Specifically, the array element type encodes:
- whether the parameter should be passed in FPRs, VRs, or just
  GPRs/stack slots  (for float / vector / integer element types,
  respectively)
- what the alignment requirements of the parameter are when passed in
  GPRs/stack slots  (8 for float / 16 for vector / the element type
  size for integer element types) -- this corresponds to the
  "byval align" field

With this support in place, the clang part simply needs to *detect*
whether an aggregate type implements a float / vector homogeneous
aggregate as defined by the ELFv2 ABI, and if so, pass/return it
as array type using the appropriate float / vector element type.

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

10 years agoIf a module build reports errors, don't try to load it
Ben Langmuir [Sat, 19 Jul 2014 16:29:28 +0000 (16:29 +0000)]
If a module build reports errors, don't try to load it

... just to find out that it didn't build.

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

10 years agoRevert D3908 due to issues on Mac platforms
Viktor Kutuzov [Sat, 19 Jul 2014 05:58:38 +0000 (05:58 +0000)]
Revert D3908 due to issues on Mac platforms

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

10 years agoCleanup comparisons to VariableArrayType::Static for non-VLAs
Hal Finkel [Sat, 19 Jul 2014 02:13:40 +0000 (02:13 +0000)]
Cleanup comparisons to VariableArrayType::Static for non-VLAs

The enum is part of ArrayType, so there is no functional change, but comparing
to ArrayType::Static for non-VLAs makes more sense.

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

10 years agoTypePrinter should not ignore IndexTypeCVRQualifiers on constant-sized arrays
Hal Finkel [Sat, 19 Jul 2014 02:01:03 +0000 (02:01 +0000)]
TypePrinter should not ignore IndexTypeCVRQualifiers on constant-sized arrays

C99 array parameters can have index-type CVR qualifiers, and the TypePrinter
should print them when present (and we were not for constant-sized arrays).
Otherwise, we'd drop the restrict in:

  int foo(int a[restrict static 3]) { ... }

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

10 years agoUse the dereferenceable attribute on C99 array parameters with static
Hal Finkel [Sat, 19 Jul 2014 01:41:07 +0000 (01:41 +0000)]
Use the dereferenceable attribute on C99 array parameters with static

In C99, an array parameter declarator might have the form:
  direct-declarator '[' 'static' type-qual-list[opt] assign-expr ']'

where the static keyword indicates that the caller will always provide a
pointer to the beginning of an array with at least the number of elements
specified by the assignment expression. For constant sizes, we can use the
new dereferenceable attribute to pass this information to the optimizer. For
VLAs, we don't know the size, but (for addrspace(0)) do know that the pointer
must be nonnull (and so we can use the nonnull attribute).

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

10 years agoPR20356: Fix all Sema warnings with mismatched ext_/warn_ versus
Richard Smith [Sat, 19 Jul 2014 01:39:17 +0000 (01:39 +0000)]
PR20356: Fix all Sema warnings with mismatched ext_/warn_ versus
ExtWarn/Warnings. Mostly the name of the warning was changed to match the
semantics, but in the PR20356 cases, the warning was about valid code, so the
diagnostic was changed from ExtWarn to Warning instead.

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

10 years agoclang/test/Misc/backend-optimization-failure.cpp: Appease to add -triple=x86_64.
NAKAMURA Takumi [Sat, 19 Jul 2014 01:17:32 +0000 (01:17 +0000)]
clang/test/Misc/backend-optimization-failure.cpp: Appease to add -triple=x86_64.

FIXME: Could this be made generic?

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

10 years agoRemove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ".reset()"
David Blaikie [Sat, 19 Jul 2014 01:06:45 +0000 (01:06 +0000)]
Remove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ".reset()"

It's also possible to just write "= nullptr", but there's some question
of whether that's as readable, so I leave it up to authors to pick which
they prefer for now. If we want to discuss standardizing on one or the
other, we can do that at some point in the future.

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

10 years ago[MS-ABI] Assign SEH handler indices to __try blocks
Warren Hunt [Sat, 19 Jul 2014 00:45:07 +0000 (00:45 +0000)]
[MS-ABI] Assign SEH handler indices to __try blocks
Assigns indices to try blocks. These indices will used in constructing
tables that the mscrt function __except_handler3 reads during SEH.
Testing will occur once we actually emit the tables, in a subsequent
patch.

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