Eliminate the last remaining header NDEBUG

VerifyDiagnosticConsumer is long-lived so the two additional members shouldn't
have any impact on release builds.

The clang headers are now free of NDEBUG conditionals. Let's keep it that way!

Note that they're not yet structurally stable, pending a few fixes in the LLVM
core headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196739 91177308-0d34-0410-b5e6-96231b3b80d8
Rename a variable that I missed in the previous refactoring.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196740 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64]Add missing pair intrinsics such as:
    int32_t vminv_s32(int32x2_t a) 
which should be compiled into SMINP Vd.2S,Vn.2S,Vm.2S


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196750 91177308-0d34-0410-b5e6-96231b3b80d8
[-cxx-abi microsoft] Properly mangle enums

While testing our ability to mangle large constants (PR18175), I
incidentally discovered that we did not properly mangle enums correctly.

Previously, we would append the width of the enum in bytes after the
type-tag differentiator.

This would mean "enum : short" would be mangled as 'W2' while "enum :
char" would be mangled as 'W1'.  Upon testing this with several versions
of MSVC, I found that this did not match their behavior: they always use
'W4'.

N.B.  Quick testing uncovered that undname allows different numbers to
follow the 'W' in the following way:

'W0' -> "enum char"
'W1' -> "enum unsigned char"
'W2' -> "enum short"
'W3' -> "enum unsigned short"
'W4' -> "enum"
'W5' -> "enum unsigned int"
'W6' -> "enum long"
'W7' -> "enum unsigned long"

However this scheme appears abandoned, I cannot get MSVC to trigger it.
Furthermore, it's incomplete: it doesn't handle "bool" or "long long".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196752 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid adding some decls to DeferredDeclsToEmit.

Before this patch GetOrCreateLLVMFunction would add a decl to
DeferredDeclsToEmit even when it was being called by the function trying to
emit that decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196753 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid extra error messages if method definition is inside function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196757 91177308-0d34-0410-b5e6-96231b3b80d8
Update compatibility page to list some GCC language extensions that Clang does
not support as a possible reason for choosing GCC instead of Clang (and vice
versa). Weaken some of the claimed advantages of Clang in light of GCC
improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196758 91177308-0d34-0410-b5e6-96231b3b80d8
Minor cleanup and reorg of C++ status page.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196763 91177308-0d34-0410-b5e6-96231b3b80d8
Versions of GCC newer than 4.8 exist these days =)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196765 91177308-0d34-0410-b5e6-96231b3b80d8
[-cxx-abi microsoft] Mangle large integral constants correctly

Testing has revealed that large integral constants (i.e. > INT64_MAX)
are always mangled as-if they are negative, even in places where it
would not make sense for them to be negative (like non-type template
parameters of type unsigned long long).

To address this, we change the way we model number mangling: always
mangle as-if our number is an int64_t.  This should result in correct
results when we have large unsigned numbers.

N.B.  Bizarrely, things that are 32-bit displacements like vbptr offsets
are mangled as-if they are unsigned 32-bit numbers.  This is a pretty
egregious waste of space, it would be a 4x savings if we could mangle it
like a signed 32-bit number.  Instead, we explicitly cast these
displacements to uint32_t and let the mangler proceed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196771 91177308-0d34-0410-b5e6-96231b3b80d8
Make the -Wkeyword-compat diag message more accurate

Changed from:

  keyword '__is_empty' will be treated as an identifier for the remainder of the translation unit

To:

  keyword '__is_empty' will be made available as an identifier for the remainder of the translation unit

This is a more accurate description of clang's keyword compatibility feature,
given that some of the keywords are turned into context-sensitive keywords
(e.g. REVERTIBLE_TYPE_TRAIT) rather than being fully disabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196776 91177308-0d34-0410-b5e6-96231b3b80d8
Remove old -fdiagnostics-show-name option

This had no effect since the feature was removed in r150612.

I actually miss this option, maybe we can bring it back some day.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196782 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Be more conservative about braced list column layout.

Specifically disable it for nested braced lists as it commonly can look
really weird. Eventually, we'll want to become smarter and format some of
the nested lists better.

Before:
  SomeStruct my_struct_array = {
    { aaaaaa,     aaaaaaaa,   aaaaaaaaaa, aaaaaaaaa, aaaaaaaaa,
      aaaaaaaaaa, aaaaaaaaaa, aaaaaaa,    aaa },
    { aaaa, aaaa, aaaa, aaaa, aaaa, aaaa, aaaa, aaa },
    { aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaa,      a,                 aaaaaaaaaa,
      aaaaaaaaa,         aaa },
  };

After:
  SomeStruct my_struct_array = {
    { aaaaaa, aaaaaaaa, aaaaaaaaaa, aaaaaaaaa, aaaaaaaaa, aaaaaaaaaa,
      aaaaaaaaaaaa, aaaaaaa, aaa },
    { aaaa, aaaa, aaaa, aaaa, aaaa, aaaa, aaaa, aaa },
    { aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaa, a, aaaaaaaaaa, aaaaaaaaa, aaa },
  };

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196783 91177308-0d34-0410-b5e6-96231b3b80d8
Output destructors and constructors in a more natural order.

With this patch we output the in the order
C2
C1

D2
D1
D0

Which means that a destructor or constructor that call another is output after
the callee. This is a bit easier to read IHMO and a tiny bit more efficient
as we don't put a decl in DeferredDeclsToEmit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196784 91177308-0d34-0410-b5e6-96231b3b80d8
When we decide to output a deferred decl, remember the llvm GlobalValue.

We can reuse it to avoid a DenseMap+StringMap lookup to find if it was already
emitted or not.

This fixes a 2010 TODO.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196785 91177308-0d34-0410-b5e6-96231b3b80d8
Save another call to GetAddrOfFunction.

Thread an optional GV down to EmitGlobalFunctionDefinition so that it can
avoid the lookup when we already know the corresponding llvm global value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196789 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/lit.cfg: Remove get_llc_props. check-clang itself no longer invokes llc.

Only a few tests depend on llc yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196797 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] clangDriver: Move LLVM stuff in target_link_library to LLVM_LINK_COMPONENTS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196798 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] clang/lib: Satisfy dependencies to add *actually used* libraries on target_link_libraries() and LLVM_LINK_COMPONENTS.

I will prune redundant dependencies later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196800 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] clangSema doesn't depend on LLVM CodeGen any more.

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