aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/tools/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
* Move all sources from the llvm project into contrib/llvm-project.Dimitry Andric2019-12-20105-40427/+0
| | | | | | | | | | | | | This uses the new layout of the upstream repository, which was recently migrated to GitHub, and converted into a "monorepo". That is, most of the earlier separate sub-projects with their own branches and tags were consolidated into one top-level directory, and are now branched and tagged together. Updating the vendor area to match this layout is next. Notes: svn path=/head/; revision=355940
* Merge commit 3552d3e0f from llvm git (by Simon Atanasyan):Dimitry Andric2019-11-211-1/+2
| | | | | | | | | | | | | | | | [mips] Add `octeon+` to the list of CPUs accepted by the driver This is one of the upstream changes needed for adding support for the OCTEON+ CPU type, so that we can test Clang builds using the most commonly available FreeBSD/mips64 reference platform, the Edge Router Lite. Requested by: kevans MFC after: 1 month X-MFC-With: r353358 Notes: svn path=/head/; revision=354982
* Merge commit f596f4507 from llvm git (by Sam Elliott):Dimitry Andric2019-11-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [RISCV] Add Custom Parser for Atomic Memory Operands Summary: GCC Accepts both (reg) and 0(reg) for atomic instruction memory operands. These instructions do not allow for an offset in their encoding, so in the latter case, the 0 is silently dropped. Due to how we have structured the RISCVAsmParser, the easiest way to add support for parsing this offset is to add a custom AsmOperand and parser. This parser drops all the parens, and just keeps the register. This commit also adds a custom printer for these operands, which matches the GCC canonical printer, printing both `(a0)` and `0(a0)` as `(a0)`. Reviewers: asb, lewis-revill Reviewed By: asb Subscribers: s.egerton, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, jfb, PkmX, jocewei, psnobl, benna, Jim, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65205 llvm-svn: 367553 Merge commit f596f4507 from llvm git (by Sam Elliott): [RISCV] Add FreeBSD targets Reviewers: asb Reviewed By: asb Subscribers: simoncook, s.egerton, lenary, psnobl, benna, mhorne, emaste, kito-cheng, shiva0217, rogfer01, rkruppe, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57795 Patch by James Clarke (jrtc27) llvm-svn: 367557 Merge commit f596f4507 from llvm git (by Hsiangkai Wang): [DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame. It is necessary to generate fixups in .debug_frame or .eh_frame as relaxation is enabled due to the address delta may be changed after relaxation. There is an opcode with 6-bits data in debug frame encoding. So, we also need 6-bits fixup types. Differential Revision: https://reviews.llvm.org/D58335 llvm-svn: 366524 Merge commit f596f4507 from llvm git (by Hsiangkai Wang): [DebugInfo] Some fields do not need relocations even relax is enabled. In debug frame information, some fields, e.g., Length in CIE/FDE and Offset in FDE are attributes to describe the structure of CIE/FDE. They are not related to the relaxed code. However, these attributes are symbol differences. So, in current design, these attributes will be filled as zero and LLVM generates relocations for them. We only need to generate relocations for symbols in executable sections. So, if the symbols are not located in executable sections, we still evaluate their values under relaxation. Differential Revision: https://reviews.llvm.org/D61584 llvm-svn: 366531 Merge commit f596f4507 from llvm git (by Alex Bradbury): [RISCV] Don't force absolute FK_Data_X fixups to relocs The current behavior of shouldForceRelocation forces relocations for the majority of fixups when relaxation is enabled. This makes sense for fixups which incorporate symbols but is unnecessary for simple data fixups where the fixup target is already resolved to an absolute value. Differential Revision: https://reviews.llvm.org/D63404 Patch by Edward Jones. llvm-svn: 369257 Merge commit f596f4507 from llvm git (by Alex Bradbury): [RISCV] Implement getExprForFDESymbol to ensure RISCV_32_PCREL is used for the FDE location Follow binutils in using RISCV_32_PCREL for the FDE initial location. As explained in the relevant binutils commit <https://github.com/riscv/riscv-binutils-gdb/commit/a6cbf936e3dce68114d28cdf60d510a3f78a6d40>, the ADD/SUB pair of relocations is problematic in the presence of linker relaxation. This patch has the same end goal as D64715 but includes test changes and avoids adding a new global VariantKind to MCExpr.h (preferring RISCVMCExpr VKs like the rest of the RISC-V backend). Differential Revision: https://reviews.llvm.org/D66419 llvm-svn: 369375 This series of merges will permit riscv64 kernels and riscv64sf worlds to build with clang instead of gcc (but still using the bfd linker). Requested by: jhb Obtained from: https://github.com/freebsd/freebsd/compare/master...bsdjhb:riscv_clang MFC after: 1 month X-MFC-With: r353358 Notes: svn path=/head/; revision=354469
* clang: Enable unwind tables on !amd64Conrad Meyer2019-11-062-0/+3
| | | | | | | | | | | | | | | | | | | | | | There doesn't seem to be much sense in defaulting "on" unwind tables on amd64 and not on other arches. It causes surprising differences between platforms, such as the PR below. Prior to this change, FreeBSD inherited the default implementation of the method from the Gnu.h Generic_Elf => Generic_GCC parent class, which returned true only for amd64 targets. Override that and opt on always, similar to, e.g., NetBSD. PR: 241562 Reported by: lwhsu Reviewed by: dim Discussed with: emaste MFC after: I'm not going to, but you should feel free Relnotes: yes Differential Revision: https://reviews.freebsd.org/D22252 Notes: svn path=/head/; revision=354418
* Pull in r372186 from upstream llvm trunk (by Eli Friedman):Dimitry Andric2019-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ARM] VFPv2 only supports 16 D registers. r361845 changed the way we handle "D16" vs. "D32" targets; there used to be a negative "d16" which removed instructions from the instruction set, and now there's a "d32" feature which adds instructions to the instruction set. This is good, but there was an oversight in the implementation: the behavior of VFPv2 was changed. In particular, the "vfp2" feature was changed to imply "d32". This is wrong: VFPv2 only supports 16 D registers. In practice, this means if you specify -mfpu=vfpv2, the compiler will generate illegal instructions. This patch gets rid of "vfp2d16" and "vfp2d16sp", and fixes "vfp2" and "vfp2sp" so they don't imply "d32". Differential Revision: https://reviews.llvm.org/D67375 Pull in r372187 from upstream clang trunk (by Eli Friedman): [ARM] Update clang for removal of vfp2d16 and vfp2d16sp Matching fix for https://reviews.llvm.org/D67375 (r372186). Differential Revision: https://reviews.llvm.org/D67467 This should fix clang generating invalid opcodes for floating point operations on armv6. Requested by: mmel MFC after: 3 days Notes: svn path=/head/; revision=354097
* Bump clang's default target CPU for the i386 architecture (aka "x86") toDimitry Andric2019-10-231-2/+3
| | | | | | | | | | | i686, as per the discussion on the freebsd-arch mailing list. Earlier in r352030, I had already bumped it to i586, to work around missing atomic 64 bit functions for the i386 architecture. Relnotes: yes Notes: svn path=/head/; revision=353936
* Pull in r374154 from upstream clang trunk (by Simon Atanasyan):Dimitry Andric2019-10-184-9/+17
| | | | | | | | | | | | | | | [mips] Set default float ABI to "soft" on FreeBSD Initial patch by Kyle Evans. Fix PR43596 Requested by: kevans MFC after: 1 month X-MFC-With: r353358 Notes: svn path=/head/; revision=353739
* Target i586 by default on the i386 architecture, since after upstream'sDimitry Andric2019-09-081-2/+2
| | | | | | | | | | | | | | | | | change https://reviews.llvm.org/rL356631 ("[X86] Add CMPXCHG8B feature flag. Set it for all CPUs except i386/i486 including 'generic'. Disable use of CMPXCHG8B when this flag isn't set"), clang now correctly emits calls to __atomic_load_8, __atomic_store_8, etc. when targeting i486, and this means we can no longer link most modern programs, because we do not have a libatomic, nor support for atomic functions in libc. See also PR 230888, 220822, 233725, 234976, and more probably duplicates. Note that in practice, clang has been incorrectly generating cmpxchg8b instructions for years now, when targeting i486. So de facto nothing really changes by doing this. Notes: svn path=/projects/clang900-import/; revision=352030
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmpDimitry Andric2019-09-072-20/+30
| | | | | | | release_90 branch r371301, and update version numbers. Notes: svn path=/projects/clang900-import/; revision=352010
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmpDimitry Andric2019-09-021-27/+31
| | | | | | | release_90 branch r369369, and update version numbers. Notes: svn path=/projects/clang900-import/; revision=351708
* Merge clang trunk r366426, resolve conflicts, and update FREEBSD-Xlist.Dimitry Andric2019-08-21104-1261/+2445
| | | | Notes: svn path=/projects/clang900-import/; revision=351350
* Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,Dimitry Andric2019-07-061-1/+1
| | | | | | | | | | | | libunwind and openmp to the upstream release_80 branch r364487 (effectively, 8.0.1 rc3). The 8.0.1 release will most likely have no further changes. MFC after: 1 week X-MFC-With: r349004 Notes: svn path=/head/; revision=349793
* powerpc: Transition to Secure-PLT, like most other OSs (Toolchain part)Justin Hibbits2019-06-251-1/+2
| | | | | | | | | | | | | | | | Summary: Toolchain follow-up to r349350. LLVM patches will be submitted upstream for 9.0 as well. The bsd.cpu.mk change is required because GNU ld assumes BSS-PLT if it cannot determine for certain that it needs Secure-PLT, and some binaries do not compile in such a way to make it know to use Secure-PLT. Reviewed By: nwhitehorn, bdragon, pfg Differential Revision: https://reviews.freebsd.org/D20598 Notes: svn path=/head/; revision=349351
* Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,Dimitry Andric2019-06-122-17/+28
| | | | | | | | | | | libunwind and openmp to the upstream release_80 branch r363030 (effectively, 8.0.1 rc2). The 8.0.1 release should follow this within a week or so. MFC after: 2 weeks Notes: svn path=/head/; revision=349004
* Merge llvm, clang, compiler-rt, libc++, lld, and lldb release_80 branchDimitry Andric2019-03-041-3/+1
| | | | | | | r355313, resolve conflicts, and bump version numbers. Notes: svn path=/projects/clang800-import/; revision=344774
* Merge llvm, clang, compiler-rt, libc++, lld, and lldb release_80 branchDimitry Andric2019-02-151-4/+4
| | | | | | | r354130, resolve conflicts, and bump version numbers. Notes: svn path=/projects/clang800-import/; revision=344177
* Merge llvm, clang, compiler-rt, libc++, lld, and lldb release_80 branchDimitry Andric2019-02-052-0/+15
| | | | | | | r353167, resolve conflicts, and bump version numbers. Notes: svn path=/projects/clang800-import/; revision=343806
* Merge ^/head r343320 through r343570.Dimitry Andric2019-01-302-1/+8
|\ | | | | | | Notes: svn path=/projects/clang800-import/; revision=343571
| * clang: default to DWARF 4 as of FreeBSD 13Ed Maste2019-01-252-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD previously defaulted to DWARF 2 because several tools (gdb, ctfconvert, etc.) did not support later versions. These have either been fixed or are deprecated. Note that gdb 6 still exists but has been moved out of $PATH into /usr/libexec and is intended only for use by crashinfo(8). The kernel build sets the DWARF version explicitly via -gdwarf2, so this should have no effect there. PR: 234887 [exp-run] Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17930 Notes: svn path=/head/; revision=343429
* | Merge clang trunk r351319, resolve conflicts, and update FREEBSD-Xlist.Dimitry Andric2019-01-2056-827/+3069
|/ | | | Notes: svn path=/projects/clang800-import/; revision=343214
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branchDimitry Andric2018-12-093-5/+9
| | | | | | | | | | r348686 (effectively 7.0.1 rc3), resolve conflicts, and bump version numbers. PR: 230240, 230355 Notes: svn path=/projects/clang700-import/; revision=341763
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branchDimitry Andric2018-11-042-4/+5
| | | | | | | | | | r346007 (effectively 7.0.1 rc2), resolve conflicts, and bump version numbers. PR: 230240, 230355 Notes: svn path=/projects/clang700-import/; revision=340125
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branchDimitry Andric2018-09-111-2/+1
| | | | | | | | | r341916, resolve conflicts, and bump version numbers. PR: 230240, 230355 Notes: svn path=/projects/clang700-import/; revision=338597
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branchDimitry Andric2018-08-182-2/+7
| | | | | | | | | r339999, resolve conflicts, and bump version numbers. PR: 230240,230355 Notes: svn path=/projects/clang700-import/; revision=338014
* Merge clang trunk r338150 (just before the 7.0.0 branch point), andDimitry Andric2018-08-0213-158/+368
| | | | | | | resolve conflicts. Notes: svn path=/projects/clang700-import/; revision=337150
* Merge clang trunk r338150, and resolve conflicts.Dimitry Andric2018-07-3169-1378/+3960
| | | | Notes: svn path=/projects/clang700-import/; revision=336979
* Pull in r336008 from upstream clang trunk:Dimitry Andric2018-07-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Request init/fini array on FreeBSD 12 and later Summary: It seems a bad idea to change the default in the middle of a release branch due to possible changes in global ctor / dtor ordering between .ctors and .init_array. With FreeBSD 11.0's release imminent lets change the default now for FreeBSD 12 (the current development stream) and later. FreeBSD rtld has supported .init_array / .fini_array for many years. As of Jan 1 2017 all supported FreeBSD releases and branches will have support. Reviewers: dim, brooks, arichardson Reviewed By: dim, brooks, arichardson Subscribers: bsdjhb, krytarowski, emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D24867 Requested by: jhb MFC after: 3 days Notes: svn path=/head/; revision=336227
* Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ toDimitry Andric2018-06-296-18/+61
| | | | | | | | | | 6.0.1 release (upstream r335540). Relnotes: yes MFC after: 2 weeks Notes: svn path=/head/; revision=335799
* Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ toDimitry Andric2018-02-012-1/+32
| | | | | | | | | | | 6.0.0 (branches/release_60 r323948). MFC after: 3 months X-MFC-With: r327952 PR: 224669 Notes: svn path=/head/; revision=328753
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788,Dimitry Andric2018-01-063-18/+297
| | | | | | | update build glue and version numbers. Notes: svn path=/projects/clang600-import/; revision=327657
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,Dimitry Andric2017-12-295-26/+19
| | | | | | | | update build glue and version numbers, add new intrinsics headers, and update OptionalObsoleteFiles.inc. Notes: svn path=/projects/clang600-import/; revision=327330
* Merge clang trunk r321414 to contrib/llvm.Dimitry Andric2017-12-246-54/+120
| | | | Notes: svn path=/projects/clang600-import/; revision=327135
* Merge clang trunk r321017 to contrib/llvm/tools/clang.Dimitry Andric2017-12-2054-2373/+3350
| | | | Notes: svn path=/projects/clang600-import/; revision=327024
* Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from theDimitry Andric2017-12-034-16/+5
| | | | | | | | | upstream release_50 branch. This corresponds to 5.0.1 rc2. MFC after: 2 weeks Notes: svn path=/head/; revision=326496
* Upgrade our copies of clang, llvm, lldb and compiler-rt to r312293 fromDimitry Andric2017-09-011-0/+3
| | | | | | | | | | | | | | the upstream release_50 branch. This corresponds to 5.0.0 rc4. As of this version, the cad/stepcode port should now compile in a more reasonable time on i386 (see bug 221836 for more information). PR: 221836 MFC after: 2 months X-MFC-with: r321369 Notes: svn path=/head/; revision=323112
* Upgrade our copies of clang, llvm, lldb and compiler-rt to r311606 fromDimitry Andric2017-08-243-27/+74
| | | | | | | | | | | | | | the upstream release_50 branch. As of this version, lib/msun's trig test should also work correctly again (see bug 220989 for more information). PR: 220989 MFC after: 2 months X-MFC-with: r321369 Notes: svn path=/head/; revision=322855
* Upgrade our copies of clang, llvm, lld and libc++ to r311219 from theDimitry Andric2017-08-2114-33/+40
| | | | | | | | | | upstream release_50 branch. MFC after: 2 months X-MFC-with: r321369 Notes: svn path=/head/; revision=322740
* Upgrade our copies of clang, llvm and libc++ to r310316 from theDimitry Andric2017-08-092-2/+2
| | | | | | | | | | upstream release_50 branch. MFC after: 2 months X-MFC-with: r321369 Notes: svn path=/head/; revision=322320
* Upgrade our copies of clang, llvm, lld and lldb to r309439 from theDimitry Andric2017-07-301-6/+1
| | | | | | | | | | upstream release_50 branch. This is just after upstream's 5.0.0-rc1. MFC after: 2 months X-MFC-with: r321369 Notes: svn path=/head/; revision=321723
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r308421, and updateDimitry Andric2017-07-197-29/+72
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=321238
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r307894, and updateDimitry Andric2017-07-1324-63/+243
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320970
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306956, and updateDimitry Andric2017-07-0210-78/+163
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320572
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306325, and updateDimitry Andric2017-06-278-26/+305
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320397
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305575, and updateDimitry Andric2017-06-171-0/+3
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320041
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305145, and updateDimitry Andric2017-06-106-8/+26
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319799
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304659, and updateDimitry Andric2017-06-031-3/+7
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319547
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and updateDimitry Andric2017-06-012-16/+59
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319479
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and updateDimitry Andric2017-05-296-43/+356
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319164
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r303291, and updateDimitry Andric2017-05-181-2/+9
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=318477
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r303197, and updateDimitry Andric2017-05-164-24/+38
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=318384