]> granicus.if.org Git - clang/log
clang
9 years agoPass SourceRange by value in a test I missed in r249259.
Craig Topper [Sun, 4 Oct 2015 05:09:13 +0000 (05:09 +0000)]
Pass SourceRange by value in a test I missed in r249259.

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

9 years agoSourceRanges are small and trivially copyable, don't them by reference.
Craig Topper [Sun, 4 Oct 2015 04:53:55 +0000 (04:53 +0000)]
SourceRanges are small and trivially copyable, don't them by reference.

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

9 years agoDiagnose const atomics in __atomic builtins.
Eric Fiselier [Sun, 4 Oct 2015 00:11:02 +0000 (00:11 +0000)]
Diagnose const atomics in __atomic builtins.

Diagnose when a pointer to const T is used as the first argument in at atomic
builtin unless that builtin is a load operation. This is already checked for
C11 atomics builtins but not for __atomic ones.

This patch was given the LGTM by rsmith when it was part
of a larger review. (See http://reviews.llvm.org/D10407)

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

9 years agoReplace double negation of !FileID.isInvalid() with FileID.isValid().
Yaron Keren [Sat, 3 Oct 2015 10:46:20 +0000 (10:46 +0000)]
Replace double negation of !FileID.isInvalid() with FileID.isValid().
+couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228.

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

9 years agofix previous commit
Saleem Abdulrasool [Sat, 3 Oct 2015 07:15:28 +0000 (07:15 +0000)]
fix previous commit

Forgot to add the '='.  In cl mode, --target must have an '='.

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

9 years agotry to fix the ARM self host bots
Saleem Abdulrasool [Sat, 3 Oct 2015 06:37:38 +0000 (06:37 +0000)]
try to fix the ARM self host bots

The default target is ARM on the ARM self host bots.  This is problematic since
the behaviour on x86, x64 is different from ARM.  Explicitly pass the target.
This should hopefully fix the ARM bots.

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

9 years agoReplace double-negated !SourceLocation.isInvalid() with SourceLocation.isValid().
Yaron Keren [Sat, 3 Oct 2015 05:15:57 +0000 (05:15 +0000)]
Replace double-negated !SourceLocation.isInvalid() with SourceLocation.isValid().

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

9 years agoDriver: follow WoA ABI recommendations
Saleem Abdulrasool [Sat, 3 Oct 2015 03:39:28 +0000 (03:39 +0000)]
Driver: follow WoA ABI recommendations

The Windows on ARM ABI recommends that FPO be disabled.  This is since the
Windows on ARM ABI uses the FP for fast stack walking.  By paying the slight
cost of the loss of registers, a much faster backtrace is possible by using the
frame pointer since the pdata need not be consulted.  Furthermore, even if pdata
is not available, you can still more easily reconstruct the stack.

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

9 years agoFix clang/test/CodeGenCXX/strict-vtable-pointers.cpp for -Asserts. It missed somethin...
NAKAMURA Takumi [Sat, 3 Oct 2015 00:50:12 +0000 (00:50 +0000)]
Fix clang/test/CodeGenCXX/strict-vtable-pointers.cpp for -Asserts. It missed something. :)

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

9 years ago[libFuzzer] make LLVMFuzzerTestOneInput (the fuzzer target function) return int inste...
Kostya Serebryany [Fri, 2 Oct 2015 23:34:37 +0000 (23:34 +0000)]
[libFuzzer] make LLVMFuzzerTestOneInput (the fuzzer target function) return int instead of void. (following llvm r249214)

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

9 years ago[Headers][X86] Fix stream_load (movntdqa) to accept const*.
Ahmed Bougacha [Fri, 2 Oct 2015 23:29:26 +0000 (23:29 +0000)]
[Headers][X86] Fix stream_load (movntdqa) to accept const*.

Per Intel intrinsics guide:
- _mm256_stream_load_si256 takes `__m256i const *'
- _mm_stream_load_si128 takes `__m128i *', for no good reason.

Let's accept const* for both.

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

9 years agoDon't nil check non-nil class receiver of AArch64 stret calls.
Ahmed Bougacha [Fri, 2 Oct 2015 22:41:59 +0000 (22:41 +0000)]
Don't nil check non-nil class receiver of AArch64 stret calls.

I randomly came across this difference between AArch64 and other targets:
on the latter, we don't emit nil checks for known non-nil class method
calls thanks to r247350, but we still do for AArch64 stret calls.

They use different code paths, because those are special, as they go
through the regular msgSend, not the msgSend*_stret variants.

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

9 years agoEmiting invariant.group.barrier for ctors bugfix
Piotr Padlewski [Fri, 2 Oct 2015 22:12:40 +0000 (22:12 +0000)]
Emiting invariant.group.barrier for ctors bugfix

Ensure that the vptr store in the most-derived constructor is not behind
an invariant group barrier. Previously, the base-most vptr store would
be the one behind no barrier, and that could result in the creator of
the object thinking it had the base-most vtable.
This bug caused clang call pure virtual functions when called from
constructor body.

http://reviews.llvm.org/D13373

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

9 years ago[WebAssembly] Add a __builtin_wasm_resize_memory() intrinsic.
Dan Gohman [Fri, 2 Oct 2015 20:20:01 +0000 (20:20 +0000)]
[WebAssembly] Add a __builtin_wasm_resize_memory() intrinsic.

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

9 years ago[WebAssembly] Add a __builtin_wasm_memory_size() intrinsic.
Dan Gohman [Fri, 2 Oct 2015 19:38:47 +0000 (19:38 +0000)]
[WebAssembly] Add a __builtin_wasm_memory_size() intrinsic.

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

9 years ago[Myriad]: Accept '-nostdlib' option
Douglas Katzman [Fri, 2 Oct 2015 18:39:08 +0000 (18:39 +0000)]
[Myriad]: Accept '-nostdlib' option

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

9 years agoconstify four getInstantiatedFromMemberTemplate() in DeclTemplate.h.
Yaron Keren [Fri, 2 Oct 2015 17:38:57 +0000 (17:38 +0000)]
constify four getInstantiatedFromMemberTemplate() in DeclTemplate.h.

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

9 years agoModule debugging: Don't emit forward declarations in module scopes.
Adrian Prantl [Fri, 2 Oct 2015 17:36:14 +0000 (17:36 +0000)]
Module debugging: Don't emit forward declarations in module scopes.
A forward declaration inside a module header does not belong to the module.

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

9 years agoBreak long lines for readability.
Adrian Prantl [Fri, 2 Oct 2015 17:36:10 +0000 (17:36 +0000)]
Break long lines for readability.

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

9 years agoRemove unused variable.
Adrian Prantl [Fri, 2 Oct 2015 17:36:03 +0000 (17:36 +0000)]
Remove unused variable.

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

9 years ago[OpenMP] Capture global variables in target regions.
Samuel Antao [Fri, 2 Oct 2015 17:14:03 +0000 (17:14 +0000)]
[OpenMP] Capture global variables in target regions.

All global variables that are not enclosed in a declare target region
must be captured in the target region as local variables do. Currently,
there is no support for declare target, so this patch adds support for
capturing all the global variables used in a the target region.

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

9 years agoconstify ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember and VarTem...
Yaron Keren [Fri, 2 Oct 2015 16:40:48 +0000 (16:40 +0000)]
constify ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember and VarTemplatePartialSpecializationDecl::getInstantiatedFromMember.

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

9 years ago[OpenMP] Target directive host codegen.
Samuel Antao [Fri, 2 Oct 2015 16:14:20 +0000 (16:14 +0000)]
[OpenMP] Target directive host codegen.

This patch implements the outlining for offloading functions for code
annotated with the OpenMP target directive. It uses a temporary naming
of the outlined functions that will have to be updated later on once
target side codegen and registration of offloading libraries is
implemented - the naming needs to be made unique in the produced
library.

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

9 years ago[DarwinDriver] Reapply: Use -lto_library to specify the path for libLTO.dylib
Bruno Cardoso Lopes [Fri, 2 Oct 2015 15:10:33 +0000 (15:10 +0000)]
[DarwinDriver] Reapply: Use -lto_library to specify the path for libLTO.dylib

Reapply r248935.

Usually, when using LTO with a clang installation newer than the
system's one, there's a libLTO.dylib version mismatch and LTO fails. One
solution to this is to make ld point to the right libLTO.dylib by
changing DYLD_LIBRARY_PATH.

However, ld64 supports specifying the complete path to the desired
libLTO.dylib through the -lto_library option. This commit adds support
for the clang driver to use this option whenever it's capable of finding
a libLTO.dylib in clang's installed library directory. This way, we
don't need to rely on DYLD_LIBRARY_PATH nor get caught by version
mismatches.

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

rdar://problem/7363476

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

9 years agoMake test more resilient to FastIsel changes. NFC.
Andrea Di Biagio [Fri, 2 Oct 2015 15:10:22 +0000 (15:10 +0000)]
Make test more resilient to FastIsel changes. NFC.

Currently FastISel doesn't know how to select vector bitcasts.
During instruction selection, fast-isel always falls back to SelectionDAG
every time it encounters a vector bitcast.
As a consequence of this, all the 'packed vector shift by immedate count'
test cases in avx2-builtins.c are optimized by the DAGCombiner.
In particular, the DAGCombiner would always fold trivial stack loads of
constant shift counts into the operands of packed shift builtins.

This behavior would start changing as soon as I reapply revision 249121.
That revision would teach x86 fast-isel how to select bitcasts between vector
types of the same size.

As a consequence of that change, fast-isel would less often fall back to
SelectionDAG. More importantly, DAGCombiner would no longer be able to
simplify the code by folding the stack reload of a constant.

No functional change.

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

9 years agoRevert "Add support for the new mips-mti-linux toolchain."
Vasileios Kalintiris [Fri, 2 Oct 2015 15:00:55 +0000 (15:00 +0000)]
Revert "Add support for the new mips-mti-linux toolchain."

This reverts commit r249137 because it broke the Windows buildbots and
a Linux buildbot for LLD.

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

9 years agoImplement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] targets.
Alexandros Lamprineas [Fri, 2 Oct 2015 14:56:37 +0000 (14:56 +0000)]
Implement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] targets.

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

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

9 years agoFix bogus comment.
Douglas Katzman [Fri, 2 Oct 2015 14:41:38 +0000 (14:41 +0000)]
Fix bogus comment.

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

9 years agoAdd support for the new mips-mti-linux toolchain.
Vasileios Kalintiris [Fri, 2 Oct 2015 14:38:23 +0000 (14:38 +0000)]
Add support for the new mips-mti-linux toolchain.

Summary:
This new toolchain uses primarily LLVM-based tools, eg. compiler-rt, lld,
libcxx, etc. Because of this, it doesn't require neither an existing GCC
installation nor a GNU environment. Ideally, in a follow-up patch we
would like to add a new --{llvm|clang}-toolchain option (similar to
--gcc-toolchain) in order to allow the use of this toolchain with
independent Clang builds. For the time being, we use the --sysroot
option just to test the correctness of the paths generated by the
driver.

Reviewers: atanasyan, dsanders, rsmith

Subscribers: jfb, tberghammer, danalbert, srhines, dschuff, cfe-commits

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

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

9 years agoMove functions declared in Stmt{ObjC,CXX}.h and OpenMPClause.h into
James Y Knight [Fri, 2 Oct 2015 13:41:04 +0000 (13:41 +0000)]
Move functions declared in Stmt{ObjC,CXX}.h and OpenMPClause.h into
their associated .cpp file.

Previous refactorings long long ago had split out the above categories
of classes from Stmt.h into their own header files, but failed to also
split the Stmt.cpp implementation file similarly. Do so for
readability's sake.

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

9 years agoDivide TraverseInitListExpr to a different function for each form.
Angel Garcia Gomez [Fri, 2 Oct 2015 13:25:51 +0000 (13:25 +0000)]
Divide TraverseInitListExpr to a different function for each form.

Summary: create TraverseSyntacticInitListExpr and TraverseSemanticInitListExpr.

Reviewers: rsmith, klimek

Subscribers: klimek, cfe-commits, alexfh

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

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

9 years agoBe slightly more permissive when checking for type-erased blocks.
Bob Wilson [Fri, 2 Oct 2015 01:05:29 +0000 (01:05 +0000)]
Be slightly more permissive when checking for type-erased blocks.

This is a patch from Doug that was inadvertently omitted from r241543.

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

9 years ago[CMake] Fixing clang bootstrap to use LLVM_RUNTIME_OUTPUT_INTDIR instead of CMAKE_BIN...
Chris Bieneman [Fri, 2 Oct 2015 00:56:53 +0000 (00:56 +0000)]
[CMake] Fixing clang bootstrap to use LLVM_RUNTIME_OUTPUT_INTDIR instead of CMAKE_BINARY_DIR.

This should make bootstrap builds work with multi-configuration generators.

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

9 years agoPR24921: checking explicitly-specified template arguments when matching a
Richard Smith [Fri, 2 Oct 2015 00:49:37 +0000 (00:49 +0000)]
PR24921: checking explicitly-specified template arguments when matching a
partial specialization can perform conversions on the argument. Be sure we
start again from the original argument when checking each possible template.

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

9 years agoExplicitly delete a function that is supposed to never be called.
Richard Smith [Fri, 2 Oct 2015 00:46:58 +0000 (00:46 +0000)]
Explicitly delete a function that is supposed to never be called.

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

9 years agoFix the SSE4 byte sign extension in a cleaner way, and more thoroughly
Chandler Carruth [Thu, 1 Oct 2015 23:40:12 +0000 (23:40 +0000)]
Fix the SSE4 byte sign extension in a cleaner way, and more thoroughly
test that our intrinsics behave the same under -fsigned-char and
-funsigned-char.

This further testing uncovered that AVX-2 has a broken cmpgt for 8-bit
elements, and has for a long time. This is fixed in the same way as
SSE4 handles the case.

The other ISA extensions currently work correctly because they use
specific instruction intrinsics. As soon as they are rewritten in terms
of generic IR, they will need to add these special casts. I've added the
necessary testing to catch this however, so we shouldn't have to chase
it down again.

I considered changing the core typedef to be signed, but that seems like
a bad idea. Notably, it would be an ABI break if anyone is reaching into
the innards of the intrinsic headers and passing __v16qi on an API
boundary. I can't be completely confident that this wouldn't happen due
to a macro expanding in a lambda, etc., so it seems much better to leave
it alone. It also matches GCC's behavior exactly.

A fun side note is that for both GCC and Clang, -funsigned-char really
does change the semantics of __v16qi. To observe this, consider:

  % cat x.cc
  #include <smmintrin.h>
  #include <iostream>

  int main() {
    __v16qi a = { 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
    __v16qi b = _mm_set1_epi8(-1);
    std::cout << (int)(a / b)[0] << ", " << (int)(a / b)[1] << '\n';
  }
  % clang++ -o x x.cc && ./x
  -1, 1
  % clang++ -funsigned-char -o x x.cc && ./x
  0, 1

However, while this may be surprising, both Clang and GCC agree.

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

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

9 years agoDon't try to get a CXXRecordDecl from a non-class TemplateSpecializationType.
Kaelyn Takata [Thu, 1 Oct 2015 22:38:51 +0000 (22:38 +0000)]
Don't try to get a CXXRecordDecl from a non-class TemplateSpecializationType.

With -fms-extensions it is possible to have a non-class record that is a
template specialization cause an assertion failure via the call to
Type::getAsCXXRecordDecl. Fixes PR 24246.

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

9 years agoDon't adjust field offsets when using external record layout.
Zachary Turner [Thu, 1 Oct 2015 22:08:02 +0000 (22:08 +0000)]
Don't adjust field offsets when using external record layout.

This was already being done when injecting the VBPtr, but not
when injecting the VFPtr.  This fixes a number of tests in LLDB's
test suite.

Reviewed by: David Majnemer
Differential Revision: http://reviews.llvm.org/D13276

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

9 years agoPerform Objective-C lifetime adjustments before comparing deduced lambda result types.
Douglas Gregor [Thu, 1 Oct 2015 20:20:47 +0000 (20:20 +0000)]
Perform Objective-C lifetime adjustments before comparing deduced lambda result types.

Objective-C ARC lifetime qualifiers are dropped when canonicalizing
function types. Perform the same adjustment before comparing the
deduced result types of lambdas. Fixes rdar://problem/22344904.

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

9 years ago[analyzer] Add TK_EntireMemSpace invalidation trait.
Devin Coughlin [Thu, 1 Oct 2015 20:09:11 +0000 (20:09 +0000)]
[analyzer] Add TK_EntireMemSpace invalidation trait.

This commit supports Sean Eveson's work on loop widening. It is NFC for now.
It adds a new TK_EntireMemSpace invalidation trait that, when applied to a
MemSpaceRegion, indicates that the entire memory space should be invalidated.

Clients can add this trait before invalidating. For example:

RegionAndSymbolInvalidationTraits ITraits;
ITraits.setTrait(MRMgr.getStackLocalsRegion(STC),
                 RegionAndSymbolInvalidationTraits::TK_EntireMemSpace);

This commit updates the existing logic invalidating global memspace regions for
calls to additionally handle arbitrary memspaces. When generating initial
clusters during cluster analysis we now add a cluster to the worklist if
the memspace for its base is marked with TK_EntireMemSpace.

This also moves the logic for invalidating globals from ClusterAnalysis to
invalidateRegionsWorker so that it is not shared with removeDeadBindingsWorker.

There are no explicit tests with this patch -- but when applied to Sean's patch
for loop widening in http://reviews.llvm.org/D12358 and after updating his code
to set the trait, the failing tests in that patch now pass.

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

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

9 years agoSimplify Sema::DeduceFunctionTypeFromReturnExpr and eliminae a redundant check.
Douglas Gregor [Thu, 1 Oct 2015 19:52:44 +0000 (19:52 +0000)]
Simplify Sema::DeduceFunctionTypeFromReturnExpr and eliminae a redundant check.

NFC

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

9 years agoTeach -Wtautological-overlap-compare about enums
George Burgess IV [Thu, 1 Oct 2015 18:47:52 +0000 (18:47 +0000)]
Teach -Wtautological-overlap-compare about enums

Prior to this patch, -Wtautological-overlap-compare would only warn us
if there was a sketchy logical comparison between variables and
IntegerLiterals. This patch makes -Wtautological-overlap-compare aware
of EnumConstantDecls, so it can apply the same logic to them.

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

9 years agoModule debugging: Also emit Objective-C interfaces forward declarations
Adrian Prantl [Thu, 1 Oct 2015 16:57:02 +0000 (16:57 +0000)]
Module debugging: Also emit Objective-C interfaces forward declarations
in their module scope when building a clang module.

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

9 years agoAllow a ToolChain to compute the path of a compiler-rt's component.
Vasileios Kalintiris [Thu, 1 Oct 2015 16:54:58 +0000 (16:54 +0000)]
Allow a ToolChain to compute the path of a compiler-rt's component.

Summary:
This patch moves getCompilerRT() from the clang::driver::tools namespace to
the ToolChain class. This is needed for multilib toolchains that need to
place their libraries in Clang's resource directory with a layout that is
different from the default one.

Reviewers: atanasyan, rsmith

Subscribers: tberghammer, danalbert, srhines, cfe-commits

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

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

9 years ago[VFS] Remove unused setters. NFC.
Benjamin Kramer [Thu, 1 Oct 2015 15:02:15 +0000 (15:02 +0000)]
[VFS] Remove unused setters. NFC.

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

9 years ago[PowerPC] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* macros on all PPC cores
Hal Finkel [Thu, 1 Oct 2015 13:39:49 +0000 (13:39 +0000)]
[PowerPC] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* macros on all PPC cores

We support all __sync_val_compare_and_swap_* builtins (only 64-bit on 64-bit
targets) on all cores, and should define the corresponding
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_* macros, just as GCC does. As it turns out,
this is really important because they're needed to prevent a bad ODR violation
with libstdc++'s std::shared_ptr (this is well explained in PR12730).

We were doing this only for P8, but this is necessary on all PPC systems.

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

9 years agoRevert "Decorating virtual functions load with invariant.load" and fix
Renato Golin [Thu, 1 Oct 2015 12:58:41 +0000 (12:58 +0000)]
Revert "Decorating virtual functions load with invariant.load" and fix

This reverts commit r248982 as it was breaking the ARM buildbots and the fix didn't work.
This reverts commit r248984, the fix that didn't work.

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

9 years agoC++11 rangify for loops, NFC.
Yaron Keren [Thu, 1 Oct 2015 11:19:28 +0000 (11:19 +0000)]
C++11 rangify for loops, NFC.

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

9 years ago[clang-format] Add support of consecutive declarations alignment
Daniel Jasper [Thu, 1 Oct 2015 10:06:54 +0000 (10:06 +0000)]
[clang-format] Add support of consecutive declarations alignment

This allows clang-format to align identifiers in consecutive
declarations. This is useful for increasing the readability of the code
in the same way the alignment of assignations is.

The code is a slightly modified version of the consecutive assignment
alignment code. Currently only the identifiers are aligned, and there is
no support of alignment of the pointer star or reference symbol.

The patch also solve the issue of alignments not being possible due to
the ColumnLimit for both the existing AlignConsecutiveAligments and the
new AlignConsecutiveDeclarations.

Patch by Beren Minor, thank you.

Review: http://reviews.llvm.org/D12362

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

9 years agoTest fix
Piotr Padlewski [Thu, 1 Oct 2015 04:19:45 +0000 (04:19 +0000)]
Test fix

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

9 years agoDecorating virtual functions load with invariant.load
Piotr Padlewski [Thu, 1 Oct 2015 03:50:41 +0000 (03:50 +0000)]
Decorating virtual functions load with invariant.load

http://reviews.llvm.org/D13279

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

9 years agoPatch over a really horrible bug in our vector builtins that showed up
Chandler Carruth [Thu, 1 Oct 2015 02:21:34 +0000 (02:21 +0000)]
Patch over a really horrible bug in our vector builtins that showed up
recently when we started using direct conversion to model sign
extension. The __v16qi type we use for SSE v16i8 vectors is defined in
terms of 'char' which may or may not be signed! This causes us to
generate pmovsx and pmovzx depending on the setting of -funsigned-char.

This patch just forms an explicitly signed type and uses that to
formulate the sign extension. While this gets the correct behavior
(which we now verify with the enhanced test) this is just the tip of the
ice berg. Now that I know what to look for, I have found errors of this
sort *throughout* our vector code. Fortunately, this is the only
specific place where I know of users actively having their code
miscompiled by Clang due to this, so I'm keeping the fix for those users
minimal and targeted.

I'll be sending a proper email for discussion of how to fix these
systematically, what the implications are, and just how widely broken
this is... From what I can tell, we have never shipped a correct set of
builtin headers for x86 when users rely on -funsigned-char. Oops.

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

9 years agocreateUniqueFile() is documented to create the file in the temporary directory unless...
Cameron Esfahani [Thu, 1 Oct 2015 01:24:59 +0000 (01:24 +0000)]
createUniqueFile() is documented to create the file in the temporary directory unless it's supplied an absolute path.

Make sure the output filepath supplied to createUniqueFile() in HTMLDiagnostics::ReportDiag() is absolute.

Summary: Make sure the output filepath supplied to createUniqueFile() in HTMLDiagnostics::ReportDiag() is absolute.

Reviewers: rsmith, akyrtzi

Subscribers: cfe-commits

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

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

9 years agoFix printing of parameterized Objective-C interfaces.
Bob Wilson [Thu, 1 Oct 2015 00:53:13 +0000 (00:53 +0000)]
Fix printing of parameterized Objective-C interfaces.

This change was accidentally omitted from Doug's change in r241541.

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

9 years agoModule debugging: Emit Objective-C interfaces in their module scope when
Adrian Prantl [Thu, 1 Oct 2015 00:48:51 +0000 (00:48 +0000)]
Module debugging: Emit Objective-C interfaces in their module scope when
building a clang module.

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

9 years ago[Sema] Don't crash when friending an unqualified templated constructor
David Majnemer [Wed, 30 Sep 2015 22:07:43 +0000 (22:07 +0000)]
[Sema] Don't crash when friending an unqualified templated constructor

Unqualified templated constructors cannot be friended and our lack of a
diagnostic led to violated invariants.  Instead, raise a diagnostic when
processing the friend declaration.

This fixes PR20251.

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

9 years ago[CUDA] fix codegen for __nvvm_atom_cas_*
Jingyue Wu [Wed, 30 Sep 2015 21:49:32 +0000 (21:49 +0000)]
[CUDA] fix codegen for __nvvm_atom_cas_*

Summary: __nvvm_atom_cas_* returns the old value instead of whether the swap succeeds.

Reviewers: eliben, tra

Subscribers: jholewinski, llvm-commits

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

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

9 years agoDon't inherit the "unavailable" attribute from an overridden superclass method.
Douglas Gregor [Wed, 30 Sep 2015 21:34:33 +0000 (21:34 +0000)]
Don't inherit the "unavailable" attribute from an overridden superclass method.

Fixes rdar://problem/22922259.

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

9 years agoDon't inherit availability information when implementing a protocol requirement.
Douglas Gregor [Wed, 30 Sep 2015 21:27:42 +0000 (21:27 +0000)]
Don't inherit availability information when implementing a protocol requirement.

When an Objective-C method implements a protocol requirement, do not
inherit any availability information from the protocol
requirement. Rather, check that the implementation is not less
available than the protocol requirement, as we do when overriding a
method that has availability. Fixes rdar://problem/22734745.

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

9 years agoRevert "[DarwinDriver] Use -lto_library to specify the path for libLTO.dylib"
Bruno Cardoso Lopes [Wed, 30 Sep 2015 20:11:02 +0000 (20:11 +0000)]
Revert "[DarwinDriver] Use -lto_library to specify the path for libLTO.dylib"

Revert r248932. Bots complaining about new warnings where they shouldn't.

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

9 years ago[DarwinDriver] Use -lto_library to specify the path for libLTO.dylib
Bruno Cardoso Lopes [Wed, 30 Sep 2015 19:55:07 +0000 (19:55 +0000)]
[DarwinDriver] Use -lto_library to specify the path for libLTO.dylib

Usually, when using LTO with a clang installation newer than the
system's one, there's a libLTO.dylib version mismatch and LTO fails. One
solution to this is to make ld point to the right libLTO.dylib by
changing DYLD_LIBRARY_PATH.

However, ld64 supports specifying the complete path to the desired
libLTO.dylib through the -lto_library option. This commit adds support
for the clang driver to use this option whenever it's capable of finding
a libLTO.dylib in clang's installed library directory. This way, we
don't need to rely on DYLD_LIBRARY_PATH nor get caught by version
mismatches.

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

rdar://problem/7363476

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

9 years agoclang-format: Add clangRewrite dependency to fix cmake build.
Daniel Jasper [Wed, 30 Sep 2015 19:28:47 +0000 (19:28 +0000)]
clang-format: Add clangRewrite dependency to fix cmake build.

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

9 years agoDon't correct non-class using declarations to class members.
Kaelyn Takata [Wed, 30 Sep 2015 18:23:35 +0000 (18:23 +0000)]
Don't correct non-class using declarations to class members.

Such declarations would be invalid anyway, and trying to make the
correction will lead to a crash. Fixes PR 24781.

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

9 years ago[Sema] Avoid crashing during this-> insertion recovery
Reid Kleckner [Wed, 30 Sep 2015 17:30:48 +0000 (17:30 +0000)]
[Sema] Avoid crashing during this-> insertion recovery

We get into this bad state when someone defines a new member function
for a class but forgets to add the declaration to the class body.
Calling the new member function from a member function template of the
class will crash during instantiation.

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

9 years agoAlias "-ggdbN" to "-gN" options, fixing some incompatibilities.
Douglas Katzman [Wed, 30 Sep 2015 15:55:59 +0000 (15:55 +0000)]
Alias "-ggdbN" to "-gN" options, fixing some incompatibilities.

* assembling from a .s file mistook -ggdb0 for -g
* -ggdb1 is supposed to mean basically -g1, not -gN for N>1

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

9 years ago[OpenCL 2.0] Enable program scope variables, Section 6.5.1.
Anastasia Stulova [Wed, 30 Sep 2015 14:08:20 +0000 (14:08 +0000)]
[OpenCL 2.0] Enable program scope variables, Section 6.5.1.

 - Remove virtual SC_OpenCLWorkGroupLocal storage type specifier
as it conflicts with static local variables now and prevents
diagnosing static local address space variables correctly.

 - Allow static local and global variables (OpenCL2.0 s6.8 and s6.5.1).

 - Improve diagnostics of allowed ASes for variables in different scopes:
(i) Global or static local variables have to be in global
or constant ASes (OpenCL1.2 s6.5, OpenCL2.0 s6.5.1);
(ii) Non-kernel function variables can't be declared in local
or constant ASes (OpenCL1.1 s6.5.2 and s6.5.3).

http://reviews.llvm.org/D13105

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

9 years agoFix FunctionParmPackExpr::Create() to take a ParmVarDecl* array.
James Y Knight [Wed, 30 Sep 2015 14:04:23 +0000 (14:04 +0000)]
Fix FunctionParmPackExpr::Create() to take a ParmVarDecl* array.

FunctionParmPackExpr actually stores an array of ParmVarDecl* (and
accessors return that). But, the FunctionParmPackExpr::Create()
constructor accepted an array of Decl *s instead.

It was easy for this mismatch to occur without any obvious sign of
something wrong, since both the store and the access used independent
'reinterpet_cast<XX>(this+1)' calls.

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

9 years agoclang-format: Use Rewriter again to write the output files.
Daniel Jasper [Wed, 30 Sep 2015 13:59:29 +0000 (13:59 +0000)]
clang-format: Use Rewriter again to write the output files.

This has two advantages:
1. Atomic writes.
2. Proper handling of line endings (hopefully solving llvm.org/PR24999

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

9 years ago[OpenCL] Add missing OpenCL LangOpts in address space compatibility checks
Anastasia Stulova [Wed, 30 Sep 2015 13:49:55 +0000 (13:49 +0000)]
[OpenCL] Add missing OpenCL LangOpts in address space compatibility checks

and test checking broken (due to CL specific diagnostics) C functionality

M    test/Sema/address_spaces.c
M    lib/Sema/SemaExpr.cpp

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

9 years ago[OpenCL 2.0] This change adds extra diagnostics to atomic types
Anastasia Stulova [Wed, 30 Sep 2015 13:18:52 +0000 (13:18 +0000)]
[OpenCL 2.0] This change adds extra diagnostics to atomic types

Applied restrictions from OpenCL v2.0 s6.13.11.8
that mainly disallow operations on atomic types (except for taking their address - &).

The patch is taken from SPIR2.0 provisional branch, contributed by Guy Benyei!

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

9 years ago[OpenCL 2.0] Fix wrong atomic type detection in the diagnostics of allowed types
Anastasia Stulova [Wed, 30 Sep 2015 11:48:15 +0000 (11:48 +0000)]
[OpenCL 2.0] Fix wrong atomic type detection in the diagnostics of allowed types

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

9 years ago[ARM][NEON] Use address space in vld([1234]|[234]lane) and vst([1234]|[234]lane)...
Jeroen Ketema [Wed, 30 Sep 2015 10:56:56 +0000 (10:56 +0000)]
[ARM][NEON] Use address space in vld([1234]|[234]lane) and vst([1234]|[234]lane) instructions

This is the clang commit associated with llvm r248887.

This commit changes the interface of the vld[1234], vld[234]lane, and vst[1234],
vst[234]lane ARM neon intrinsics and associates an address space with the
pointer that these intrinsics take. This changes, e.g.,

<2 x i32> @llvm.arm.neon.vld1.v2i32(i8*, i32)

to

<2 x i32> @llvm.arm.neon.vld1.v2i32.p0i8(i8*, i32)

This change ensures that address spaces are fully taken into account in the ARM
target during lowering of interleaved loads and stores.

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

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

9 years ago[OPENMP 4.1] Sema analysis for array sections in 'reduction' clause.
Alexey Bataev [Wed, 30 Sep 2015 09:22:36 +0000 (09:22 +0000)]
[OPENMP 4.1] Sema analysis for array sections in 'reduction' clause.
OpenMP 4.1 allows to use array sections|subscript expressions in 'reduction' clauses. Added sema analysis, updated tests.

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

9 years agoFix the sample profile format that breaks in test http://lab.llvm.org:8011/builders...
Dehao Chen [Wed, 30 Sep 2015 01:03:10 +0000 (01:03 +0000)]
Fix the sample profile format that breaks in test http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/505

http://reviews.llvm.org/D13145

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

9 years agoPromote a warning on ill-formed code (redeclaration missing an exception
Richard Smith [Wed, 30 Sep 2015 00:48:50 +0000 (00:48 +0000)]
Promote a warning on ill-formed code (redeclaration missing an exception
specification) to an error. No compiler other than Clang seems to allow this,
and it doesn't seem like a useful thing to accept as an extension in general.

The current behavior was added for PR5957, where the problem was specifically
related to mismatches of the exception specification on the implicitly-declared
global operator new and delete. To retain that workaround, we downgrade the
error to an ExtWarn when the declaration is of a replaceable global allocation
function.

Now that this is an error, stop trying (and failing) to recover from a missing
computed noexcept specification. That recovery didn't work, and led to crashes
in code like the added testcase.

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

9 years agoDon't crash when a reserved global placement operator new is paired
John McCall [Tue, 29 Sep 2015 23:55:17 +0000 (23:55 +0000)]
Don't crash when a reserved global placement operator new is paired
with a non-reserved operator delete in a new-expression.

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

9 years agoMove functions declared in ExprObjC.h into ExprObjC.cpp.
James Y Knight [Tue, 29 Sep 2015 22:28:44 +0000 (22:28 +0000)]
Move functions declared in ExprObjC.h into ExprObjC.cpp.

r51703 back in 2008 split out all the ObjC Expr subclasses from Expr.h
to a new ExprObjC.h file, but failed to also split the implementation
from Expr.cpp to ExprObjC.cpp. Do so, finally, for readability's sake.

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

9 years agoFix Clang-tidy modernize-use-nullptr warnings in headers and generated files; other...
Hans Wennborg [Tue, 29 Sep 2015 20:56:43 +0000 (20:56 +0000)]
Fix Clang-tidy modernize-use-nullptr warnings in headers and generated files; other minor cleanups.

By Eugene Zelenko!

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

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

9 years agoCGDebugInfo: Don't reuse a reference into a DenseMap if the DenseMap may
Adrian Prantl [Tue, 29 Sep 2015 20:44:46 +0000 (20:44 +0000)]
CGDebugInfo: Don't reuse a reference into a DenseMap if the DenseMap may
be modified in between. (NFC)

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

9 years agoForgot to remove a FIXME that has been fixed. NFC.
Nemanja Ivanovic [Tue, 29 Sep 2015 18:20:59 +0000 (18:20 +0000)]
Forgot to remove a FIXME that has been fixed. NFC.

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

9 years agoAddition of interfaces the FE to conform to Table A-2 of ELF V2 ABI V1.1
Nemanja Ivanovic [Tue, 29 Sep 2015 18:13:34 +0000 (18:13 +0000)]
Addition of interfaces the FE to conform to Table A-2 of ELF V2 ABI V1.1

This patch corresponds to review:
http://reviews.llvm.org/D13190

Implemented the following interfaces to conform to ELF V2 ABI version 1.1.

vector signed __int128 vec_adde (vector signed __int128, vector signed __int128, vector signed __int128);
vector unsigned __int128 vec_adde (vector unsigned __int128, vector unsigned __int128, vector unsigned __int128);
vector signed __int128 vec_addec (vector signed __int128, vector signed __int128, vector signed __int128);
vector unsigned __int128 vec_addec (vector unsigned __int128, vector unsigned __int128, vector unsigned __int128);
vector signed int vec_addc(vector signed int __a, vector signed int __b);
vector bool char vec_cmpge (vector signed char __a, vector signed char __b);
vector bool char vec_cmpge (vector unsigned char __a, vector unsigned char __b);
vector bool short vec_cmpge (vector signed short __a, vector signed short __b);
vector bool short vec_cmpge (vector unsigned short __a, vector unsigned short __b);
vector bool int vec_cmpge (vector signed int __a, vector signed int __b);
vector bool int vec_cmpge (vector unsigned int __a, vector unsigned int __b);
vector bool char vec_cmple (vector signed char __a, vector signed char __b);
vector bool char vec_cmple (vector unsigned char __a, vector unsigned char __b);
vector bool short vec_cmple (vector signed short __a, vector signed short __b);
vector bool short vec_cmple (vector unsigned short __a, vector unsigned short __b);
vector bool int vec_cmple (vector signed int __a, vector signed int __b);
vector bool int vec_cmple (vector unsigned int __a, vector unsigned int __b);
vector double vec_double (vector signed long long __a);
vector double vec_double (vector unsigned long long __a);
vector bool char vec_eqv(vector bool char __a, vector bool char __b);
vector bool short vec_eqv(vector bool short __a, vector bool short __b);
vector bool int vec_eqv(vector bool int __a, vector bool int __b);
vector bool long long vec_eqv(vector bool long long __a, vector bool long long __b);
vector signed short vec_madd(vector signed short __a, vector signed short __b, vector signed short __c);
vector signed short vec_madd(vector signed short __a, vector unsigned short __b, vector unsigned short __c);
vector signed short vec_madd(vector unsigned short __a, vector signed short __b, vector signed short __c);
vector unsigned short vec_madd(vector unsigned short __a, vector unsigned short __b, vector unsigned short __c);
vector bool long long vec_mergeh(vector bool long long __a, vector bool long long __b);
vector bool long long vec_mergel(vector bool long long __a, vector bool long long __b);
vector bool char vec_nand(vector bool char __a, vector bool char __b);
vector bool short vec_nand(vector bool short __a, vector bool short __b);
vector bool int vec_nand(vector bool int __a, vector bool int __b);
vector bool long long vec_nand(vector bool long long __a, vector bool long long __b);
vector bool char vec_orc(vector bool char __a, vector bool char __b);
vector bool short vec_orc(vector bool short __a, vector bool short __b);
vector bool int vec_orc(vector bool int __a, vector bool int __b);
vector bool long long vec_orc(vector bool long long __a, vector bool long long __b);
vector signed long long vec_sub(vector signed long long __a, vector signed long long __b);
vector signed long long vec_sub(vector bool long long __a, vector signed long long __b);
vector signed long long vec_sub(vector signed long long __a, vector bool long long __b);
vector unsigned long long vec_sub(vector unsigned long long __a, vector unsigned long long __b);
vector unsigned long long vec_sub(vector bool long long __a, vector unsigned long long __b);
vector unsigned long long vec_sub(vector unsigned long long __V2 ABI V1.1

http://ror float vec_sub(vector float __a, vector float __b);
unsigned char vec_extract(vector bool char __a, int __b);
signed short vec_extract(vector signed short __a, int __b);
unsigned short vec_extract(vector bool short __a, int __b);
signed int vec_extract(vector signed int __a, int __b);
unsigned int vec_extract(vector bool int __a, int __b);
signed long long vec_extract(vector signed long long __a, int __b);
unsigned long long vec_extract(vector unsigned long long __a, int __b);
unsigned long long vec_extract(vector bool long long __a, int __b);
double vec_extract(vector double __a, int __b);
vector bool char vec_insert(unsigned char __a, vector bool char __b, int __c);
vector signed short vec_insert(signed short __a, vector signed short __b, int __c);
vector bool short vec_insert(unsigned short __a, vector bool short __b, int __c);
vector signed int vec_insert(signed int __a, vector signed int __b, int __c);
vector bool int vec_insert(unsigned int __a, vector bool int __b, int __c);
vector signed long long vec_insert(signed long long __a, vector signed long long __b, int __c);
vector unsigned long long vec_insert(unsigned long long __a, vector unsigned long long __b, int __c);
vector bool long long vec_insert(unsigned long long __a, vector bool long long __b, int __c);
vector double vec_insert(double __a, vector double __b, int __c);
vector signed long long vec_splats(signed long long __a);
vector unsigned long long vec_splats(unsigned long long __a);
vector signed __int128 vec_splats(signed __int128 __a);
vector unsigned __int128 vec_splats(unsigned __int128 __a);
vector double vec_splats(double __a);
int vec_all_eq(vector double __a, vector double __b);
int vec_all_ge(vector double __a, vector double __b);
int vec_all_gt(vector double __a, vector double __b);
int vec_all_le(vector double __a, vector double __b);
int vec_all_lt(vector double __a, vector double __b);
int vec_all_nan(vector double __a);
int vec_all_ne(vector double __a, vector double __b);
int vec_all_nge(vector double __a, vector double __b);
int vec_all_ngt(vector double __a, vector double __b);
int vec_any_eq(vector double __a, vector double __b);
int vec_any_ge(vector double __a, vector double __b);
int vec_any_gt(vector double __a, vector double __b);
int vec_any_le(vector double __a, vector double __b);
int vec_any_lt(vector double __a, vector double __b);
int vec_any_ne(vector double __a, vector double __b);
vector unsigned char vec_sbox_be (vector unsigned char);
vector unsigned char vec_cipher_be (vector unsigned char, vector unsigned char);
vector unsigned char vec_cipherlast_be (vector unsigned char, vector unsigned char);
vector unsigned char vec_ncipher_be (vector unsigned char, vector unsigned char);
vector unsigned char vec_ncipherlast_be (vector unsigned char, vector unsigned char);
vector unsigned int vec_shasigma_be (vector unsigned int, const int, const int);
vector unsigned long long vec_shasigma_be (vector unsigned long long, const int, const int);
vector unsigned short vec_pmsum_be (vector unsigned char, vector unsigned char);
vector unsigned int vec_pmsum_be (vector unsigned short, vector unsigned short);
vector unsigned long long vec_pmsum_be (vector unsigned int, vector unsigned int);
vector unsigned __int128 vec_pmsum_be (vector unsigned long long, vector unsigned long long);
vector unsigned char vec_gb (vector unsigned char);
vector unsigned long long vec_bperm (vector unsigned __int128 __a, vector unsigned char __b);

Removed the folowing interfaces either because their signatures have changed
in version 1.1 of the ABI or because they were implemented for ELF V2 ABI but
have actually been deprecated in version 1.1.

vector signed char vec_eqv(vector bool char __a, vector signed char __b);
vector signed char vec_eqv(vector signed char __a, vector bool char __b);
vector unsigned char vec_eqv(vector bool char __a, vector unsigned char __b);
vector unsigned char vec_eqv(vector unsigned char __a, vector bool char __b);
vector signed short vec_eqv(vector bool short __a, vector signed short __b);
vector signed short vec_eqv(vector signed short __a, vector bool short __b);
vector unsigned short vec_eqv(vector bool short __a, vector unsigned short __b);
vector unsigned short vec_eqv(vector unsigned short __a, vector bool short __b);
vector signed int vec_eqv(vector bool int __a, vector signed int __b);
vector signed int vec_eqv(vector signed int __a, vector bool int __b);
vector unsigned int vec_eqv(vector bool int __a, vector unsigned int __b);
vector unsigned int vec_eqv(vector unsigned int __a, vector bool int __b);
vector signed long long vec_eqv(vector bool long long __a, vector signed long long __b);
vector signed long long vec_eqv(vector signed long long __a, vector bool long long __b);
vector unsigned long long vec_eqv(vector bool long long __a, vector unsigned long long __b);
vector unsigned long long vec_eqv(vector unsigned long long __a, vector bool long long __b);
vector float vec_eqv(vector bool int __a, vector float __b);
vector float vec_eqv(vector float __a, vector bool int __b);
vector double vec_eqv(vector bool long long __a, vector double __b);
vector double vec_eqv(vector double __a, vector bool long long __b);
vector unsigned short vec_nand(vector bool short __a, vector unsigned short __b);

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

9 years agoAdded MSVC natvis visualizers for Type and QualType. These could probably be improved...
Aaron Ballman [Tue, 29 Sep 2015 17:32:36 +0000 (17:32 +0000)]
Added MSVC natvis visualizers for Type and QualType. These could probably be improved, but anything is better than staring at hex values in the debugger.

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

9 years agoFix typo.
Yaron Keren [Tue, 29 Sep 2015 16:51:08 +0000 (16:51 +0000)]
Fix typo.

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

9 years agoThread Safety Analysis: allow capability attribute on unions.
DeLesley Hutchins [Tue, 29 Sep 2015 16:24:18 +0000 (16:24 +0000)]
Thread Safety Analysis: allow capability attribute on unions.

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

9 years agoThread Safety Analysis: fix before/after checks so that they work on global
DeLesley Hutchins [Tue, 29 Sep 2015 15:25:51 +0000 (15:25 +0000)]
Thread Safety Analysis:  fix before/after checks so that they work on global
variables as well member variables.

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

9 years agoclang-format: Add a new brace style "custom" as well as flags to
Daniel Jasper [Tue, 29 Sep 2015 14:57:55 +0000 (14:57 +0000)]
clang-format: Add a new brace style "custom" as well as flags to
control the individual braces. The existing choices for brace wrapping
are now merely presets for the different flags that get expanded upon
calling the reformat function.

All presets have been chose to keep the existing formatting, so there
shouldn't be any difference in formatting behavior.

Also change the dump_format_style.py to properly document the nested
structs that are used to keep these flags discoverable among all the
configuration flags.

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

9 years agoclang-format: Extend #include sorting functionality
Daniel Jasper [Tue, 29 Sep 2015 07:53:08 +0000 (07:53 +0000)]
clang-format: Extend #include sorting functionality

Recognize the main module header as well as different #include categories.
This should now mimic the behavior of llvm/utils/sort_includes.py as
well as clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp very
closely.

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

9 years agoRevert part of r248776. One of the changes worked on my local build, but not on the...
Craig Topper [Tue, 29 Sep 2015 05:08:30 +0000 (05:08 +0000)]
Revert part of r248776. One of the changes worked on my local build, but not on the bots.

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

9 years agoSimplify or remove calls to makeArrayRef based on feedback from David Blaikie. NFC.
Craig Topper [Tue, 29 Sep 2015 04:53:28 +0000 (04:53 +0000)]
Simplify or remove calls to makeArrayRef based on feedback from David Blaikie. NFC.

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

9 years agoHonor the casted-to alignment of an explicit cast even when
John McCall [Tue, 29 Sep 2015 04:37:40 +0000 (04:37 +0000)]
Honor the casted-to alignment of an explicit cast even when
Sema thinks the cast is a no-op, as it does when (e.g.) the
only thing that changes is an alignment attribute.

Fixed PR24944.

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

9 years agoRemove 'const' from some ArrayRef arguments since they're passed by value anyway...
Craig Topper [Tue, 29 Sep 2015 04:30:07 +0000 (04:30 +0000)]
Remove 'const' from some ArrayRef arguments since they're passed by value anyway. NFC

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

9 years agoPass ArrayRef by value. NFC.
Craig Topper [Tue, 29 Sep 2015 04:30:05 +0000 (04:30 +0000)]
Pass ArrayRef by value. NFC.

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

9 years ago[OPENMP 4.1] Codegen for ‘simd’ clause in ‘ordered’ directive.
Alexey Bataev [Tue, 29 Sep 2015 03:48:57 +0000 (03:48 +0000)]
[OPENMP 4.1] Codegen for ‘simd’ clause in ‘ordered’ directive.
Description.
If the simd clause is specified, the ordered regions encountered by any thread will use only a single SIMD lane to execute the ordered regions in the order of the loop iterations.
Restrictions.
An ordered construct with the simd clause is the only OpenMP construct that can appear in the simd region.

An ordered directive with ‘simd’ clause is generated as an outlined function and corresponding function call to prevent this part of code from vectorization later in backend.

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

9 years agoUnique-pointerify these pointers an plug a memory leak.
Adrian Prantl [Mon, 28 Sep 2015 23:56:10 +0000 (23:56 +0000)]
Unique-pointerify these pointers an plug a memory leak.
Thanks to echristo for noticing!

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

9 years agoRemove the only use of LookupResult's implicit copy ctor
David Blaikie [Mon, 28 Sep 2015 23:48:55 +0000 (23:48 +0000)]
Remove the only use of LookupResult's implicit copy ctor

LookupResult should not be copyable, it's not readily copyable and can
only be copied when it's in specific states (in a query state, without
any results, basically). Instead, just extract the /query/ state and
pass that across the copy boundary, then build a new LookupResult on the
other side.

I wonder if a better API (one in which the query state is separate from
the result state - essentialyl making QueryState a first class part of
the Lookup API - pass a QueryState, get a LookupResult, rather than
mutating the LookupResult in place (LookupResult could contain a
QueryState if it's particularly helpful to be able to observe the query
parameters while also examining the result)) might be a good idea here.

Future patches will probably make LookupResult actually non-copyable
(transition the CXXBasePaths to unique_ptr, for example) and hopefully
we'll enable -Wdeprecated in LLVM soon to avoid issues like this.

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

9 years agoAdd an explicitly defaulted copy ctor (and FIXME) to Command since its copy ctor...
David Blaikie [Mon, 28 Sep 2015 23:48:52 +0000 (23:48 +0000)]
Add an explicitly defaulted copy ctor (and FIXME) to Command since its copy ctor is currently used (and actually slices derived objects... ) in some diagnostics handling.

Justin mentioned he'd look into this.

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

9 years agoRemove trivial dtor that was making uses of the copy ctor -Wdeprecated unclean
David Blaikie [Mon, 28 Sep 2015 23:48:49 +0000 (23:48 +0000)]
Remove trivial dtor that was making uses of the copy ctor -Wdeprecated unclean

And also remove an unused variable that's now diagnosed by
-Wunused-variable since the dtor is now trivial.

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

9 years ago[CUDA] 32-bit NVPTX should have 32-bit long type.
Artem Belevich [Mon, 28 Sep 2015 22:54:08 +0000 (22:54 +0000)]
[CUDA] 32-bit NVPTX should have 32-bit long type.

Currently it's 64-bit which will lead to mismatch between host and
device code if we compile for i386.

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

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

9 years agoGenerate assume loads only with -fstrict-vtable-pointers
Piotr Padlewski [Mon, 28 Sep 2015 20:30:22 +0000 (20:30 +0000)]
Generate assume loads only with -fstrict-vtable-pointers

Temporary fix till InstCombine and other possible passes will be
efficient to handle multiple assumes.

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

9 years agoclang-format: [JS] Support pseudo-keywords
Daniel Jasper [Mon, 28 Sep 2015 14:29:45 +0000 (14:29 +0000)]
clang-format: [JS] Support pseudo-keywords

JavaScript allows keywords to appear in IdenfierName positions, e.g.
fields, or object literal members, but not as plain identifiers.

Patch by Martin Probst. Thank you!

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