-ms-extensions: Allow __super in return stements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219050 91177308-0d34-0410-b5e6-96231b3b80d8
Emit @llvm.assume for non-parameter lvalue align_value-attribute loads

We already add the align parameter attribute for function parameters that have
the align_value attribute (or those with a typedef type having that attribute),
which is an important special case, but does not handle pointers with value
alignment assumptions that come into scope in any other way. To handle the
general case, emit an @llvm.assume-based alignment assumption whenever we load
the pointer-typed lvalue of an align_value-attributed variable (except for
function parameters, which we already deal with at entry).

I'll also note that this is more general than Intel's described support in:
  https://software.intel.com/en-us/articles/data-alignment-to-assist-vectorization
which states that the compiler inserts __assume_aligned directives in response
to align_value-attributed variables only for function parameters and for the
initializers of local variables. I think that we can make the optimizer deal
with this more-general scheme (which could lead to a lot of calls to
@llvm.assume inside of loop bodies, for example), but if not, I'll rework this
to be less aggressive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219052 91177308-0d34-0410-b5e6-96231b3b80d8
Return a reference instead of vector copy for parentmap queries.

The map is immutable until the whole ASTContext dies. While there
movify a couple of copies in ASTMatchFinder away. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219062 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Implement thread_local for global variables

Summary:
This add support for the C++11 feature, thread_local global variables.
The ABI Clang implements is an improvement of the MSVC ABI.  Sadly,
further improvements could be made but not without sacrificing ABI
compatibility.

The feature is implemented as follows:
- All thread_local initialization routines are pointed to from the
  .CRT$XDU section.
- All non-weak thread_local variables have their initialization routines
  call from a single function instead of getting their own .CRT$XDU
  section entry.  This is done to open up optimization opportunities to
  the compiler.
- All weak thread_local variables have their own .CRT$XDU section entry.
  This entry is in a COMDAT with the global variable it is initializing;
  this ensures that we will initialize the global exactly once.
- Destructors are registered in the initialization function using
  __tlregdtor.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219074 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Use '1' (instead of '0') relative scope discriminators

This changes the scope discriminator's behavior to start at '1' instead
of '0'.  Symbol table diffing, for ABI compatibility testing, kept
finding these as false positives.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219075 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Make comment more accurate

The ABI for function-scope statics changed in VS "14", not MSVC 2013.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219076 91177308-0d34-0410-b5e6-96231b3b80d8
Merge branch 'master', remote-tracking branch 'trunk/master'
DebugInfo: Don't include member function template specializations in the list of class members

By leaving these members out of the member list, we avoid them being
emitted into type unit definitions - while still allowing the
definition/declaration to be injected into the compile unit as expected.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219100 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Don't include implicit special members in the list of class members

By leaving these members out of the member list, we avoid them being
emitted into type unit definitions - while still allowing the
definition/declaration to be injected into the compile unit as expected.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219101 91177308-0d34-0410-b5e6-96231b3b80d8
Add FIXME/notes to the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219104 91177308-0d34-0410-b5e6-96231b3b80d8
Merge branch 'master', remote-tracking branch 'trunk/master'
[OPENMP] Limit the loop counters to 64 bits for the worksharing loops

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219113 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Fix target triple of a test, which uses __int128 type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219114 91177308-0d34-0410-b5e6-96231b3b80d8
Using an explicit cast to work around MSVC 2013 not picking the conversion operator as expected. NFC, should fix the MSVC build bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219116 91177308-0d34-0410-b5e6-96231b3b80d8
Fix bug in DynTypedMatcher::constructVariadic() that would cause false negatives.

Summary:
DynTypedMatcher::constructVariadic() where the restrict kind of the
different matchers are not related causes the matcher to have a "None"
restrict kind. This causes false negatives for anyOf and eachOf.
Change the logic to get a common ancestor if there is one.
Also added regression tests that fail without the fix.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219118 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: If in doubt, assume '+' is a binary operator.

Before:
  #define LENGTH(x, y) (x) - (y)+1

After:
  #define LENGTH(x, y) (x) - (y) + 1

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219119 91177308-0d34-0410-b5e6-96231b3b80d8
Patch to wrap up '_' as separator in version numbers
in availability attribute by preserving this info.
in VersionTuple and using it in pretty printing of attributes
and yet using '.' as separator when diagnosing unavailable 
message calls. rdar://18490958


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219124 91177308-0d34-0410-b5e6-96231b3b80d8
Turn on the integrated assembler by default for ppc64 and
ppc64le.

Reviewed by Hal Finkel and Bill Schmidt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219129 91177308-0d34-0410-b5e6-96231b3b80d8
Remove cases that are now handled by the parent class implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219132 91177308-0d34-0410-b5e6-96231b3b80d8
[PATCH][Power] Fix (and deprecate) vec_lvsl and vec_lvsr for little endian

The use of the vec_lvsl and vec_lvsr interfaces are discouraged for
little endian targets since Power8 hardware is a minimum requirement,
and Power8 provides reasonable performance for unaligned vector loads
and stores.  Up till now we have not provided "correct" (i.e., big-
endian-compatible) code generation for these interfaces, as to do so
produces poorly performing code.  However, this has become the source
of too many questions.

With this patch, LLVM will now produce compatible code for these
interfaces, but will also produce a deprecation warning message for
PPC64LE when one of them is used.  This should make the porting direction
clearer to programmers.  A similar patch has recently been committed to
GCC.

This patch includes a test for the warning message.  There is a companion
patch that adds two unit tests to projects/test-suite.


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