summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP 4.1] Parsing/sema analysis for extended format of 'if' clause.Alexey Bataev2015-09-0322-99/+470
| | | | | | | | | | | | | | | | | OpenMP 4.1 added special 'directive-name-modifier' to the 'if' clause. Format of 'if' clause is as follows: ``` if([ directive-name-modifier :] scalar-logical-expression) ``` The restriction rules are also changed. 1. If any 'if' clause on the directive includes a 'directive-name-modifier' then all 'if' clauses on the directive must include a 'directive-name-modifier'. 2. At most one 'if' clause without a 'directive-name-modifier' can appear on the directive. 3. At most one 'if' clause with some particular 'directive-name-modifier' can appear on the directive. 'directive-name-modifier' is important for combined directives and allows to separate conditions in 'if' clause for simple sub-directives in combined directive. This 'directive-name-modifier' identifies the sub-directive to which this 'if' clause must be applied. llvm-svn: 246747
* Remove inadvertent debug output from prior change.Douglas Katzman2015-09-021-1/+0
| | | | llvm-svn: 246715
* Use new utility function to clean leading junk from pathnames. NFCDouglas Katzman2015-09-022-18/+4
| | | | llvm-svn: 246714
* [analyzer] Refactoring: bring together scan-build options and environment ↵Anton Yartsev2015-09-021-269/+301
| | | | | | | | | | | variables. Full list of changes: - all scan-build command-line arguments are now kept in %Options hash. - most of environment variables scan-build operates with are stored in %EnvVars hash. - moved processing of command-line arguments to the ProcessArgs subroutine. llvm-svn: 246710
* Migrate the target attribute parsing code to returning an instanceEric Christopher2015-09-022-29/+18
| | | | | | | | every time it's called rather than attempting to cache the result. It's unlikely to be called frequently and the overhead of using it in the first place is already factored out. llvm-svn: 246706
* [modules] Tighten up this test a bit.Sean Silva2015-09-021-5/+6
| | | | llvm-svn: 246702
* Update comment for AdditionalMembers with a note to avoid usingEric Christopher2015-09-021-0/+2
| | | | | | | additional data members in attributes as they'll leak and provide some guidance as to where they should be allocated if necessary. llvm-svn: 246701
* Do not include default sanitizer blacklists into -M/-MM/-MD/-MMD output.Ivan Krasin2015-09-027-6/+30
| | | | | | | | | | | | | | | | | Summary: Do not include default sanitizer blacklists into -M/-MM/-MD/-MMD output. Introduce a frontend option -fdepfile-entry, and only insert them for the user-defined sanitizer blacklists. In frontend, grab ExtraDeps from -fdepfile-entry, instead of -fsanitize-blacklist. Reviewers: rsmith, pcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12544 llvm-svn: 246700
* add __builtin_unpredictable and convert to metadataSanjay Patel2015-09-026-3/+93
| | | | | | | | | | | | | | | | | | | | | | | This patch depends on r246688 (D12341). The goal is to make LLVM generate different code for these functions for a target that has cheap branches (see PR23827 for more details): int foo(); int normal(int x, int y, int z) { if (x != 0 && y != 0) return foo(); return 1; } int crazy(int x, int y) { if (__builtin_unpredictable(x != 0 && y != 0)) return foo(); return 1; } Differential Revision: http://reviews.llvm.org/D12458 llvm-svn: 246699
* [modules] Don't waste time reading in the names the module file writer gave ↵Richard Smith2015-09-021-7/+1
| | | | | | to blocks. We don't need these names, and decoding the corresponding bitcode has a significant cost. llvm-svn: 246680
* [MS ABI] Number unnamed TagDecls which aren't externally visibleDavid Majnemer2015-09-022-1/+19
| | | | | | | | | | | | TagDecls (structs, enums, etc.) may have the same name for linkage purposes of one another; to disambiguate, we add a number to the mangled named. However, we didn't do this if the TagDecl has a pseudo-name for linkage purposes (it was defined alongside a DeclaratorDecl or a TypeNameDecl). This fixes PR24651. llvm-svn: 246659
* [OpenMP] Make helper functoin static. NFC.Benjamin Kramer2015-09-021-1/+1
| | | | llvm-svn: 246657
* [Shave]: pass through more clang options to moviCompileDouglas Katzman2015-09-022-4/+5
| | | | llvm-svn: 246652
* [Sparc]: GCCInstallationDetector should not care if little-endianDouglas Katzman2015-09-021-1/+1
| | | | llvm-svn: 246650
* Silence a -Wsign-compare warning; NFC.Aaron Ballman2015-09-021-1/+1
| | | | llvm-svn: 246646
* [Sema] Avoid crash on tag-type mismatch (Fixes PR24610)Vedant Kumar2015-09-022-0/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D12444 llvm-svn: 246618
* Migrate the target attribute parsing code into an extension off ofEric Christopher2015-09-022-30/+52
| | | | | | | | | | the main attribute and cache the results so we don't have to parse a single attribute more than once. This reapplies r246596 with a fix for an uninitialized class member, and a couple of cleanups and formatting changes. llvm-svn: 246610
* Fix assertion failure in TransformOpaqueValueExprHubert Tong2015-09-012-1/+7
| | | | | | | | | | | | | | | | | | | | Summary: `OpaqueValueExpr`s may not have a source expression (as in the case when they are created due to a default argument error). This can cause an assertion failure in `TransformOpaqueValueExpr` during template instantiation. This patch fixes the assertion failure. Reviewers: hfinkel, rsmith Subscribers: fraggamuffin, cfe-commits Differential Revision: http://reviews.llvm.org/D11582 Patch by Rachel Craik! llvm-svn: 246600
* Revert "Migrate the target attribute parsing code into an extension off of"Eric Christopher2015-09-012-54/+30
| | | | | | | | This is failing in release mode. Revert while I figure out what's happening. This reverts commit r246596. llvm-svn: 246598
* Migrate the target attribute parsing code into an extension off ofEric Christopher2015-09-012-30/+54
| | | | | | | the main attribute and cache the results so we don't have to parse a single attribute more than once. llvm-svn: 246596
* Use hasAttr, not getAttr if we're just checking for presence.Eric Christopher2015-09-011-1/+1
| | | | llvm-svn: 246595
* [MS ABI] Switch to the CRC implementation in LLVMDavid Majnemer2015-09-011-29/+5
| | | | | | | We now have an implementation of the CRC in LLVM's libSupport. Let's consolidate around that one. llvm-svn: 246591
* Make trunk release notes point to 3.7, not 3.6Nico Weber2015-09-011-2/+2
| | | | llvm-svn: 246589
* Re-commit r246497 (and dependent changes r246524 and r246521), reverted inRichard Smith2015-09-0113-254/+570
| | | | | | | | | | | | | | | | | | | r246546, with a workaround for an MSVC 2013 miscompile and an MSVC 2015 rejects-valid. Original commit message: [modules] Rework serialized DeclContext lookup table management. Instead of walking the loaded ModuleFiles looking for lookup tables for the context, store them all in one place, and merge them together if we find we have too many (currently, more than 4). If we do merge, include the merged form in our serialized lookup table, so that downstream readers never need to look at our imports' tables. This gives a huge performance improvement to builds with very large numbers of modules (in some cases, more than a 2x speedup was observed). llvm-svn: 246582
* Fix typo in testEli Bendersky2015-09-011-2/+2
| | | | llvm-svn: 246573
* Pull initFeatureMap out of line now that it's used in multiple places.Eric Christopher2015-09-012-9/+13
| | | | llvm-svn: 246565
* Add a new frontend warning for referencing members from the handler of a ↵Aaron Ballman2015-09-0112-43/+180
| | | | | | | | constructor or destructor function-try-block, which is UB in C++. This corresponds to the CERT secure coding rule ERR53-CPP. llvm-svn: 246548
* Reverting r246497 (which requires also reverting r246524 and r246521 to ↵Aaron Ballman2015-09-0113-552/+254
| | | | | | | | | | | avoid merge conflicts). It broke the build on MSVC 2015. It also broke an MSVC 2013 bot with testing issues. llvm\tools\clang\lib\serialization\MultiOnDiskHashTable.h(117): error C2065: 'Files': undeclared identifier http://bb.pgr.jp/builders/ninja-clang-i686-msc18-R/builds/2917 llvm-svn: 246546
* [modules] When emitting line tables, only emit filenames that are actually ↵Richard Smith2015-09-012-7/+18
| | | | | | referenced by the entries that we emit. llvm-svn: 246534
* Don't use fprintf to emit this diagnostic!Richard Smith2015-09-013-3/+10
| | | | llvm-svn: 246526
* Use a more appropriate way of writing 1.Richard Smith2015-09-011-2/+1
| | | | llvm-svn: 246524
* [MS ABI] Cleanup get*ForUnnamedTagDeclDavid Majnemer2015-09-011-4/+4
| | | | | | | Use "lookup" instead of operator[], it will not perform unnecessary insertions. No functionality change is intended. llvm-svn: 246523
* [modules] Preserve DeclID order when merging lookup tables to give a moreRichard Smith2015-09-015-14/+44
| | | | | | | | predictable diagnostic experience. The hash-of-DeclID order we were using before gave different results on Win32 due to a different predefined declaration of __builtin_va_list. llvm-svn: 246521
* Fix path seperator for Windows.Yaron Keren2015-09-011-3/+3
| | | | llvm-svn: 246520
* [PowerPC] Support __builtin_ppc_get_timebaseHal Finkel2015-08-313-0/+14
| | | | | | | | | | GCC 4.8+ has a PowerPC-specific intrinsic, __builtin_ppc_get_timebase, to do what Clang's __builtin_readcyclecounter does. For compatibility with code that uses GCC's spelling (including glibc), support it as well. Partially fixes PR23681. llvm-svn: 246510
* Revert "Pull the target attribute parsing out of CGCall and onto TargetInfo."Eric Christopher2015-08-313-64/+44
| | | | | | This reverts commit r246468 while we figure out what to do about Basic and AST. llvm-svn: 246508
* [modules] Add some missing blockinfo records.Richard Smith2015-08-312-3/+32
| | | | llvm-svn: 246504
* [modules] Rework serialized DeclContext lookup table management. Instead ofRichard Smith2015-08-3113-255/+524
| | | | | | | | | | | | | walking the loaded ModuleFiles looking for lookup tables for the context, store them all in one place, and merge them together if we find we have too many (currently, more than 4). If we do merge, include the merged form in our serialized lookup table, so that downstream readers never need to look at our imports' tables. This gives a huge performance improvement to builds with very large numbers of modules (in some cases, more than a 2x speedup was observed). llvm-svn: 246497
* Fix CHECK directives that weren't checking.Hans Wennborg2015-08-3110-25/+26
| | | | llvm-svn: 246492
* Revert r246345 until an assertion is fixed.Gabor Horvath2015-08-314-866/+10
| | | | llvm-svn: 246479
* Stop hardcoding GCC paths in crt/ld.so lookup.Rafael Espindola2015-08-3110-43/+139
| | | | | | | | | | This patch refactors the code to use the GCC installation detector (modified so that it works in Solaris), and uses ToolChain::GetFilePath everywhere once it works. Patch by Xan López <xan@igalia.com>! llvm-svn: 246473
* [MS ABI] Correctly mangle classes without names for linkage purposesDavid Majnemer2015-08-3114-57/+184
| | | | | | | | | | | | | | | | A class without a name for linkage purposes gets a name along the lines of <unnamed-type-foo> where foo is either the name of a declarator which defined it (like a variable or field) or a typedef-name (like a typedef or alias-declaration). We handled the declarator case correctly but it would fall down during template instantiation if the declarator didn't share the tag's type. We failed to handle the typedef-name case at all. Instead, keep track of the association between the two and keep it up to date in the face of template instantiation. llvm-svn: 246469
* Pull the target attribute parsing out of CGCall and onto TargetInfo.Eric Christopher2015-08-313-44/+64
| | | | | | | | | Also: - Add a typedef to make working with the result easier. - Update callers to use the new function. - Make initFeatureMap out of line. llvm-svn: 246468
* Pull out the ppc incompatible features check into a separate function.Eric Christopher2015-08-311-27/+36
| | | | llvm-svn: 246467
* [CUDA] fix codegen for __nvvm_atom_min/max_gen_u*Jingyue Wu2015-08-312-12/+16
| | | | | | | | | | | | Summary: Clang should emit "atomicrmw umin/umax" instead of "atomicrmw min/max". Reviewers: eliben, tra Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12487 llvm-svn: 246455
* [OpenMP] base specific_clause_iterator on iterator_adaptor_base.Benjamin Kramer2015-08-311-25/+12
| | | | | | Removes some boilerplate code. No functionality change intended. llvm-svn: 246452
* PR17829: Proper diagnostic of mangled names conflictsAndrey Bokhanko2015-08-315-99/+189
| | | | | | | | | | Proper diagnostic and resolution of mangled names conflicts between C++ methods and C functions. This patch implements support for functions/methods only; support for variables is coming separately. Differential Revision: http://reviews.llvm.org/D11297 llvm-svn: 246438
* AVX-512: Changed cnt parameter in valignq/d intrinsic from i8 to i32 ↵Igor Breger2015-08-311-2/+2
| | | | | | | | according to the Intel Spec Differential Revision: http://reviews.llvm.org/D12274 llvm-svn: 246430
* [OPENMP 4.0] Codegen for array sections.Alexey Bataev2015-08-314-22/+271
| | | | | | Added codegen for array section in 'depend' clause of 'task' directive. It emits to pointers, one for the begin of array section and another for the end of array section. Size of the section is calculated as (end + 1 - start) * sizeof(basic_element_type). llvm-svn: 246422
* [OpenCL] Improve diagnostics detecting implicit vector conversion.Alexey Bader2015-08-303-2/+16
| | | | | | | | Reviewers: pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D12470 llvm-svn: 246393
OpenPOWER on IntegriCloud