summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Pass SourceRange by value in a test I missed in r249259.Craig Topper2015-10-041-2/+2
| | | | llvm-svn: 249260
* SourceRanges are small and trivially copyable, don't them by reference.Craig Topper2015-10-0428-76/+73
| | | | llvm-svn: 249259
* Diagnose const atomics in __atomic builtins.Eric Fiselier2015-10-043-10/+45
| | | | | | | | | | | 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) llvm-svn: 249252
* Replace double negation of !FileID.isInvalid() with FileID.isValid().Yaron Keren2015-10-0318-27/+28
| | | | | | +couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228. llvm-svn: 249235
* fix previous commitSaleem Abdulrasool2015-10-031-6/+6
| | | | | | Forgot to add the '='. In cl mode, --target must have an '='. llvm-svn: 249232
* try to fix the ARM self host botsSaleem Abdulrasool2015-10-031-3/+6
| | | | | | | | 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. llvm-svn: 249229
* Replace double-negated !SourceLocation.isInvalid() with ↵Yaron Keren2015-10-0310-15/+15
| | | | | | SourceLocation.isValid(). llvm-svn: 249228
* Driver: follow WoA ABI recommendationsSaleem Abdulrasool2015-10-032-0/+44
| | | | | | | | | | 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. llvm-svn: 249227
* Fix clang/test/CodeGenCXX/strict-vtable-pointers.cpp for -Asserts. It missed ↵NAKAMURA Takumi2015-10-031-1/+1
| | | | | | something. :) llvm-svn: 249223
* [libFuzzer] make LLVMFuzzerTestOneInput (the fuzzer target function) return ↵Kostya Serebryany2015-10-022-2/+4
| | | | | | int instead of void. (following llvm r249214) llvm-svn: 249215
* [Headers][X86] Fix stream_load (movntdqa) to accept const*.Ahmed Bougacha2015-10-025-8/+8
| | | | | | | | | | 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. llvm-svn: 249213
* Don't nil check non-nil class receiver of AArch64 stret calls.Ahmed Bougacha2015-10-022-7/+10
| | | | | | | | | | | 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. llvm-svn: 249205
* Emiting invariant.group.barrier for ctors bugfixPiotr Padlewski2015-10-023-26/+43
| | | | | | | | | | | | | 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 llvm-svn: 249197
* [WebAssembly] Add a __builtin_wasm_resize_memory() intrinsic.Dan Gohman2015-10-023-0/+12
| | | | llvm-svn: 249179
* [WebAssembly] Add a __builtin_wasm_memory_size() intrinsic.Dan Gohman2015-10-023-0/+12
| | | | llvm-svn: 249176
* [Myriad]: Accept '-nostdlib' optionDouglas Katzman2015-10-022-17/+27
| | | | llvm-svn: 249166
* constify four getInstantiatedFromMemberTemplate() in DeclTemplate.h.Yaron Keren2015-10-021-4/+4
| | | | llvm-svn: 249159
* Module debugging: Don't emit forward declarations in module scopes.Adrian Prantl2015-10-023-0/+7
| | | | | | A forward declaration inside a module header does not belong to the module. llvm-svn: 249157
* Break long lines for readability.Adrian Prantl2015-10-021-2/+7
| | | | llvm-svn: 249156
* Remove unused variable.Adrian Prantl2015-10-021-1/+0
| | | | llvm-svn: 249155
* [OpenMP] Capture global variables in target regions.Samuel Antao2015-10-026-3/+251
| | | | | | | | | 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. llvm-svn: 249154
* constify ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember ↵Yaron Keren2015-10-021-4/+4
| | | | | | and VarTemplatePartialSpecializationDecl::getInstantiatedFromMember. llvm-svn: 249152
* [OpenMP] Target directive host codegen.Samuel Antao2015-10-025-7/+1035
| | | | | | | | | | | 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. llvm-svn: 249148
* [DarwinDriver] Reapply: Use -lto_library to specify the path for libLTO.dylibBruno Cardoso Lopes2015-10-024-9/+56
| | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 249143
* Make test more resilient to FastIsel changes. NFC.Andrea Di Biagio2015-10-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 249142
* Revert "Add support for the new mips-mti-linux toolchain."Vasileios Kalintiris2015-10-0217-296/+25
| | | | | | | This reverts commit r249137 because it broke the Windows buildbots and a Linux buildbot for LLD. llvm-svn: 249141
* Implement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] ↵Alexandros Lamprineas2015-10-025-7/+24
| | | | | | | | targets. Differential Revision: http://reviews.llvm.org/D12633 llvm-svn: 249140
* Fix bogus comment.Douglas Katzman2015-10-021-1/+1
| | | | llvm-svn: 249138
* Add support for the new mips-mti-linux toolchain.Vasileios Kalintiris2015-10-0217-25/+296
| | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 249137
* Move functions declared in Stmt{ObjC,CXX}.h and OpenMPClause.h intoJames Y Knight2015-10-026-1258/+1334
| | | | | | | | | | | 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. llvm-svn: 249131
* Divide TraverseInitListExpr to a different function for each form.Angel Garcia Gomez2015-10-021-17/+25
| | | | | | | | | | | | Summary: create TraverseSyntacticInitListExpr and TraverseSemanticInitListExpr. Reviewers: rsmith, klimek Subscribers: klimek, cfe-commits, alexfh Differential Revision: http://reviews.llvm.org/D13249 llvm-svn: 249129
* Be slightly more permissive when checking for type-erased blocks.Bob Wilson2015-10-022-1/+9
| | | | | | This is a patch from Doug that was inadvertently omitted from r241543. llvm-svn: 249116
* [CMake] Fixing clang bootstrap to use LLVM_RUNTIME_OUTPUT_INTDIR instead of ↵Chris Bieneman2015-10-021-6/+6
| | | | | | | | CMAKE_BINARY_DIR. This should make bootstrap builds work with multi-configuration generators. llvm-svn: 249115
* PR24921: checking explicitly-specified template arguments when matching aRichard Smith2015-10-022-6/+22
| | | | | | | partial specialization can perform conversions on the argument. Be sure we start again from the original argument when checking each possible template. llvm-svn: 249114
* Explicitly delete a function that is supposed to never be called.Richard Smith2015-10-021-1/+1
| | | | llvm-svn: 249113
* Fix the SSE4 byte sign extension in a cleaner way, and more thoroughlyChandler Carruth2015-10-019-21/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 249097
* Don't try to get a CXXRecordDecl from a non-class TemplateSpecializationType.Kaelyn Takata2015-10-012-0/+12
| | | | | | | | 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. llvm-svn: 249090
* Don't adjust field offsets when using external record layout.Zachary Turner2015-10-011-4/+11
| | | | | | | | | | | 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 llvm-svn: 249085
* Perform Objective-C lifetime adjustments before comparing deduced lambda ↵Douglas Gregor2015-10-015-11/+46
| | | | | | | | | | 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. llvm-svn: 249065
* [analyzer] Add TK_EntireMemSpace invalidation trait.Devin Coughlin2015-10-012-23/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 249063
* Simplify Sema::DeduceFunctionTypeFromReturnExpr and eliminae a redundant check.Douglas Gregor2015-10-011-7/+2
| | | | | | NFC llvm-svn: 249060
* Teach -Wtautological-overlap-compare about enumsGeorge Burgess IV2015-10-012-38/+123
| | | | | | | | | 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. llvm-svn: 249053
* Module debugging: Also emit Objective-C interfaces forward declarationsAdrian Prantl2015-10-013-3/+11
| | | | | | in their module scope when building a clang module. llvm-svn: 249031
* Allow a ToolChain to compute the path of a compiler-rt's component.Vasileios Kalintiris2015-10-014-57/+48
| | | | | | | | | | | | | | | | 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 llvm-svn: 249030
* [VFS] Remove unused setters. NFC.Benjamin Kramer2015-10-011-2/+0
| | | | llvm-svn: 249019
* [PowerPC] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* macros on all PPC coresHal Finkel2015-10-012-8/+9
| | | | | | | | | | | | 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. llvm-svn: 249009
* Revert "Decorating virtual functions load with invariant.load" and fixRenato Golin2015-10-012-16/+2
| | | | | | | 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. llvm-svn: 249005
* C++11 rangify for loops, NFC.Yaron Keren2015-10-011-29/+21
| | | | llvm-svn: 249001
* [clang-format] Add support of consecutive declarations alignmentDaniel Jasper2015-10-015-11/+342
| | | | | | | | | | | | | | | | | | | 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 llvm-svn: 248999
* Test fixPiotr Padlewski2015-10-011-1/+1
| | | | llvm-svn: 248984
OpenPOWER on IntegriCloud