summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [DebugInfo] Generate debug information for labels.Shiva Chen2018-05-096-2/+85
| | | | | | | | | | | Generate DILabel metadata and call llvm.dbg.label after label statement to associate the metadata with the label. Differential Revision: https://reviews.llvm.org/D45045 Patch by Hsiangkai Wang. llvm-svn: 331843
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-09606-14009/+14009
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
* Set CMAKE_BUILD_WITH_INSTALL_RPATH for Fuchsia runtimesPetr Hosek2018-05-091-0/+1
| | | | | | | | | | This doesn't make any difference since we don't use RPATH/RUNPATH on Fuchsia but it avoids the CMake error when re-linking libraries while building with Ninja. Differntial Revision: https://reviews.llvm.org/D46610 llvm-svn: 331833
* [CMake] Include llvm-strip in Fuchsia toolchain distributionPetr Hosek2018-05-091-0/+1
| | | | | | | | Now that llvm-strip is available, include it in the Fuchsia toolchain. Differential Revision: https://reviews.llvm.org/D46612 llvm-svn: 331826
* [X86] Mark builtins 'const' where possibleCraig Topper2018-05-082-1403/+1401
| | | | | | | | | | I attempted to go through all the builtins and marked them const if they didn't touch memory or other hidden state. I don't know how to test this or if it really matters. Differential Revision: https://reviews.llvm.org/D46349 llvm-svn: 331814
* Fix float->int conversion warnings when near barriers.Erich Keane2018-05-084-22/+20
| | | | | | | | | | | | As Eli brought up here: https://reviews.llvm.org/D46535 I'd previously messed up this fix by missing conversions that are just slightly outside the range. This patch fixes this by no longer ignoring the return value of convertToInteger. Additionally, one of the error messages wasn't very sensical (mentioning out of range value, when it really was not), so it was cleaned up as well. llvm-svn: 331812
* [HIP] Add hip offload kindYaxun Liu2018-05-084-17/+35
| | | | | | | | | There are quite differences in HIP action builder and action job creation, which justifies to define a separate offload kind. Differential Revision: https://reviews.llvm.org/D46471 llvm-svn: 331811
* Add a mno-outline flag to disable the MachineOutlinerJessica Paquette2018-05-083-3/+11
| | | | | | | | | | | Since we're working on turning the MachineOutliner by default under -Oz for AArch64, it makes sense to have an -mno-outline flag available. This currently doesn't do much (it basically just undoes -moutline). When the MachineOutliner is on by default under AArch64, this flag should set -mllvm -enable-machine-outliner=never. llvm-svn: 331810
* [Driver] Don't add -dwarf-column-info when using -gcodeview on non-msvc targetsMartin Storsjo2018-05-082-1/+3
| | | | | | | | | | | | | | -dwarf-column-info is omitted if -gcodeview is specified for msvc targets at the moment, but since -gcodeview is an option that can be specified for any target, there's little reason to restrict this handling to msvc targets. This allows getting proper codeview debug info by passing -gcodeview for e.g. MinGW targets as well. Differential Revision: https://reviews.llvm.org/D46287 llvm-svn: 331807
* Change -foutline to -moutlineJessica Paquette2018-05-083-4/+4
| | | | | | | | | Nitpicky, but the MachineOutliner is a machine-level pass, and so we should reflect that by using "m" instead of "n". Figured we should get this in before people get used to the letter f. :) llvm-svn: 331806
* Add missing newlines to cl::extrahelp usesStephane Sezer2018-05-083-3/+3
| | | | llvm-svn: 331802
* [lit] Fix running tests that require 'examples'.Zachary Turner2018-05-081-0/+1
| | | | | | | Differential Revision: https://reviews.llvm.org/D46514 Patch by Nikolai Kosjar. llvm-svn: 331786
* [OPENMP, NVPTX] Fix linkage of the global entries.Alexey Bataev2018-05-0851-377/+377
| | | | | | | The linkage of the global entries must be weak to enable support of redefinition of the same target regions in multiple compilation units. llvm-svn: 331768
* [OpenCL] Factor out language version printingSven van Haastregt2018-05-084-11/+12
| | | | | | | | | Generate a printable OpenCL language version number in a single place and select between the OpenCL C or OpenCL C++ version accordingly. Differential Revision: https://reviews.llvm.org/D46382 llvm-svn: 331766
* [ASTImporter] Properly import SourceLocations of AttrsAleksei Sidorin2018-05-084-13/+58
| | | | | | | | Patch by Rafael Stahl! Differential Revision: https://reviews.llvm.org/D46115 llvm-svn: 331762
* [ASTMatchers] Overload isConstexpr for ifStmtsGabor Horvath2018-05-083-4/+38
| | | | | | Differential Revision: https://reviews.llvm.org/D46233 llvm-svn: 331759
* Fix 'not all control paths return a value' MSVC warnings. NFCI.Simon Pilgrim2018-05-082-0/+2
| | | | llvm-svn: 331753
* [clang-format] Add raw string formatting to release notesKrasimir Georgiev2018-05-081-0/+4
| | | | | | | | | | | | Reviewers: hans Reviewed By: hans Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46572 llvm-svn: 331750
* [C++2a] Implement operator<=>: Fix another bug in the code gen tests.Eric Fiselier2018-05-081-1/+2
| | | | | | | Sorry for the failures. I'm quite new at writing code gen tests, and I'm not sure the best way to make them portable. llvm-svn: 331745
* [x86] Introduce the encl[u|s|v] intrinsicsGabor Buella2018-05-085-0/+103
| | | | | | | | | | Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D46435 llvm-svn: 331743
* [x86] Introduce the pconfig intrinsicGabor Buella2018-05-0811-0/+86
| | | | | | | | | | Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D46431 llvm-svn: 331740
* [CMake] Pass additional CMake flags in Fuchsia cache filesPetr Hosek2018-05-082-6/+26
| | | | | | | | | This allows passing additional CMake flags to builtins and runtimes build through Fuchsia cache files. Differential Revision: https://reviews.llvm.org/D45997 llvm-svn: 331717
* [C++2a] operator<=>: Fix incorrect use of Twine.Eric Fiselier2018-05-081-3/+3
| | | | llvm-svn: 331713
* [C++2a] Implement operator<=>: Address bugs and post-commit review comments ↵Eric Fiselier2018-05-089-92/+72
| | | | | | | | | | | | after r331677. This patch addresses some mostly trivial post-commit review comments received on r331677. Additionally, this patch fixes an assertion in `getNarrowingKind` caused by the use of an uninitialized value from `checkThreeWayNarrowingConversion`. llvm-svn: 331707
* Move test input file into same directory as test. NFCRichard Trieu2018-05-082-1/+1
| | | | llvm-svn: 331706
* Fix failing codegen test on non-x86_64 platformsEric Fiselier2018-05-071-38/+39
| | | | llvm-svn: 331697
* PR37352: mangle numbering for decomposition declarations.Richard Smith2018-05-072-1/+64
| | | | | | | | | | In order to match our mangling scheme, use a different set of numbers for decomposition declarations, and consider all binding names when forming the numbering. This does not yet affect any mangled names we produce, because local decomposition declarations can't yet have linkage, but a C++ standard proposal to change that is currently being processed. llvm-svn: 331692
* [NFC] Move 2 variable initialization from Ctor to member initializers.Erich Keane2018-05-071-5/+3
| | | | | | | In response to dblaikie's suggestion on r331536, replace the two enum typed variable initializers in the constructor with member initializers. llvm-svn: 331688
* [X86] Use target feature defines in tests instead of defining our own flag ↵Craig Topper2018-05-073-10/+10
| | | | | | on the command line. NFCI llvm-svn: 331683
* [X86] Make _mm256_gf2p8mul_epi8 require avx features since its 256 bits.Craig Topper2018-05-071-6/+10
| | | | | | | | Without this we throw an error on the header file instead of the user code when the right features aren't enabled in clang. Rename the other DEFAULT_FN_ATTRS defines to _Z for 512-bit since I used _Y for this case. llvm-svn: 331682
* Relax a FileCheck pattern to make it pass on Windows.Peter Collingbourne2018-05-071-1/+1
| | | | | | | Should fix Windows bot failure: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/16956 llvm-svn: 331681
* [C++2a] Implement operator<=> CodeGen and ExprConstantEric Fiselier2018-05-0724-392/+3548
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch tackles long hanging fruit for the builtin operator<=> expressions. It is currently needs some cleanup before landing, but I want to get some initial feedback. The main changes are: * Lookup, build, and store the required standard library types and expressions in `ASTContext`. By storing them in ASTContext we don't need to store (and duplicate) the required expressions in the BinaryOperator AST nodes. * Implement [expr.spaceship] checking, including diagnosing narrowing conversions. * Implement `ExprConstant` for builtin spaceship operators. * Implement builitin operator<=> support in `CodeGenAgg`. Initially I emitted the required comparisons using `ScalarExprEmitter::VisitBinaryOperator`, but this caused the operand expressions to be emitted once for every required cmp. * Implement [builtin.over] with modifications to support the intent of P0946R0. See the note on `BuiltinOperatorOverloadBuilder::addThreeWayArithmeticOverloads` for more information about the workaround. Reviewers: rsmith, aaron.ballman, majnemer, rnk, compnerd, rjmccall Reviewed By: rjmccall Subscribers: rjmccall, rsmith, aaron.ballman, junbuml, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D45476 llvm-svn: 331677
* [CFI] Force LLVM to die if the implicit blacklist files cannot be found.Peter Collingbourne2018-05-074-1/+9
| | | | | | | | | | | | | | Currently LLVM CFI tries to use an implicit blacklist file, currently in /usr/lib64/clang/<version>/share. If the file is not there, LLVM happily continues, which causes CFI to add checks to files/functions that are known to fail, generating binaries that fail. This CL causes LLVM to die (I hope) if it can't find these implicit blacklist files. Patch by Caroline Tice! Differential Revision: https://reviews.llvm.org/D46403 llvm-svn: 331674
* Correct warning on Float->Integer conversions.Erich Keane2018-05-075-4/+34
| | | | | | | | | | | | | | | | | | As identified and briefly discussed here: https://bugs.llvm.org/show_bug.cgi?id=37305 Converting a floating point number to an integer type when the integral part is out of the range of the integer type is undefined behavior in C. Additionally, CodeGen emits an undef in this situation. HOWEVER, we've been giving a warning that says that the value is changed. This patch corrects the warning to list that it is actually undefined behavior. Differential Revision: https://reviews.llvm.org/D46535 llvm-svn: 331673
* [Driver] Use -fuse-line-directives by default in MSVC modeMartin Storsjo2018-05-072-2/+3
| | | | | | | | Don't use the GNU extension form of line markers in MSVC mode. Differential Revision: https://reviews.llvm.org/D46520 llvm-svn: 331666
* [OPENMP, NVPTX] Small test fix, NFC.Alexey Bataev2018-05-071-2/+2
| | | | llvm-svn: 331654
* [OPENMP, NVPTX] Codegen for critical construct.Alexey Bataev2018-05-073-2/+94
| | | | | | Added correct codegen for the critical construct on NVPTX devices. llvm-svn: 331652
* Fix explicit template parameter reporting for narrowing conversionsErich Keane2018-05-072-0/+16
| | | | | | | | | | | | | | | | | | I found that explicit template parameters that caused a narrowing integer conversion resulted in the incorrect parameter being mentioned in the note (see test attached). This is because the argument checking code doesn't check to see if it caused SFINAE errors when checking the arguments, so instead of giving up on the first error, it continues through the list. This makes the error reporting pick up the last template param every time. This patch checks these parameters on each argument and gives up if there is an error. The result is that only the required amount of arguments are checked, and that the 'Converted' array contains only the successful arguments before the first failure, as the calls seem to all expect. llvm-svn: 331651
* [docs] Fix typos in the Clang User's Manual.Joel Galenson2018-05-071-2/+2
| | | | llvm-svn: 331644
* [OPENMP, NVPTX] Added support for L2 parallelism.Alexey Bataev2018-05-076-195/+459
| | | | | | | Added initial codegen for level 2, 3 etc. parallelism. Currently, all the second, the third etc. parallel regions will run sequentially. llvm-svn: 331642
* [mips] Improve handling of -fno-[pic/PIC] optionAleksandar Beserminji2018-05-077-19/+61
| | | | | | | | | | | | | | | In order to disable PIC and to match GCC behaviour, -mno-abicalls option is neccessary. When -fno-[pic/PIC] is used witout -mno-abicalls, warning is reported. An error is reported when -fno-pic or -fno-PIC is used in combination with -mabicalls. In this commit, test case is added. Depends on D44381. Differential Revision: https://reviews.llvm.org/D44684 llvm-svn: 331640
* Revert "[mips] Improve handling of -fno-[pic/PIC] option"Aleksandar Beserminji2018-05-076-59/+19
| | | | | | This reverts commit r331636. Forgot to add the test case. llvm-svn: 331639
* [mips] Improve handling of -fno-[pic/PIC] optionAleksandar Beserminji2018-05-076-19/+59
| | | | | | | | | | | | | In order to disable PIC and to match GCC behaviour, -mno-abicalls option is neccessary. When -fno-[pic/PIC] is used witout -mno-abicalls, warning is reported. An error is reported when -fno-pic or -fno-PIC is used in combination with -mabicalls. Depends on D44381. Differential Revision: https://reviews.llvm.org/D44684 llvm-svn: 331636
* [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, ↵Peter Szecsi2018-05-072-1/+141
| | | | | | | | | | DependentScopeDeclRefExpr The visit callback implementations for the 3 C++ AST Node added to the ASTImporter. Differential Revision: https://reviews.llvm.org/D38845 llvm-svn: 331630
* Remove now-unnecessary check for non-zero nvsize in addition toRichard Smith2018-05-071-2/+2
| | | | | | emptyness in MS record layout. llvm-svn: 331621
* Non-zero-length bit-fields make a class non-empty.Richard Smith2018-05-075-21/+56
| | | | | | | | | | | | | | | | | | | | This implements the rule intended by the standard (see LWG 2358) and the rule intended by the Itanium C++ ABI (see https://github.com/itanium-cxx-abi/cxx-abi/pull/51), and makes Clang match the behavior of GCC, ICC, and MSVC. A pedantic reading of both the standard and the ABI indicate that Clang is currently technically correct, but that's not worth much when it's clear that the wording is wrong in both those places. This is an ABI break for classes that derive from a class that is empty other than one or more unnamed non-zero-length bit-fields. Such cases are expected to be rare, but -fclang-abi-compat=6 restores the old behavior just in case. Differential Revision: https://reviews.llvm.org/D45174 llvm-svn: 331620
* Disallow pointers to const in __sync_fetch_and_xxx.Aaron Ballman2018-05-053-0/+13
| | | | | | | | | | | | Diagnoses code like: void f(const int *ptr) { __sync_fetch_and_add(ptr, 1); } which matches the behavior of GCC and ICC. llvm-svn: 331598
* Add -target to address errors in test from r331592Teresa Johnson2018-05-051-8/+7
| | | | | | | | | | | The error turns out to be: Assertion failed: (Target.isCompatibleDataLayout(getDataLayout()) && "Can't create a MachineFunction using a Module with a " "Target-incompatible DataLayout attached\n"), function init, file /Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm/lib/CodeGen/MachineFunction.cpp, line 180. Add -target to address this. Also re-enable the test I had temporarily commented, and move it further down in case there is still a failure (since it pipes stderr to FileCheck). llvm-svn: 331597
* Skip part of test added in r331592 to help debug bot failuresTeresa Johnson2018-05-051-2/+3
| | | | | | | | | | Trying to debug why/where a few bots getting exit code 256 e.g. http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/48471/testReport/Clang/CodeGen/thinlto_diagnostic_handler_remarks_with_hotness_ll/ and a few windows bots getting no output from that RUN line e.g. http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/11865/steps/ninja%20check%201/logs/FAIL%3A%20Clang%3A%3Athinlto-diagnostic-handler-remarks-with-hotness.ll llvm-svn: 331596
* Add required target to address bot failures from r331592Teresa Johnson2018-05-051-0/+2
| | | | | | Failing on non-x86 bots, needs x86 target for code gen. llvm-svn: 331593
OpenPOWER on IntegriCloud