PR15966: don't get confused by a complex integer -> complex integer conversion
and misclassify it as a complex-real conversion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181626 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid patching storage class for block scope thread_local variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181627 91177308-0d34-0410-b5e6-96231b3b80d8
ObjC debug info: Substitute the class type for methods that return
a related type (e.g., if they use the instancetype keyword).

rdar://problem/13359718

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181629 91177308-0d34-0410-b5e6-96231b3b80d8
PR14992: Debug Info: Support more non-type template parameters

* Provide DW_TAG_template_value_parameter for pointers, function
  pointers, member pointers, and member function pointers (still missing
  support for template template parameters which GCC encodes as a
  DW_TAG_GNU_template_template_param)
* Provide values for all but the (member & non-member) function pointer case.
  Simple constant integer values for member pointers (offset within the
  object) and address for the value pointer case. GCC doesn't provide a
  value for the member function pointer case so I'm not sure how, if at
  all, GDB supports encoding that. & non-member function pointers should
  follow shortly in a subsequent patch.
* Null pointer value encodings of all of these types, including
  correctly encoding null data member pointers as -1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181634 91177308-0d34-0410-b5e6-96231b3b80d8
[Modules] Extend Darwin hack to include the modification time of SystemVersion.plist.

Fixes <rdar://problem/13856838>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181635 91177308-0d34-0410-b5e6-96231b3b80d8
[Modules] When things go horribly wrong when reading a module, point at the module cache.

Sometimes people hack on their system headers. In such cases, they'll
need to delete their module cache, but may not know where it is. Add a
note to show them where it is.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181638 91177308-0d34-0410-b5e6-96231b3b80d8
[Modules] Make r180934 more efficient by only loading top-level module maps in system header directories.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181643 91177308-0d34-0410-b5e6-96231b3b80d8
Debug Info: Silently accept template argument packs

We could support the GCC extension DW_TAG_GNU_template_parameter_pack if
we're feeling adventurous, at some point - but I don't think GDB's doing
anything useful with it yet anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181644 91177308-0d34-0410-b5e6-96231b3b80d8
Debug Info: correct comment

Eric's code review feedback to r181644

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181650 91177308-0d34-0410-b5e6-96231b3b80d8
C++1y deduced return types: when we deduce a return type for a function which
we loaded from PCH, if we're building another PCH, create an update record to
patch the return type of the earlier declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181659 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Add -mldc1-sdc1 / -mno-ldc1-sdc1 command line options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181660 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: Refactor SetLLVMFunctionAttributesForDefinition to use an AttrBuilder.

Adding attributes to a uniqued set has become expensive, don't do it more often
than necessary. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181662 91177308-0d34-0410-b5e6-96231b3b80d8
C++1y: provide full 'auto' return type deduction for lambda expressions. This
completes the implementation of N3638.


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