summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Always use --eh-frame-hdr on FreeBSD, even for -staticEd Maste2016-04-122-1/+2
| | | | | | | | | | | | FreeBSD uses LLVM's libunwind on FreeBSD/arm64 today (and is expected to use it more widely in the future), and it requires the EH frame segment in static binaries. This is the same as r203742 for NetBSD. Differential Revision: http://reviews.llvm.org/D19029 llvm-svn: 266123
* Add a couple of missing vsx load and store intrinsics.Eric Christopher2016-04-122-0/+20
| | | | | | Patch by Jing Yu! llvm-svn: 266122
* Pass -backend-option to LLVM when there is no target machine.Yaxun Liu2016-04-122-16/+27
| | | | | | | | Clang should pass -backend-option to LLVM even though there is no target machine, since LLVM passes are used when emitting LLVM IR. Differential Revision: http://reviews.llvm.org/D17552 llvm-svn: 266117
* [modules] Extend r266113 to cope with submodules.Richard Smith2016-04-122-2/+4
| | | | llvm-svn: 266116
* [modules] When an incompatible module file is explicitly provided for a module,Richard Smith2016-04-122-2/+8
| | | | | | | | and we fall back to textual inclusion, don't require the module as a whole to be marked available; it's OK if some other file in the same module is missing, just as it would be if the header were explicitly marked textual. llvm-svn: 266113
* PR19957: [OpenCL] Incorrectly accepts implicit address space conversion with ↵Yaxun Liu2016-04-125-10/+183
| | | | | | | | | | | | ternary operator. Generates addrspacecast instead of bitcast for ternary operator when necessary, and diagnose ternary operator with incompatible second and third operands. https://llvm.org/bugs/show_bug.cgi?id=19957 Differential Revision: http://reviews.llvm.org/D17412 llvm-svn: 266111
* [analyzer] Nullability: Suppress return diagnostics in inlined functions.Devin Coughlin2016-04-122-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The nullability checker can sometimes miss detecting nullability precondition violations in inlined functions because the binding for the parameter that violated the precondition becomes dead before the return: int * _Nonnull callee(int * _Nonnull p2) { if (!p2) // p2 becomes dead here, so binding removed. return 0; // warning here because value stored in p2 is symbolic. else return p2; } int *caller(int * _Nonnull p1) { return callee(p1); } The fix, which is quite blunt, is to not warn about null returns in inlined methods/functions. This won’t lose much coverage for ObjC because the analyzer always analyzes each ObjC method at the top level in addition to inlined. It *will* lose coverage for C — but there aren’t that many codebases with C nullability annotations. rdar://problem/25615050 llvm-svn: 266109
* clang-cl: Remove -isystem, add -imsvc.Nico Weber2016-04-125-6/+14
| | | | | | | | | | | | | | | | | r260990 exposed -isystem in clang-cl. -isystem adds a directory to the front of the system include search path. The idea was to use this to point to a hermetic msvc install, but as it turns out this doesn't work: -isystem then adds the hermetic headers in front of clang's builtin headers, and clang's headers that are supposed to wrap msvc headers (say, stdarg.h) aren't picked up at all anymore. So revert that, and instead expose -imsvc which works as if the passed directory was part of %INCLUDE%: The header is treated as a system header, but it is searched after clang's lib/Header headers. Fixes half of PRPR26751. llvm-svn: 266108
* [OpenCL] Handle AddressSpaceConversion when target address space does not ↵Yaxun Liu2016-04-122-1/+22
| | | | | | | | | | | | | change. In codegen different address spaces may be mapped to the same address space for a target, e.g. in x86/x86-64 all address spaces are mapped to 0. Therefore AddressSpaceConversion should be translated by CreatePointerBitCastOrAddrSpaceCast instead of CreateAddrSpaceCast. Differential Revision: http://reviews.llvm.org/D18713 llvm-svn: 266107
* Stricter checks in the stack-protector codegen test.Evgeniy Stepanov2016-04-121-2/+2
| | | | llvm-svn: 266095
* Revert 266090, needs more testing first.Nico Weber2016-04-122-2/+1
| | | | llvm-svn: 266091
* clang-cl: Expose -nostdlibinc.Nico Weber2016-04-122-1/+2
| | | | llvm-svn: 266090
* [FileManager] Don't crash if reading from stdin and stat(".") failsDavid Majnemer2016-04-121-1/+1
| | | | | | | | | | | | | addAncestorsAsVirtualDirs("<stdin>") quickly returns without doing work because "<stdin>" has no parent_path. This violates the expectation that a subsequent call to getDirectoryFromFile("<stdin>") would succeed. Instead, it fails because it uses the "." if the file has no path component. Fix this by keeping the behavior between addAncestorsAsVirtualDirs and getDirectoryFromFile symmetric. llvm-svn: 266089
* Verify commit right by adding a blank line to ↵Yaxun Liu2016-04-121-0/+1
| | | | | | test/CodeGenOpenCL/address-spaces-conversions.cl. llvm-svn: 266083
* Moving clang-test-depends into the Clang tests folder and moving ↵Aaron Ballman2016-04-122-0/+2
| | | | | | vtables_blacklist into the Misc folder; NFC, this simply cleans up the generated solution so that these targets don't live in the root folder of the IDE. llvm-svn: 266079
* Remove unused diagnostics. NFC.Benjamin Kramer2016-04-122-5/+0
| | | | llvm-svn: 266057
* [OPENMP 4.0] Support for 'linear' clause in 'declare simd' directive.Alexey Bataev2016-04-1210-95/+358
| | | | | | | | | | The linear clause declares one or more list items to be private to a SIMD lane and to have a linear relationship with respect to the iteration space of a loop. 'linear' '(' <linear-list> [ ':' <linear-step> ] ')' When a linear-step expression is specified in a linear clause it must be either a constant integer expression or an integer-typed parameter that is specified in a uniform clause on the directive. The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses. llvm-svn: 266056
* [OPENMP 4.0] Support for 'aligned' clause in 'declare simd' directive.Alexey Bataev2016-04-129-112/+266
| | | | | | | | | The aligned clause declares that the object to which each list item points is aligned to the number of bytes expressed in the optional parameter of the aligned clause. 'aligned' '(' <argument-list> [ ':' <alignment> ] ')' The optional parameter of the aligned clause, alignment, must be a constant positive integer expression. If no optional parameter is specified, implementation-defined default alignments for SIMD instructions on the target platforms are assumed. The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses. llvm-svn: 266052
* [Clang][BuiltIn][avx512] Adding avx512 (shuf,sqrt{ss|sd},rsqrt ) builtin to ↵Michael Zuckerman2016-04-125-0/+954
| | | | | | clang llvm-svn: 266048
* [ASTMatchers]: fix crash in hasReturnValueMatthias Gehre2016-04-122-2/+5
| | | | | | | | | | | | | | | Summary: The crash was reproduced by the included test case. It was initially found through a crash of clang-tidy's misc-misplaced-widening-cast check. Reviewers: klimek, alexfh Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D18991 llvm-svn: 266043
* [OPENMP 4.0] Support for 'uniform' clause in 'declare simd' directive.Alexey Bataev2016-04-1215-161/+282
| | | | | | | | | OpenMP 4.0 defines clause 'uniform' in 'declare simd' directive: 'uniform' '(' <argument-list> ')' The uniform clause declares one or more arguments to have an invariant value for all concurrent invocations of the function in the execution of a single SIMD loop. The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses. llvm-svn: 266041
* Basic: fix profiling with GNU EABISaleem Abdulrasool2016-04-122-11/+25
| | | | | | | | | The GNU profiling support indicates that the interface is `_mcount` rather than `mcount`. Conditionalise the behaviour according to the `-meabi gnu` flag. Resolves PR27311 llvm-svn: 266039
* [analyzer] Fix assertion in ReturnVisitor for body-farm synthesized gettersDevin Coughlin2016-04-122-0/+16
| | | | | | | Don't emit a path note marking the return site if the return statement does not have a valid location. This fixes an assertion failure I introduced in r265839. llvm-svn: 266031
* Allow simultaneous safestack and stackprotector attributes.Evgeniy Stepanov2016-04-113-33/+36
| | | | | | | | | This is the clang part of http://reviews.llvm.org/D18846. SafeStack instrumentation pass adds stack protector canaries if both attributes are present on a function. StackProtector pass will step back if the function has a safestack attribute. llvm-svn: 266005
* libclang: fix two memory leaks (PR26292)Hans Wennborg2016-04-111-2/+3
| | | | llvm-svn: 265994
* Adjust tests to have consistent integer sizes.Richard Trieu2016-04-112-4/+14
| | | | | | | Add a triple to the run lines so that integers will the same sizes across runs. Also add a compile time check to ensure the assumptions about sizes are met. llvm-svn: 265991
* Lit C++11 Compatibility Patch #6Charles Li2016-04-1117-119/+510
| | | | | | | Updated the expected diagnostics of 17 OpenMP tests. The changes to each test are identical. llvm-svn: 265982
* Emit the module hash by default with -flto=thin.Mehdi Amini2016-04-111-1/+2
| | | | | | | | | | | Reviewers: tejohnson Subscribers: joker.eph, cfe-commits Differential Revision: http://reviews.llvm.org/D18947 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 265977
* [Clang][AVX512][BuiltIn] Adding avx512 ( ↵Michael Zuckerman2016-04-115-1/+828
| | | | | | | | psll{d|q}512,psllv{16si|8di},psra{d|q}512,psrav{16si|8di},pternlog{d|q}{128|256|512} ) builtin to clang Differential Revision: http://reviews.llvm.org/D18926 llvm-svn: 265964
* Update getting started docsReid Kleckner2016-04-111-6/+6
| | | | | | | | | | | | compiler-rt is optional. We often get email from users with compiler-rt build errors who don't actually need compiler-rt. Marking it optional should help them avoid those potential problems. While I'm here, update a reference to the build directory and remove an obsolete reference to llvm-gcc. Nobody today is under the impression that Clang depends on GCC. llvm-svn: 265963
* [CLANG] [AVX512] [BUILTIN] Adding PSRA{Q|D|QI|DI}{128|256|512} builtinMichael Zuckerman2016-04-115-0/+375
| | | | | | Differential Revision: http://reviews.llvm.org/D17693 llvm-svn: 265952
* [Clang][AVX512][BuiltIn] Adding avx512 ( ↵Michael Zuckerman2016-04-115-0/+973
| | | | | | | | punpck{h|l}{dq|qdq}{128|256|512},rndscale{ss|sd}, {scalef{ss|sd|pd512|ps512} ) builtin to clang Differential Revision: http://reviews.llvm.org/D18929 llvm-svn: 265935
* [clang-format] Walk backwards from end() instead of forwards from rend().Benjamin Kramer2016-04-111-1/+1
| | | | | | | | This should've been forwards from rbegin(), reverse iterators are just too confusing to be used by mere mortals. Fixes out-of-bounds walks over the list. llvm-svn: 265934
* [Clang][AVX512][BuiltIn] Adding avx512 ( ptest{n}m{b|w}{128|256|512} ) ↵Michael Zuckerman2016-04-119-0/+620
| | | | | | | | builtin to clang Differential Revision: http://reviews.llvm.org/D18924 llvm-svn: 265928
* Don't clutter the test directory with temporary IR files.Benjamin Kramer2016-04-111-2/+2
| | | | | | -emit-llvm emits a file, -emit-llvm-only doesn't. llvm-svn: 265926
* clang-format: [JS] Test for parameter annotations.Martin Probst2016-04-111-0/+3
| | | | | | | | | | | | Summary: Just to ensure no regressions, this already works fine. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D18950 llvm-svn: 265922
* Remove redundant conditions of the form (A || (!A && B)) -> (A || B)Benjamin Kramer2016-04-115-12/+8
| | | | | | Found by cppcheck! PR27286 PR27287 PR27288 PR27289 llvm-svn: 265918
* [GCC] Attribute ifunc support in clangDmitry Polukhin2016-04-1113-33/+265
| | | | | | | | | | | This patch add support for GCC attribute((ifunc("resolver"))) for targets that use ELF as object file format. In general ifunc is a special kind of function alias with type @gnu_indirect_function. LLVM patch http://reviews.llvm.org/D15525 Differential Revision: http://reviews.llvm.org/D15524 llvm-svn: 265917
* clang-format: [JS] do not insert semicolons after wrapped annotations.Martin Probst2016-04-112-0/+9
| | | | | | | | | | Reviewers: djasper Subscribers: klimek Differential Revision: http://reviews.llvm.org/D18943 llvm-svn: 265916
* [Clang][AVX512][BuiltIn] Adding avx512 ( vperm{i|t}2var, ↵Michael Zuckerman2016-04-115-0/+552
| | | | | | | | vpermil{var}{ps|pd}{256|512} ) builtin to clang. Differential Revision: http://reviews.llvm.org/D18933 llvm-svn: 265915
* [Clang][AVX512][BuiltIn] Adding avx512 ( vcvt ) builtin to clangMichael Zuckerman2016-04-103-0/+412
| | | | | | Differential Revision: http://reviews.llvm.org/D18932 llvm-svn: 265904
* Correct pg instrumentation for AArch64Saleem Abdulrasool2016-04-102-24/+20
| | | | | | | | | It seems that there was a miscommunication between Renato and I, and the original behaviour of AArch64 was to be preserved and not to mirror the new behaviour. Restore the original behaviour for AArch64. Addresses post-commit review comments from Renato Golin. llvm-svn: 265899
* Adding avx512 (unpck{h|l}{pd|ps}, rcp14{pd|ps}{128|256},vplzcnt{d|q} ) ↵Michael Zuckerman2016-04-105-4/+752
| | | | | | | | builtin to clang Differential Revision: http://reviews.llvm.org/D18931 llvm-svn: 265896
* [Clang][AVX512][BuiltIn] Adding avx512 ( store ) builtin to clangMichael Zuckerman2016-04-107-1/+268
| | | | | | Differential Revision: http://reviews.llvm.org/D18925 llvm-svn: 265895
* test: add additional tests for SVN r265888Saleem Abdulrasool2016-04-101-0/+23
| | | | | | Add test cases for AArch64 as well as that was changed as part of that change. llvm-svn: 265889
* Add support for __gnu_mcount_nc as the pg interfaceSaleem Abdulrasool2016-04-102-2/+55
| | | | | | | | | | | This adds support to optionally support using `__gnu_mcount_nc` as the mcount interface rather than `mcount` for Linux and EABI. The other targets do not provide an implementation for `__gnu_mcount_nc`. This can be activated via the `-meabi gnu` flag. Resolves PR23969. llvm-svn: 265888
* Basic: thread TargetOptions into TargetInfoSaleem Abdulrasool2016-04-091-292/+335
| | | | | | | | This threads TargetOptions into the TargetInfo hierarchy. This is a rework of the original attempt to thread additional information into the TargetInfo to make decisions based on additional ABI related options. llvm-svn: 265878
* ObjC kindof: check the context when inserting methods to global pool.Manman Ren2016-04-096-5/+59
| | | | | | | | | | | | | | | | To make kindof lookup work, we need to insert methods with different context into the global pool, even though they have the same siganture. Since diagnosis of availability is performed on the best candidate, which is often the first candidate from the global pool, we prioritize the methods that are unavaible or deprecated to the head of the list. Since we now have more methods in the global pool, we need to watch out for performance impact. rdar://25635831 llvm-svn: 265877
* [Concepts] Implement subsection [dcl.spec.concept]p7 of the Concepts TSNathan Wilson2016-04-094-0/+70
| | | | | | | | | | | | Summary: A program shall not declare an explicit instantiation (14.8.2), an explicit specialization (14.8.3), or a partial specialization of a concept definition. Reviewers: rsmith, hubert.reinterpretcast, faisalv, aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18221 llvm-svn: 265868
* [Perf-Training] Reworked workflow improvements for order-file generationChris Bieneman2016-04-083-13/+40
| | | | | | | | | | | | | | | | | | | This is re-landing r260742. I've reworked the conditionals so that it only hits when targeting Apple platforms with ld64. Original Summary: With this change generating clang order files using dtrace uses the following workflow: cmake <whatever options you want> ninja generate-order-file ninja clang This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one. CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file. llvm-svn: 265864
OpenPOWER on IntegriCloud