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
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
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
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
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
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
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
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/trunk@213769 91177308-0d34-0410-b5e6-96231b3b80d8
[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/trunk@217160 91177308-0d34-0410-b5e6-96231b3b80d8
[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/trunk@218248 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/CodeGen/mips-varargs.c: Fixup for -Asserts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218256 91177308-0d34-0410-b5e6-96231b3b80d8
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/trunk@218260 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Fix r218248's testcase to use -O1 instead of -O3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218298 91177308-0d34-0410-b5e6-96231b3b80d8
[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/trunk@220563 91177308-0d34-0410-b5e6-96231b3b80d8
[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/trunk@220566 91177308-0d34-0410-b5e6-96231b3b80d8
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/trunk@222339 91177308-0d34-0410-b5e6-96231b3b80d8