C++1y: support for 'switch' statements in constexpr functions. This is somewhat
inefficient; we perform a linear scan of switch labels to find the one matching
the condition, and then walk the body looking for that label. Both parts should
be straightforward to optimize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181671 91177308-0d34-0410-b5e6-96231b3b80d8
Debug Info: Comment changes in r181393 by request of echristo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181672 91177308-0d34-0410-b5e6-96231b3b80d8
Fix stack overflow in linkage computation when a function with a deduced return
type returns a lambda defined within itself. The computation of linkage for the
function looked at the linkage of the lambda, and vice versa.

This is solved by not checking whether an 'auto' in a function return type
deduces to a type with unique external linkage. We don't need this check,
because the type deduced for 'auto' doesn't affect whether two
otherwise-identical declarations would name different functions, so we don't
need to give an ostensibly external-linkage function internal linkage for this
reason. (We also don't need unique-external linkage in C++11 onwards at all,
but that's not implemented yet.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181675 91177308-0d34-0410-b5e6-96231b3b80d8
Downgrade C++14 "Clarifying memory allocation". We perform non-conforming
optimizations -- in particular, globalopt will remove calls to ::operator
new(size_t) that did not come from new-expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181676 91177308-0d34-0410-b5e6-96231b3b80d8
Cleanup handling of UniqueExternalLinkage.

This patch renames getLinkage to getLinkageInternal. Only code that
needs to handle UniqueExternalLinkage specially should call this.

Linkage, as defined in the c++ standard, is provided by
getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage.

Most places in the compiler actually want isExternallyVisible, which
handles UniqueExternalLinkage as internal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181677 91177308-0d34-0410-b5e6-96231b3b80d8
Add missing triple to CodeGen test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181679 91177308-0d34-0410-b5e6-96231b3b80d8
Update for LLVM interface change in r181680.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181681 91177308-0d34-0410-b5e6-96231b3b80d8
OpenMP threadprivate with qualified names.

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