For NetBSD/current on X86 do not use libgcc and default to libc++.
Adjust linkage to make more sense for older releases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192615 91177308-0d34-0410-b5e6-96231b3b80d8
Correctly check for distructors when realizing vtordisps

This patch fixes the distructor test when checking for vtordisp requirements in 
microsoft record layout.  A test case is also included.

Addresses:
http://llvm.org/bugs/show_bug.cgi?id=16406#c7



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192616 91177308-0d34-0410-b5e6-96231b3b80d8
Fixing stdout/stderr interleaving in lit test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192625 91177308-0d34-0410-b5e6-96231b3b80d8
PR17576: Fix assertion on polymorphic classes with small alignment

We have to reserve at least the width of a pointer for the vfptr.  For
classes with small alignment, we weren't reserving enough space, and
were overlapping the first field with the vfptr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192626 91177308-0d34-0410-b5e6-96231b3b80d8
Adding a regression test for PR17578. It is marked xfail until the bug is fixed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192638 91177308-0d34-0410-b5e6-96231b3b80d8
Switching some custom logic to using table-generated helper methods.  This also removes an unnecessary diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192639 91177308-0d34-0410-b5e6-96231b3b80d8
Trivial formatting changes; no functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192640 91177308-0d34-0410-b5e6-96231b3b80d8
Provide a dummy NetBSD tree and use --sysroot in the driver test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192641 91177308-0d34-0410-b5e6-96231b3b80d8
Add has_feature support for reflecting the presence of refined Objective-C ABI mangling for qualified id<...>.  Fixes <rdar://problem/14799110>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192643 91177308-0d34-0410-b5e6-96231b3b80d8
PR17567: Improve diagnostic for a mistyped constructor name. If we see something
that looks like a function declaration, except that it's missing a return type,
try typo-correcting it to the relevant constructor name.

In passing, fix a bug where the missing-type-specifier recovery codepath would
drop a preceding scope specifier on the floor, leading to follow-on diagnostics
and incorrect recovery for the auto-in-c++98 hack.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192644 91177308-0d34-0410-b5e6-96231b3b80d8
ObjectiveC migrator: Support for more possibility of
migration to NS_ENUM/NS_OPTIONS macros; when
typedef'ed to NSInteger/NSUInteger preceeds well
before of the enum declaration. // rdar://15201056


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192645 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-cxxabi] Fix assert in unspecified inheritance memptr emission

If a class is using the unspecified inheritance model for member
pointers and later we find the class is defined to use single
inheritance, zero out the vbptr offset field of the member pointer when
it is formed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192664 91177308-0d34-0410-b5e6-96231b3b80d8
Tidy up and improve error recovery for C++11 attributes in bad places. Based on
a patch by Michael Han.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192666 91177308-0d34-0410-b5e6-96231b3b80d8
Document the presence of the new Objective-C++ mangling for qualified-id.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192670 91177308-0d34-0410-b5e6-96231b3b80d8
Correctly skip type sugar when determining the width of an enum type. Derived
from a patch by Justin Bogner.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192671 91177308-0d34-0410-b5e6-96231b3b80d8
Special case '%C' handling in ObjC format strings to handle integer literals that can represent unicode characters

Fixes <rdar://problem/13991617>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192673 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Consider it an error to apply __builtin_offsetof to a member in a virtual base

icc 13 and g++ 4.9 both reject this while we would crash.

Fixes PR17578.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192674 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Driver/netbsd.c*: Tweak path separators to be matched on win32 driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192676 91177308-0d34-0410-b5e6-96231b3b80d8
docs: Remove incompatibility with Solaris shell

There doesn't seem to be a need in checking if a directory exists if we
will just rm -rf it once we affirm that it does.  Instead, just blindly
try to delete it.

This fixes PR17541.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192680 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Don't crash when __try/__except/__finally appears in a template function

We wouldn't transform the compound statement in any of these forms,
causing crashes when it got time to act on them.  Additionally, we
wouldn't check to see if the handler was invalid before deciding whether
or not we should continue acting on the __try.

This fixes PR17584.


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