summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Add CLANG_DEFAULT_OBJCOPY to allow Clang to use llvm-objcopy for dwarf fissionJake Ehrlich2017-11-111-0/+3
| | | | | | | | | | | | llvm-objcopy is getting to where it can be used in non-trivial ways (such as for dwarf fission in clang). It now supports dwarf fission but this feature hasn't been thoroughly tested yet. This change allows people to optionally build clang to use llvm-objcopy rather than GNU objcopy. By default GNU objcopy is still used so nothing should change. Differential Revision: https://reviews.llvm.org/D39029 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317960 91177308-0d34-0410-b5e6-96231b3b80d8
* [Serialization] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-11-112-65/+109
| | | | | | warnings; other minor fixes (NFC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317953 91177308-0d34-0410-b5e6-96231b3b80d8
* AMDGPU: Add -mxnack/-mno-xnack options that set +/-xnack featureKonstantin Zhuravlyov2017-11-101-1/+4
| | | | | | | Differential Revision: https://reviews.llvm.org/D39878 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317917 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Parse+Sema for copyin clause of 'teams distribute parallel for'Carlo Bertolli2017-11-101-0/+1
| | | | | | | | | | https://reviews.llvm.org/D39902 Simply leverage existing implementation and verify correct functioning with two regression tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317893 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[XRay][darwin] Initial XRay in Darwin Support"Dean Michael Berris2017-11-101-1/+0
| | | | | | This reverts r317875. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317877 91177308-0d34-0410-b5e6-96231b3b80d8
* [XRay][darwin] Initial XRay in Darwin SupportDean Michael Berris2017-11-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: This change implements the changes required in both clang and compiler-rt to allow building XRay-instrumented binaries in Darwin. For now we limit this to x86_64. We also start building the XRay runtime library in compiler-rt for osx. A caveat to this is that we don't have the tests set up and running yet, which we'll do in a set of follow-on changes. This patch uses the monorepo layout for the coordinated change across multiple projects. Reviewers: kubamracek Subscribers: mgorny, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D39114 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317875 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Reduce the number of FMA builtins needed by the frontend by adding ↵Craig Topper2017-11-101-14/+0
| | | | | | | | | | | | negates to operands of the fmadd and fmaddsub builtins. The backend should be able to combine the negates to create fmsub, fnmadd, and fnmsub. faddsub converting to fsubadd still needs work I think, but should be very doable. This matches what we already do for the masked builtins. This only covers the packed builtins. Scalar builtins will be done after FMA4 is fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317873 91177308-0d34-0410-b5e6-96231b3b80d8
* [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-11-1013-207/+265
| | | | | | minor fixes (NFC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317854 91177308-0d34-0410-b5e6-96231b3b80d8
* [VirtualFileSystem] InMemoryFileSystem::addFile(): Type and PermsBen Hamilton2017-11-091-2/+12
| | | | | | | | | | | | | | | | | | | | | | | Summary: This implements a FIXME in InMemoryFileSystem::addFile(), allowing clients to specify User, Group, Type, and/or Perms when creating a file in an in-memory filesystem. New tests included. Ran tests with: % ninja BasicTests && ./tools/clang/unittests/Basic/BasicTests Fixes PR#35172 (https://bugs.llvm.org/show_bug.cgi?id=35172) Reviewers: bkramer, hokein Reviewed By: bkramer, hokein Subscribers: alexfh Differential Revision: https://reviews.llvm.org/D39572 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317800 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-format] Keep Sphinx happy after r317794Krasimir Georgiev2017-11-091-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317799 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-format] Sort using declarations by splitting on '::'Krasimir Georgiev2017-11-091-0/+7
| | | | | | | | | | | | | | Summary: This patch improves using declarations sorting. Reviewers: bkramer Reviewed By: bkramer Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D39786 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317794 91177308-0d34-0410-b5e6-96231b3b80d8
* [Tooling] Use FixedCompilationDatabase when `compile_flags.txt` is found.Sam McCall2017-11-091-0/+5
| | | | | | | | | | | | | | | | | | | | | Summary: This is an alternative to JSONCompilationDatabase for simple projects that don't use a build system such as CMake. (You can also drop one in ~, to make your tools use e.g. C++11 by default) There's no facility for varying flags per-source-file or per-machine. Possibly this could be accommodated backwards-compatibly using cpp, but even if not the simplicity seems worthwhile for the cases that are addressed. Tested with clangd, works great! (requires clangd restart) Reviewers: klimek Subscribers: ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D39799 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317777 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Rename the VEX scalar fma builtins to end with a '3' to match gccCraig Topper2017-11-091-8/+8
| | | | | | | | I think we need to use different builtins for the FMA4 instructions since those instructions zero the upper bits and FMA3 instructions pass the bits through. So this moves the existing builtins to be the FMA3 versions. New versions will be added for FMA4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317766 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Codegen for `#pragma omp target parallel for`.Alexey Bataev2017-11-082-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317719 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CoreOption flag to "-coverage" option to make it available for clang-clMarco Castelluccio2017-11-081-1/+1
| | | | | | | | | | | | | | | | Summary: The -coverage option is not a CoreOption, so it is not available to clang-cl. This patch adds the CoreOption flag to "-coverage" to allow it to be used with clang-cl. Reviewers: rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38221 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317709 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved QualTypeNames.h from Tooling to AST.Ilya Biryukov2017-11-081-7/+18
| | | | | | | | | | | | | | | | | Summary: For code reuse in SemaCodeComplete. Note that the tests for QualTypeNames are still in Tooling as they use Tooling's common testing code. Reviewers: rsmith, saugustine, rnk, klimek, bkramer Reviewed By: rnk Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D39224 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317676 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-refactor] Introduce a new rename rule for qualified symbolsHaojian Wu2017-11-081-0/+22
| | | | | | | | | | | | | | Summary: Prototype of a new rename rule for renaming qualified symbol. Reviewers: arphaman, ioeric, sammccall Reviewed By: arphaman, sammccall Subscribers: jklaehn, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D39332 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317672 91177308-0d34-0410-b5e6-96231b3b80d8
* [Serialization] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-11-081-136/+184
| | | | | | warnings; other minor fixes (NFC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317648 91177308-0d34-0410-b5e6-96231b3b80d8
* [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-11-083-176/+264
| | | | | | minor fixes (NFC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317644 91177308-0d34-0410-b5e6-96231b3b80d8
* [NVPTX] Implement __nvvm_atom_add_gen_d builtin.Justin Lebar2017-11-071-1/+1
| | | | | | | | | | | | | | | Summary: This just seems to have been an oversight. We already supported the f64 atomic add with an explicit scope (e.g. "cta"), but not the scopeless version. Reviewers: tra Subscribers: jholewinski, sanjoy, cfe-commits, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D39638 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317623 91177308-0d34-0410-b5e6-96231b3b80d8
* New clang option -fno-plt which avoids the PLT and lazy binding while making ↵Sriraman Tallam2017-11-072-0/+6
| | | | | | | | external calls. Differential Revision: https://reviews.llvm.org/D39079 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317605 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] rename field references in __builtin_offsetofAlex Lorenz2017-11-071-0/+12
| | | | | | | rdar://33875453 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317599 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] [NFC] Remove unused typedef from SVals.hGeorge Karpenkov2017-11-071-3/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D39620 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317537 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify the error message for unsupported aliases on DarwinAlex Lorenz2017-11-071-1/+1
| | | | | | | rdar://35109556 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317532 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Replace the mask cmpeq/cmple/cmplt/cmpgt/cmpge/cmpneq intrinsics with ↵Craig Topper2017-11-061-30/+1
| | | | | | | | macros that just pass the right comparison predicate value to the regular cmp intrinsic. Remove mask cmpeq/cmpgt builtins that are now unused. This shortens the intrinsic headers a little and allows us to get rid of the cmpeq and cmpgt handling from CGBuiltin.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317506 91177308-0d34-0410-b5e6-96231b3b80d8
* lowering broadcastmJina Nahias2017-11-061-6/+0
| | | | | | Change-Id: I0661abea3e3742860e0a03ff9e4fcdc367eff7db git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317456 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove \brief from doxygen comments in PrettyPrinter.hAdrian Prantl2017-11-051-39/+37
| | | | | | | | Patch by @xsga! Differential Revision: https://reviews.llvm.org/D39633 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317443 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeGen] add remquo to list of recognized library callsSanjay Patel2017-11-041-0/+4
| | | | | | | | | | | | | This is just an oversight because we already do recognize __builtin_remquo() with the same signature. http://en.cppreference.com/w/c/numeric/math/remquo http://pubs.opengroup.org/onlinepubs/9699919799/functions/remquo.html Differential Revision: https://reviews.llvm.org/D39615 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317407 91177308-0d34-0410-b5e6-96231b3b80d8
* [Basic] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-11-034-113/+126
| | | | | | other minor fixes (NFC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317381 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor][extract] insert semicolons into extracted/inserted codeAlex Lorenz2017-11-031-0/+7
| | | | | | | | | | | | | | | | | | | when needed This commit implements the semicolon insertion logic into the extract refactoring. The following rules are used: - extracting expression: add terminating ';' to the extracted function. - extracting statements that don't require terminating ';' (e.g. switch): add terminating ';' to the callee. - extracting statements with ';': move (if possible) the original ';' from the callee and add terminating ';'. - otherwise, add ';' to both places. Differential Revision: https://reviews.llvm.org/D39441 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317343 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Add Scudo as a possible -fsanitize= optionKostya Kortchinsky2017-11-032-0/+4
| | | | | | | | | | | | | | | | | | | | | | Summary: This change adds Scudo as a possible Sanitizer option via -fsanitize=. This allows for easier static & shared linking of the Scudo library, it allows us to enforce PIE (otherwise the security of the allocator is moot), and check for incompatible Sanitizers combo. In its current form, Scudo is not compatible with any other Sanitizer, but the plan is to make it work in conjunction with UBsan (-fsanitize=scudo,undefined), which will require additional work outside of the scope of this change. Reviewers: eugenis, kcc, alekseyshl Reviewed By: eugenis, alekseyshl Subscribers: llvm-commits, srhines Differential Revision: https://reviews.llvm.org/D39334 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317337 91177308-0d34-0410-b5e6-96231b3b80d8
* [Tooling] Put createExecutorFromCommandLineArgs implementation in a wrapper. NFCEric Liu2017-11-031-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317328 91177308-0d34-0410-b5e6-96231b3b80d8
* [preamble] Also record the "skipping" state of the preprocessorErik Verbruggen2017-11-031-2/+31
| | | | | | | | | | | When a preamble ends in a conditional preprocessor block that is being skipped, the preprocessor needs to continue skipping that block when the preamble is used. This fixes PR34570. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317308 91177308-0d34-0410-b5e6-96231b3b80d8
* [Serialization] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-11-022-62/+383
| | | | | | warnings; other minor fixes (NFC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317273 91177308-0d34-0410-b5e6-96231b3b80d8
* Add default calling convention support for regcall.Erich Keane2017-11-023-2/+5
| | | | | | | | | | | | Added support for regcall as default calling convention. Also added code to exclude main when applying default calling conventions. Patch-By: eandrews Differential Revision: https://reviews.llvm.org/D39210 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317268 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeGen] fix const-ness of builtin equivalents of <math.h> and <complex.h> ↵Sanjay Patel2017-11-021-129/+129
| | | | | | | | | | | | | | | | | functions that might set errno This just makes const-ness of the builtins match const-ness of their lib function siblings. We're deferring fixing some of these that are obviously wrong to follow-up patches. Hopefully, the bugs are visible in the new test file (added at rL317220). As the description in Builtins.def says: "e = const, but only when -fmath-errno=0". This is step 2 of N to fix builtins and math calls as discussed in D39204. Differential Revision: https://reviews.llvm.org/D39481 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317265 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r317228: remove unused function from ObjCRuntime.h, NFCAlex Lorenz2017-11-021-0/+5
| | | | | | | This function is actually used in LLDB git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317231 91177308-0d34-0410-b5e6-96231b3b80d8
* remove unused function from ObjCRuntime.h, NFCAlex Lorenz2017-11-021-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317228 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in class annotationJan Korous2017-11-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317200 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASTMatchers] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-11-014-97/+165
| | | | | | warnings; other minor fixes (NFC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317137 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix warnings discovered by rL317076. [-Wunused-private-field]NAKAMURA Takumi2017-11-011-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317091 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformat.NAKAMURA Takumi2017-11-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317089 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Removing unused stored field.George Karpenkov2017-11-011-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317070 91177308-0d34-0410-b5e6-96231b3b80d8
* [Analyzer] Use value storage for BodyFarmGeorge Karpenkov2017-11-012-4/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D39428 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317065 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor][extract] prohibit extraction of ObjC property settersAlex Lorenz2017-11-011-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317056 91177308-0d34-0410-b5e6-96231b3b80d8
* [CFI] Add CFI-icall pointer type generalizationVlad Tsyrklevich2017-10-313-0/+6
| | | | | | | | | | | | | | | | | | | | | | | Summary: This change allows generalizing pointers in type signatures used for cfi-icall by enabling the -fsanitize-cfi-icall-generalize-pointers flag. This works by 1) emitting an additional generalized type signature metadata node for functions and 2) llvm.type.test()ing for the generalized type for translation units with the flag specified. This flag is incompatible with -fsanitize-cfi-cross-dso because it would require emitting twice as many type hashes which would increase artifact size. Reviewers: pcc, eugenis Reviewed By: pcc Subscribers: kcc Differential Revision: https://reviews.llvm.org/D39358 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317044 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix usage of right shift operator in fold expressionsRichard Smith2017-10-311-0/+6
| | | | | | | | | The right shift operator was not seen as a valid operator in a fold expression, which is PR32563. Patch by Nicolas Lesser ("Blitz Rakete")! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317032 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Use the same filename for the header and the implementation of ↵George Karpenkov2017-10-302-4/+4
| | | | | | | | BugReporterVisitor Differential Revision: https://reviews.llvm.org/D37935 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316963 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-format] Format raw string literalsKrasimir Georgiev2017-10-301-0/+36
| | | | | | | | | | | | | | | Summary: This patch adds raw string literal formatting. Reviewers: djasper, klimek Reviewed By: klimek Subscribers: klimek, mgorny Differential Revision: https://reviews.llvm.org/D35943 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316903 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Make issue hash related tests more conciseGabor Horvath2017-10-301-4/+0
| | | | | | | | | | | Extend ExprInspection checker to make it possible to dump the issue hash of arbitrary expressions. This change makes it possible to make issue hash related tests more concise and also makes debugging issue hash related problems easier. Differential Revision: https://reviews.llvm.org/D38844 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316899 91177308-0d34-0410-b5e6-96231b3b80d8