fix a test-only leak found by lsan, PR19521

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207223 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Reland r206934 with a hopefully fixed test"

This reverts commit r207155.
The test was still failing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207225 91177308-0d34-0410-b5e6-96231b3b80d8
Improve ownership of ASTUnits in libTooling by using std::unique_ptr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207229 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: pass -debug flag to the linker when compiling with debug info

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207233 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: /fallback only applies to C or C++ files

We would previously hit an assert if using /fallback with an .ll file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207234 91177308-0d34-0410-b5e6-96231b3b80d8
Push unique_ptr ownership of ASTUnits further back into their factories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207237 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: Refactor linkage/visibility calculation

It turns out that linkage and visibility have rather similar logic for
both functions and non-variable globals.  Split the calculation out so
that both sides may share this code.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207239 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: Cleanup variable linkage calculation

Almost all linkage calculation for VarDecls occured inside of
GetLLVMLinkageVarDefinition except for static data members.  Centralize
the logic so that it can be more readily reused.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207241 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: replace use of @llvm.arm.sevl with @llvm.arm.hint

Use the new generic @llvm.arm.hint hint intrinsic rather than the specialised
@llvm.arm.sevl hint instruction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207243 91177308-0d34-0410-b5e6-96231b3b80d8
PR19558: don't produce an "unused variable" warning for a variable template partial specialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207260 91177308-0d34-0410-b5e6-96231b3b80d8
Fix leak of GlobalModuleIndex::IdentifierIndex, found by LSan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207262 91177308-0d34-0410-b5e6-96231b3b80d8
Print detailed vector type information on diagnostics.

We never aka vector types because our attributed syntax for it is less
comprehensible than the typedefs. This leaves the user in the dark when
the typedef isn't named that well.

Example:
  v2s v; v4f w;
  w = v;

The naming in this cases isn't even that bad, but the error we give is
useless without looking up the actual typedefs.
t.c:6:5: error: assigning to 'v4f' from incompatible type 'v2s'

Now:
t.c:6:5: error: assigning to 'v4f' (vector of 4 'float' values) from
    incompatible type 'v2s' (vector of 2 'int' values)

We do this for all diagnostics that print a vector type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207267 91177308-0d34-0410-b5e6-96231b3b80d8
Make test pass on 32 bit architectures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207268 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: add __yield intrinsic for ARM

The __yield intrinsic generates a hint instruction to indicate that the thread
is not performing any useful operations at the moment.  This is for
compatibility with MSVC, although, the intrinsic is also part of the ACLE, and
is enabled globally as a result.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207275 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed Assert In CGRecordLowering
Prior to this patch, CGRecordLower assumed that virtual bases could not 
be placed before the nvsize of an object.  This isn't true in Itanium 
mode, virtual bases are placed at dsize rather than vnsize and in the 
case of zero sized non-virtual bases nvsize can be larger than dsize.  
This patch fixes CGRecordLowering to avoid an assert and to clip 
bitfields properly in this case.  A test case is included.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207280 91177308-0d34-0410-b5e6-96231b3b80d8
Add mangling for attribute enable_if. The demangling patch for libcxxabi is still in review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207296 91177308-0d34-0410-b5e6-96231b3b80d8
libclang: remove 'CXDiagnostic_Remark'

The change was landed without review or test cases.

It trivially broke almost any stable application checking for Severity >=
CXDiagnostic_Error or indeed any other kind of severity comparison upon
encountering a 'remark'.

Mapped to CXDiagnostic_Warning until a workable solution is proposed to the
list that preserves API stability.

(It's also not clear why the rest of r202475 wasn't simply implemented as a
modifier to the existing 'warning' level.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207319 91177308-0d34-0410-b5e6-96231b3b80d8
[Sema] Adjust Sema::getCurBlock()/getCurLambda() to take into account that we may have
switch CurContext due to class template instantiation.

Fixes crash of the included test case.
rdar://16527205

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207325 91177308-0d34-0410-b5e6-96231b3b80d8
[SemaObjC] Fix ObjCInterfaceDecl::inheritsDesignatedInitializers(), if there are no
designated initializers in the super class hierarchy then it should return false.

rdar://16692535

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207332 91177308-0d34-0410-b5e6-96231b3b80d8
c-arcmt-test/Makefile: Update USEDLIBS for -static.

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