summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Handle UsingDecl and UsingShadowDecl in DeclContextPrinterAlex Lorenz2017-01-031-0/+8
| | | | | | | | | | | This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 llvm-svn: 290881
* Handle FriendDecl in DeclContextPrinterAlex Lorenz2017-01-031-0/+7
| | | | | | | | | | | This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 llvm-svn: 290880
* [CodeCompletion] Autocomplete NS_DESIGNATED_INITIALIZER in initializersAlex Lorenz2017-01-031-0/+17
| | | | | | | | | | with arguments rdar://21014571 Differential Revision: https://reviews.llvm.org/D27039 llvm-svn: 290879
* [OpenMP] Sema and parsing for 'target teams distribute parallel for simd’ ↵Kelvin Li2017-01-0313-18/+216
| | | | | | | | | | pragma This patch is to implement sema and parsing for 'target teams distribute parallel for simd’ pragma. Differential Revision: https://reviews.llvm.org/D28202 llvm-svn: 290862
* Remove isIgnored()-test that is more expensive than the analysis behind itDaniel Jasper2017-01-021-12/+2
| | | | | | | | | | In many translation units I have tried, the calls to isIgnored() removed in this patch are more expensive than doing the analysis that is behind it. The speed-up in translation units I have tried is between 10 and 20%. Review: https://reviews.llvm.org/D28208 llvm-svn: 290842
* Revert "DR1391: Check for implicit conversion sequences for non-dependent ↵Renato Golin2017-01-022-208/+85
| | | | | | | | | | | | | | function template parameters between deduction and substitution. The idea is to accept as many cases as possible, on the basis that substitution failure outside the immediate context is much more common during substitution than during implicit conversion sequence formation." This reverts commit r290808, as it broken all ARM and AArch64 test-suite test: MultiSource/UnitTests/C++11/frame_layout Also, please, next time, try to write a commit message in according to our guidelines: http://llvm.org/docs/DeveloperPolicy.html#commit-messages llvm-svn: 290811
* DR1391: Check for implicit conversion sequences for non-dependent functionRichard Smith2017-01-022-85/+208
| | | | | | | | | | | | template parameters between deduction and substitution. The idea is to accept as many cases as possible, on the basis that substitution failure outside the immediate context is much more common during substitution than during implicit conversion sequence formation. This does not implement the partial ordering portion of DR1391, which so far appears to be misguided. llvm-svn: 290808
* Address post-commit review comments.Richard Smith2017-01-021-3/+0
| | | | llvm-svn: 290807
* CodeGen: update comment about RTTI fieldSaleem Abdulrasool2017-01-011-1/+1
| | | | | | | | | | The MS ABI RTTI has a reserved field which is used as a cache for the demangled name. It must be zero-initialized, which is used as a hint by the runtime to say that the cache has not been populated. Since this field is populated at runtime, the RTTI structures must be placed in the .data section rather than .rdata. NFC llvm-svn: 290799
* [c++17] Implement P0522R0 as written. This allows a template template argumentRichard Smith2016-12-314-10/+112
| | | | | | | | | | | | | | | | | | | to be specified for a template template parameter whenever the parameter is at least as specialized as the argument (when there's an obvious and correct mapping from uses of the parameter to uses of the argument). For example, a template with more parameters can be passed to a template template parameter with fewer, if those trailing parameters have default arguments. This is disabled by default, despite being a DR resolution, as it's fairly broken in its current state: there are no partial ordering rules to cope with template template parameters that have different parameter lists, meaning that code that attempts to decompose template-ids based on arity can hit unavoidable ambiguity issues. The diagnostics produced on a non-matching argument are also pretty bad right now, but I aim to improve them in a subsequent commit. llvm-svn: 290792
* Remove redundant assertion.Richard Smith2016-12-311-3/+0
| | | | llvm-svn: 290780
* Wdocumentation fixSimon Pilgrim2016-12-301-133/+133
| | | | llvm-svn: 290773
* CodeGen: use a StringSwitch instead of cascasding ifsSaleem Abdulrasool2016-12-301-15/+8
| | | | | | | Change the cascading ifs to a StringSwitch to simplify the conversion of the relocation model. NFC llvm-svn: 290762
* Allow lexer to handle string_view literals. Patch from Anton Bikineev.Eric Fiselier2016-12-303-4/+13
| | | | | | | This implements the compiler side of p0403r0. This patch was reviewed as https://reviews.llvm.org/D26829. llvm-svn: 290744
* Remove bogus assertion and add testcase that triggers it.Richard Smith2016-12-301-2/+4
| | | | llvm-svn: 290743
* [OpenMP] Sema and parsing for 'target teams distribute parallel for’ pragmaKelvin Li2016-12-2913-16/+215
| | | | | | | | This patch is to implement sema and parsing for 'target teams distribute parallel for’ pragma. Differential Revision: https://reviews.llvm.org/D28160 llvm-svn: 290725
* [ItaniumABI] NFC changesPiotr Padlewski2016-12-281-2/+3
| | | | llvm-svn: 290677
* [ThinLTO] No need to rediscover imports in distributed backendTeresa Johnson2016-12-281-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | Summary: We can simply import all external values with summaries included in the individual index file created for the distributed backend job, as only those are added to the individual index file created by the WriteIndexesThinBackend (in addition to summaries for the original module, which are skipped here). While computing the cross module imports on this index would come to the same conclusion as the original thin link import logic, it is unnecessary work. And when tuning, it avoids the need to pass the same function importing parameters (e.g. -import-instr-limit) to both the thin link and the backends (otherwise they won't make the same decisions). Reviewers: mehdi_amini, pcc Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28139 llvm-svn: 290674
* Fix format. NFCKelvin Li2016-12-281-5/+8
| | | | llvm-svn: 290673
* Revert "Driver: switch Windows to static RelocModel"Reid Kleckner2016-12-283-6/+27
| | | | | | | This reverts commit r290569. It caused unforeseen codegen changes for switch jump tables described in PR31488. llvm-svn: 290672
* [CodeGen] Unique constant CompoundLiterals.George Burgess IV2016-12-282-4/+32
| | | | | | | | | | | | | | | | | | | | Our newly aggressive constant folding logic makes it possible for CGExprConstant to see the same CompoundLiteralExpr more than once. So, emitting a new GlobalVariable every time we see a CompoundLiteral is no longer correct. We had a similar issue with BlockExprs that was caught while testing said aggressive folding, so I applied the same style of fix (see D26410) here. If we find yet another case where this needs to happen, we should probably refactor this so we don't have a third DenseMap+getter+setter. As a design note: getAddrOfConstantCompoundLiteralIfEmitted is really only intended to be called by ConstExprEmitter::EmitLValue. So, returning a GlobalVariable* instead of a ConstantAddress costs us effectively nothing, and saves us either a few bytes per entry in our map or a bit of code duplication. llvm-svn: 290661
* Mark 'auto' as dependent when instantiating the type of a non-type templateRichard Smith2016-12-283-29/+37
| | | | | | | parameter. Fixes failed deduction for 'auto' non-type template parameters nested within templates. llvm-svn: 290660
* DR1315: a non-type template argument in a partial specialization is permittedRichard Smith2016-12-282-107/+145
| | | | | | | | | | to make reference to template parameters. This is only a partial implementation; we retain the restriction that the argument must not be type-dependent, since it's unclear how that would work given the existence of other language rules requiring an exact type match in this context, even for type-dependent cases (a question has been raised on the core reflector). llvm-svn: 290647
* DebugInfo: Don't include size/alignment on class declarationsDavid Blaikie2016-12-271-6/+0
| | | | | | | | | | This seems like it must've been a leftover by accident - no tests were backing it up & it doesn't make much sense to include size/alignment on class declarations (it'd only be on those declarations for which the definition was available - otherwise the size/alignment would not be known). llvm-svn: 290631
* Add warning flag for "partial specialization is not more specialized than ↵Richard Smith2016-12-271-2/+2
| | | | | | primary template" error (since Eigen hits it), and while I'm here also add a warning flag for "partial specialization is not usable because one or more of its parameters cannot be deduced" warning. llvm-svn: 290625
* [DOXYGEN] Improved doxygen comments for xmmintrin.h intrinsics.Ekaterina Romanova2016-12-271-105/+171
| | | | | | | | Added \n commands to insert a line breaks where necessary, since one long line of documentation is nearly unreadable. Formatted comments to fit into 80 chars. In some cases added \a command in front of the parameter names to display them in italics. llvm-svn: 290619
* DR1495: A partial specialization is ill-formed if it is not (strictly) moreRichard Smith2016-12-273-16/+161
| | | | | | | | specialized than the primary template. (Put another way, if we imagine there were a partial specialization matching the primary template, we should never select it if some other partial specialization also matches.) llvm-svn: 290593
* Work around a standard defect: template argument deduction for non-typeRichard Smith2016-12-272-8/+19
| | | | | | | | | template parameters of reference type basically doesn't work, because we're always deducing from an argument expression of non-reference type, so the type of the deduced expression never matches. Instead, compare the type of an expression naming the parameter to the type of the argument. llvm-svn: 290586
* Emit CCEDiags when evaluating a const variable.George Burgess IV2016-12-271-1/+4
| | | | | | This addresses post-review feedback from r290577. llvm-svn: 290584
* [AVX-512] Replace masked 512-bit pmuldq and pmuludq builtins with the newly ↵Craig Topper2016-12-271-30/+18
| | | | | | added unmasked versions and selects. llvm-svn: 290580
* Revert r290574 "foo"Craig Topper2016-12-271-18/+30
| | | | | | This was supposed to be merged with another commit with a real commit message. Sorry. llvm-svn: 290579
* Revert r290575 "[AVX-512] Replace masked 512-bit pmuldq and pmuludq builtins ↵Craig Topper2016-12-271-4/+4
| | | | | | | | with the newly added unmasked versions and selects." I failed to merge this with r290574. llvm-svn: 290578
* Factor out repeated code for deducing a non-type template parameter as a givenRichard Smith2016-12-271-81/+38
| | | | | | argument value. No functionality change intended. llvm-svn: 290576
* [AVX-512] Replace masked 512-bit pmuldq and pmuludq builtins with the newly ↵Craig Topper2016-12-271-4/+4
| | | | | | added unmasked versions and selects. llvm-svn: 290575
* fooCraig Topper2016-12-271-30/+18
| | | | llvm-svn: 290574
* Driver: switch Windows to static RelocModelSaleem Abdulrasool2016-12-273-27/+6
| | | | | | | | | | | | Windows uses PE/COFF which is inherently position independent. The use of the PIC model is unnecessary. In fact, we would generate invalid code using the ELF PIC model when PIC was enabled previously. Now that we no longer accept -fPIC and -fpoc, this switches the internal representation to the static model to permit us to make PIC modules invalid when targeting Windows. This should not change the code generation, only the internal state management. llvm-svn: 290569
* Check and build conversion sequences for non-type template arguments inRichard Smith2016-12-272-11/+9
| | | | | | | dependent contexts when processing the template in C++11 and C++14, just like we do in C++98 and C++1z. This allows us to diagnose invalid templates earlier. llvm-svn: 290567
* [DOXYGEN] Improved doxygen comments for x86 intrinsics.Ekaterina Romanova2016-12-278-203/+217
| | | | | | | | | | Improved doxygen comments for the following intrinsics headers: __wmmintrin_pclmul.h, bmiintrin.h, emmintrin.h, f16cintrin.h, immintrin.h, mmintrin.h, pmmintrin.h, tmmintrin.h Added \n commands to insert a line breaks where necessary, since one long line of documentation is nearly unreadable. Formatted comments to fit into 80 chars. In some cases added \a command in front of the parameter names to display them in italics. llvm-svn: 290561
* [PH] Teach the new PM code path to support -disable-llvm-passes.Chandler Carruth2016-12-271-10/+13
| | | | | | | | | | | This is kind of funny because I specifically did work to make this easy and then it didn't actually get implemented. I've also ported a set of tests that rely on this functionality to run with the new PM as well as the old PM so that we don't mess this up in the future. llvm-svn: 290558
* Update comment to match dr1770.Richard Smith2016-12-261-8/+7
| | | | llvm-svn: 290552
* Wdocumentation fixSimon Pilgrim2016-12-261-2/+2
| | | | llvm-svn: 290547
* Fix build error caused by r290539.Marina Yatsina2016-12-261-3/+2
| | | | llvm-svn: 290541
* [inline-asm]No error for conflict between inputs\outputs and clobber listMarina Yatsina2016-12-264-17/+103
| | | | | | | | | | | | | | | | | | | | | | | | | According to extended asm syntax, a case where the clobber list includes a variable from the inputs or outputs should be an error - conflict. for example: const long double a = 0.0; int main() { char b; double t1 = a; __asm__ ("fucompp": "=a" (b) : "u" (t1), "t" (t1) : "cc", "st", "st(1)"); return 0; } This should conflict with the output - t1 which is st, and st which is st aswell. The patch fixes it. Commit on behald of Ziv Izhar. Differential Revision: https://reviews.llvm.org/D15075 llvm-svn: 290539
* Driver: warn on -fPIC/-fpic/-fPIE/-fpie on WindowsSaleem Abdulrasool2016-12-261-0/+11
| | | | | | | | | | | | Use of these flags would result in the use of ELF-style PIE/PIC code which is incorrect on Windows. Windows is inherently PIC by means of the DLL slide that occurs at load. This also mirrors the behaviour on GCC for MinGW. Currently, the Windows x86_64 forces the relocation model to PIC (Level 2). This is unchanged for now, though we should remove any assumptions on that and change it to a static relocation model. llvm-svn: 290533
* Fix assertion failure when deducing an auto-typed argument against a ↵Richard Smith2016-12-251-1/+1
| | | | | | different-width int. llvm-svn: 290522
* [DebugInfo] Added support for Checksum debug info feature.Amjad Aboud2016-12-252-5/+48
| | | | | | Differential Revision: https://reviews.llvm.org/D27641 llvm-svn: 290515
* Fix some subtle wrong partial ordering bugs particularly with C++1z auto-typedRichard Smith2016-12-252-76/+128
| | | | | | | | | | | | | | | | | | non-type template parameters. During partial ordering, when checking the substituted deduced template arguments match the original, check the types of non-type template arguments match even if they're dependent. The only way we get dependent types here is if they really represent types of the other template (which are supposed to be modeled as being substituted for unique, non-dependent types). In order to make this work for auto-typed non-type template arguments, we need to be able to perform auto deduction even when the initializer and (potentially) the auto type are dependent, support for which is the bulk of this patch. (Note that this requires the ability to deduce only a single level of a multi-level dependent type.) llvm-svn: 290511
* [MS ABI] Mangle unnamed enums correctlyDavid Majnemer2016-12-251-2/+9
| | | | | | Unnamed enums take the name of the first enumerator they define. llvm-svn: 290509
* [OpenMP] Sema and parsing for 'target teams distribute' pragmaKelvin Li2016-12-2513-16/+185
| | | | | | | | This patch is to implement sema and parsing for 'target teams distribute' pragma. Differential Revision: https://reviews.llvm.org/D28015 llvm-svn: 290508
* Fix for PR15623 (corrected r290413 reverted at 290415). The patch eliminates ↵Anton Yartsev2016-12-252-18/+20
| | | | | | | | | unwanted ProgramState checker data propagation from an operand of the logical operation to operation result. The patch also simplifies an assume of a constraint of the form: "(exp comparison_op expr) != 0" to true into an assume of "exp comparison_op expr" to true. (And similarly, an assume of the form "(exp comparison_op expr) == 0" to true as an assume of exp comparison_op expr to false.) which improves precision overall. https://reviews.llvm.org/D22862 llvm-svn: 290505
OpenPOWER on IntegriCloud