Don't return a pointer to a temporary std::string's c_str.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197157 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid temporary std::string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197160 91177308-0d34-0410-b5e6-96231b3b80d8
Switch to the new MingW ABI.

GCC 4.7 changed the MingW ABI. On the clang side this means that methods now
have the thiscall calling convention by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197164 91177308-0d34-0410-b5e6-96231b3b80d8
[Modules] Don't parse any module map if modules are disabled.

Fixes rdar://15644663.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197165 91177308-0d34-0410-b5e6-96231b3b80d8
Make this test pass on Release builds.

On Assert builds the "call" was matching the variable name in
%call = call ...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197167 91177308-0d34-0410-b5e6-96231b3b80d8
With the new update to the ABI, we should not look for installations
of MinGW older than 4.7 with incompatible C++ libraries.

This patch makes clang look for all MinGW versions from 4.7:

  4.7.0, 4.7.1, 4.7.2, 4.7.3
  4.8.0, 4.8.1, 4.8.2.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197176 91177308-0d34-0410-b5e6-96231b3b80d8
Unify type trait parsing

Type trait parsing is all over the place at the moment with unary, binary and
n-ary C++11 type traits that were developed independently at different points
in clang's history.

There's no good reason to handle them separately -- there are three parsers,
three AST nodes and lots of duplicated handling code with slightly different
implementations and diags for each kind.

This commit unifies parsing of type traits and sets the stage for further
consolidation.

No change in behaviour other than more consistent error recovery.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197179 91177308-0d34-0410-b5e6-96231b3b80d8
Replace use of Triple::getEnvironmentName with the simpler
Triple::getEnvironment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197181 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-abi] Refactoring Non-virtual base layout in record layout

This refactor addresses bugzilla bug 18167 and simplifies the code at 
the same time.  Also I add a test case for the bug.  Also I make a 
non-functional change to the basic layout lit tests to make them more 
reliable (using CHECK-NEXT instead of CHECK).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197183 91177308-0d34-0410-b5e6-96231b3b80d8
[-cxx-abi microsoft] Mangle reference temporaries

They are mangled the same as normal references, nothing special is going
on here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197184 91177308-0d34-0410-b5e6-96231b3b80d8
PR18229: Fix typo in assert condition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197185 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-abi] Fixing bitfields sema arror for ms-mode

The check for bitfields that are longer than their base type needed to 
be checked in microsoft mode (cl.exe does not support the C++ extnetion 
for bitfields longer than their type).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197186 91177308-0d34-0410-b5e6-96231b3b80d8
Enhance "auto synthesis will not synthesize property in protocol" to include property and protocol name.

Implements <rdar://problem/15617839>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197187 91177308-0d34-0410-b5e6-96231b3b80d8
Remove getVTT* in favor of getStructorImplicitParameter*

No functionality change.  The only remaining uses were in ItaniumCXXABI,
which knows the implicit parameter is a VTT.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197189 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "[-cxx-abi microsoft] Mangle reference temporaries"

This reverts commit r197184.

Richard Smith brings up some good points, a proper implementation will
require us to mangle unnameable entities compatibly with MSVC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197192 91177308-0d34-0410-b5e6-96231b3b80d8
[-cxx-abi microsoft] Add commentary for mangleStaticGuardVariable

We will need to do some work here if we want to play nice with MSVC2013.
Add a TODO indicating what changed and why this matters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197193 91177308-0d34-0410-b5e6-96231b3b80d8
Move C++ destructor emission into CGCXXABI

No functionality change.  Only Itanium C++ destructors have implicit VTT
parameters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197194 91177308-0d34-0410-b5e6-96231b3b80d8
AST: Update URL for Itanium ABI spec

The old URL hasn't worked for quite some time.  While we are here, also
change the link so that it will send us straight to the mangling portion
of the ABI doc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197195 91177308-0d34-0410-b5e6-96231b3b80d8
[-cxx-abi microsoft] Remove trailing spaces from the mangler

No functional change, just a tidying up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197196 91177308-0d34-0410-b5e6-96231b3b80d8
[objc] If we don't know for sure what the designated initializers of the superclass are,
assume that a [super init..] inside a designated initializer also refers to a designated one
and do not warn.

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