PR20473: Don't "deduplicate" string literals with the same value but different
lengths! In passing, simplify string literal deduplication by relying on LLVM
to deduplicate the underlying constant values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214222 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format vs plugin: include the license

The vsix installer will show the license when it starts, and it
would print an annoying message when there was none.

While we're here, add a MoreInfoUrl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214237 91177308-0d34-0410-b5e6-96231b3b80d8
[modules] Factor out ODR checking, to avoid unnecessary repeated work in
finishPendingActions loop.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214246 91177308-0d34-0410-b5e6-96231b3b80d8
Not all instantiated variable is odr-used. Do not mark non-odr-used variable template specializations as such.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214267 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Consider alignment attributes on typedefs for layout

The MS ABI has a notion of 'required alignment' for fields; this
alignment supercedes pragma pack directives.

MSVC takes into account alignment attributes on typedefs when
determining whether or not a field has a certain required alignment.

Do the same in clang by tracking whether or not we saw such an attribute
when calculating the type's bitwidth and alignment.

This fixes PR20418.

Reviewers: rnk

Differential Revision: http://reviews.llvm.org/D4714

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214274 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a use after free bug.

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

Thanks to David Balkie for the suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214286 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Mangle alias templates used as template-template arguments

A templated using declaration may be used as a template-template
argument.

Unfortunately, the VS "14" chooses '?' as the sole marker for the
argument.  This is problematic because it presupposes the possibility of
using more than one template-aliases as arguments to the same template.

This fixes PR20047.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214290 91177308-0d34-0410-b5e6-96231b3b80d8
Fix some cases of incorrect handling of lifetime extended temporaries.

MaterializeTemporaryExpr already contains information about the lifetime
of the temporary; if the lifetime is not the full statement, we do not
want to emit a destructor at the end of the full statement for it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214292 91177308-0d34-0410-b5e6-96231b3b80d8
AST: Simplify some code

Iterator invalidation issues already force us to do one lookup and one
insert.
Don't use the particular bit-pattern of the 'Align' field to determine
whether or not we have already inserted into the TypeInfo DenseMap;
instead ask for an iterator to the TypeInfo entry.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214293 91177308-0d34-0410-b5e6-96231b3b80d8
[Driver][Mips] Add function-wrapper so simplify creation of `Multilib` objects.

No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214294 91177308-0d34-0410-b5e6-96231b3b80d8
Suppress clang/test/Sema/struct-packed-align.c for targeting LLP64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214298 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Understand 'typename' in placement new.

Before:
  new (aaaaaaaaaaaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaa)) typename aaaaaaaaaaaaaaaaaaaaaaaa();

After:
  new (aaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa))
      typename aaaaaaaaaaaaaaaaaaaaaaaa();

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214300 91177308-0d34-0410-b5e6-96231b3b80d8
Suppress clang/test/Sema/struct-packed-align.c also on msvc for investigating.

FIXME: This test is incompatible to MS compat mode.
FIXME: Don't suppress this also on mingw. :-p

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214301 91177308-0d34-0410-b5e6-96231b3b80d8
Fix OpenCL/SPIR kernel_arg_type metadata node

This fixes a bug where kernel_arg_type was always changing 'unsigned ' to 'u'
for any parameter type, including non-canonical types.

Example:
  typedef unsigned int myunsignedint;
would report:
  "myunt"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214305 91177308-0d34-0410-b5e6-96231b3b80d8
[SKX] Enabling SKX target (Skylake server chip) 
a) add SKX support to Clang driver;
b) add tests for SKX target and AVX512BW, AVX512DQ, AVX512VL features into clang driver tests

Patch by Zinovy Nis <zinovy.y.nis@intel.com>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214306 91177308-0d34-0410-b5e6-96231b3b80d8
Add OpenCL/SPIR kernel_arg_base_type metadata node

As defined in the SPIR 1.2 specification, this node behaves similarly to
kernel_arg_type but will print the underlying type name, e.g., without
typedefs.

Example:
  typedef unsigned int myunsignedint;
would report:
  'myunsignedint' in the kernel_arg_type node
  'uint' in the kernel_arg_base_type node


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214308 91177308-0d34-0410-b5e6-96231b3b80d8
[AVX512] Add set1 intrinsics

(Dropped the byte and word variants from the patch.  Turns out these are not
part of AVX512F but only AVX512BW/VL.)

Part of <rdar://problem/17688758>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214314 91177308-0d34-0410-b5e6-96231b3b80d8
[AVX512] Add some of the FP cast intrinsics

Part of <rdar://problem/17688758>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214315 91177308-0d34-0410-b5e6-96231b3b80d8
[AVX512] Add intrinsic for knot

Part of <rdar://problem/17688758>

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