Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 2020 20:48:07 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r363494 - in stable/12: . contrib/llvm-project contrib/llvm-project/clang/include/clang/AST contrib/llvm-project/clang/include/clang/Basic contrib/llvm-project/clang/include/clang/Drive...
Message-ID:  <202007242048.06OKm7vm013727@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Fri Jul 24 20:48:06 2020
New Revision: 363494
URL: https://svnweb.freebsd.org/changeset/base/363494

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  10.0.1 final (aka llvmorg-10.0.1-0-gef32c611aa2).
  
  MFC r359582 (by emaste):
  
  lldb: use lua as the default script language
  
  In the FreeBSD base system we do not have Python support in lldb, but
  will have Lua support.  Make Lua the default.
  
  This needs to be made into a configure-time option; that is being
  discussed upstream and will appear in a future lldb import.  For now
  carry this change as a tiny patch to our copy of lldb.
  
  MFC r359599 (by emaste):
  
  lldb: add rule to generate LLDBWrapLua.cpp
  
  Building lldb's lua/python bindings requires swig, but we do not want to
  include it in the FreeBSD base system (as a build tool) because it has
  non-trivial dependencies.  As a workaround, add a make rule to generate
  LLDBWrapLua.cpp, and we will commit the generated file.
  
  Requires the swig30 package.
  
  Reviewed by:	brooks
  Discussed with:	dim
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D24265
  
  MFC r359600 (by emaste):
  
  lldb: commit generated LLDBWrapLua.cpp
  
  MFC r359606 (by emaste):
  
  lldb: build and enable lua script bindings
  
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D24266
  
  MFC r360697:
  
  In r358396 I merged llvm upstream commit 2e24219d3, which fixed "error:
  unsupported relocation on symbol" when assembling arm 'adr' pseudo
  instructions. However, the upstream commit did not take big-endian arm
  into account.
  
  Applying the same changes to the big-endian handling is straightforward,
  thanks to Andrew Turner and Peter Smith for the hint. This will also be
  submitted upstream.
  
  MFC r360702:
  
  Merge commit 4ca2cad94 from llvm git (by Justin Hibbits):
  
    [PowerPC] Add clang -msvr4-struct-return for 32-bit ELF
  
    Summary:
  
    Change the default ABI to be compatible with GCC. For 32-bit ELF
    targets other than Linux, Clang now returns small structs in
    registers r3/r4. This affects FreeBSD, NetBSD, OpenBSD. There is no
    change for 32-bit Linux, where Clang continues to return all structs
    in memory.
  
    Add clang options -maix-struct-return (to return structs in memory)
    and -msvr4-struct-return (to return structs in registers) to be
    compatible with gcc. These options are only for PPC32; reject them on
    PPC64 and other targets. The options are like -fpcc-struct-return and
    -freg-struct-return for X86_32, and use similar code.
  
    To actually return a struct in registers, coerce it to an integer of
    the same size. LLVM may optimize the code to remove unnecessary
    accesses to memory, and will return i32 in r3 or i64 in r3:r4.
  
    Fixes PR#40736
  
    Patch by George Koehler!
  
    Reviewed By: jhibbits, nemanjai
    Differential Revision: https://reviews.llvm.org/D73290
  
  Requested by:	jhibbits
  
  MFC r361410:
  
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  llvmorg-10.0.1-rc1-0-gf79cd71e145 (aka 10.0.1 rc1).
  
  MFC r362235 (by kp):
  
  llvm: Default to -mno-relax on RISC-V
  
  Compiling on a RISC-V system fails with 'relocation R_RISCV_ALIGN
  requires unimplemented linker relaxation; recompile with -mno-relax'.
  
  Our default linker (ld.lld) doesn't support relaxation, so default to
  no-relax so we don't generate object files the linker can't handle.
  
  Reviewed by:	mhorne
  Sponsored by:	Axiado
  Differential Revision:	https://reviews.freebsd.org/D25210
  
  MFC r362445:
  
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  llvmorg-10.0.0-97-g6f71678ecd2 (not quite 10.0.1 rc2, as more fixes are
  still pending).
  
  MFC r362587 (by cem):
  
  Add WITH_CLANG_FORMAT option
  
  clang-format is enabled conditional on either WITH_CLANG_EXTRAS or
  WITH_CLANG_FORMAT.  Some sources in libclang are build conditional on
  either rule, and obviously the clang-format binary itself depends on the
  rule.
  
  clang-format could still use a manual page.
  
  Reviewed by:	emaste
  Differential Revision:	https://reviews.freebsd.org/D25427
  
  MFC r362609:
  
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  llvmorg-10.0.0-129-gd24d5c8e308. Getting closer to 10.0.1-rc2.
  
  MFC r362679:
  
  Regenerate ReStructuredText based manpages for llvm-project tools:
  
  * bugpoint.1
  * clang.1
  * llc.1
  * lldb.1
  * lli.1
  * llvm-ar.1
  * llvm-as.1
  * llvm-bcanalyzer.1
  * llvm-cov.1
  * llvm-diff.1
  * llvm-dis.1
  * llvm-dwarfdump.1
  * llvm-extract.1
  * llvm-link.1
  * llvm-mca.1
  * llvm-nm.1
  * llvm-pdbutil.1
  * llvm-profdata.1
  * llvm-symbolizer.1
  * llvm-tblgen.1
  * opt.1
  
  Add newly generated manpages for:
  
  * llvm-addr2line.1 (this is an alias of llvm-symbolizer)
  * llvm-cxxfilt.1
  * llvm-objcopy.1
  * llvm-ranlib.1 (this is an alias of llvm-ar)
  
  Note that llvm-objdump.1 is an exception, as upstream has both a plain
  .1 file, and a .rst variant. These will have to be reconciled upstream
  first.
  
  MFC r362680:
  
  Follow-up to r362679, add more entries to OptionalObsoleteFiles.inc
  
  MFC r362719:
  
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  llvmorg-10.0.1-rc2-0-g77d76b71d7d.
  
  Also add a few more llvm utilities under WITH_CLANG_EXTRAS:
  
  * llvm-dwp, a utility for merging DWARF 5 Split DWARF .dwo files into
    .dwp (DWARF package files)
  * llvm-size, a size(1) replacement
  * llvm-strings, a strings(1) replacement
  
  MFC r362733:
  
  Remove older llvm-ranlib.1 entry from ObsoleteFiles.inc, as it has
  gotten its own manpage now, and should be no longer be removed by "make
  delete-old".
  
  MFC r362734:
  
  Fix llvm-strings.1 not installing, this was a copy/paste error.
  
  MFC r363401:
  
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  10.0.1 final (aka llvmorg-10.0.1-0-gef32c611aa2).
  
  There were no changes since rc2, except in the upstream regression
  tests, which we do not ship.
  
  Relnotes:	yes

Added:
  stable/12/contrib/llvm-project/compiler-rt/lib/builtins/riscv/int_mul_impl.inc
     - copied unchanged from r362719, head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/int_mul_impl.inc
  stable/12/contrib/llvm-project/compiler-rt/lib/builtins/riscv/muldi3.S
     - copied unchanged from r362719, head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/muldi3.S
  stable/12/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFGraph.h
     - copied unchanged from r362609, head/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFGraph.h
  stable/12/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFLiveness.h
     - copied unchanged from r362609, head/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFLiveness.h
  stable/12/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFRegisters.h
     - copied unchanged from r362609, head/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFRegisters.h
  stable/12/contrib/llvm-project/llvm/lib/CodeGen/RDFGraph.cpp
     - copied unchanged from r362609, head/contrib/llvm-project/llvm/lib/CodeGen/RDFGraph.cpp
  stable/12/contrib/llvm-project/llvm/lib/CodeGen/RDFLiveness.cpp
     - copied unchanged from r362609, head/contrib/llvm-project/llvm/lib/CodeGen/RDFLiveness.cpp
  stable/12/contrib/llvm-project/llvm/lib/CodeGen/RDFRegisters.cpp
     - copied unchanged from r362609, head/contrib/llvm-project/llvm/lib/CodeGen/RDFRegisters.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedThunderX3T110.td
     - copied unchanged from r362445, head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedThunderX3T110.td
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/ImmutableGraph.h
     - copied unchanged from r362609, head/contrib/llvm-project/llvm/lib/Target/X86/ImmutableGraph.h
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86IndirectThunks.cpp
     - copied unchanged from r362609, head/contrib/llvm-project/llvm/lib/Target/X86/X86IndirectThunks.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
     - copied unchanged from r362609, head/contrib/llvm-project/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
     - copied unchanged from r362609, head/contrib/llvm-project/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
  stable/12/contrib/llvm-project/llvm/tools/llvm-dwp/
     - copied from r362719, head/contrib/llvm-project/llvm/tools/llvm-dwp/
  stable/12/contrib/llvm-project/llvm/tools/llvm-size/
     - copied from r362719, head/contrib/llvm-project/llvm/tools/llvm-size/
  stable/12/contrib/llvm-project/llvm/tools/llvm-strings/
     - copied from r362719, head/contrib/llvm-project/llvm/tools/llvm-strings/
  stable/12/lib/clang/liblldb/LLDBWrapLua.cpp
     - copied unchanged from r359600, head/lib/clang/liblldb/LLDBWrapLua.cpp
  stable/12/tools/build/options/WITH_CLANG_FORMAT
     - copied unchanged from r362587, head/tools/build/options/WITH_CLANG_FORMAT
  stable/12/usr.bin/clang/llvm-ar/llvm-ranlib.1
     - copied unchanged from r362679, head/usr.bin/clang/llvm-ar/llvm-ranlib.1
  stable/12/usr.bin/clang/llvm-cxxfilt/llvm-cxxfilt.1
     - copied unchanged from r362679, head/usr.bin/clang/llvm-cxxfilt/llvm-cxxfilt.1
  stable/12/usr.bin/clang/llvm-dwp/
     - copied from r362719, head/usr.bin/clang/llvm-dwp/
  stable/12/usr.bin/clang/llvm-objcopy/llvm-objcopy.1
     - copied unchanged from r362679, head/usr.bin/clang/llvm-objcopy/llvm-objcopy.1
  stable/12/usr.bin/clang/llvm-size/
     - copied from r362719, head/usr.bin/clang/llvm-size/
  stable/12/usr.bin/clang/llvm-strings/
     - copied from r362719, head/usr.bin/clang/llvm-strings/
  stable/12/usr.bin/clang/llvm-symbolizer/llvm-addr2line.1
     - copied unchanged from r362679, head/usr.bin/clang/llvm-symbolizer/llvm-addr2line.1
Deleted:
  stable/12/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFGraph.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFGraph.h
  stable/12/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFLiveness.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFLiveness.h
  stable/12/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFRegisters.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFRegisters.h
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86RetpolineThunks.cpp
Modified:
  stable/12/Makefile.inc1
  stable/12/ObsoleteFiles.inc
  stable/12/UPDATING
  stable/12/contrib/llvm-project/FREEBSD-Xlist
  stable/12/contrib/llvm-project/clang/include/clang/AST/DeclBase.h
  stable/12/contrib/llvm-project/clang/include/clang/Basic/Attr.td
  stable/12/contrib/llvm-project/clang/include/clang/Driver/Options.td
  stable/12/contrib/llvm-project/clang/lib/AST/DeclBase.cpp
  stable/12/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp
  stable/12/contrib/llvm-project/clang/lib/AST/RawCommentList.cpp
  stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
  stable/12/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp
  stable/12/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp
  stable/12/contrib/llvm-project/clang/lib/Driver/SanitizerArgs.cpp
  stable/12/contrib/llvm-project/clang/lib/Driver/ToolChain.cpp
  stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
  stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp
  stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
  stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp
  stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp
  stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.h
  stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Hurd.cpp
  stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Hurd.h
  stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp
  stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.h
  stable/12/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp
  stable/12/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp
  stable/12/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp
  stable/12/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp
  stable/12/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  stable/12/contrib/llvm-project/clang/lib/Sema/TreeTransform.h
  stable/12/contrib/llvm-project/clang/lib/Tooling/Syntax/Tokens.cpp
  stable/12/contrib/llvm-project/clang/utils/TableGen/ClangAttrEmitter.cpp
  stable/12/contrib/llvm-project/compiler-rt/lib/builtins/riscv/mulsi3.S
  stable/12/contrib/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c
  stable/12/contrib/llvm-project/libcxx/include/array
  stable/12/contrib/llvm-project/lld/COFF/Chunks.h
  stable/12/contrib/llvm-project/lld/COFF/DLL.cpp
  stable/12/contrib/llvm-project/lld/COFF/MarkLive.cpp
  stable/12/contrib/llvm-project/lld/ELF/Driver.cpp
  stable/12/contrib/llvm-project/lld/ELF/InputSection.cpp
  stable/12/contrib/llvm-project/lld/ELF/InputSection.h
  stable/12/contrib/llvm-project/lld/ELF/OutputSections.cpp
  stable/12/contrib/llvm-project/lld/ELF/ScriptLexer.cpp
  stable/12/contrib/llvm-project/lld/ELF/ScriptParser.cpp
  stable/12/contrib/llvm-project/lld/ELF/Writer.cpp
  stable/12/contrib/llvm-project/lldb/include/lldb/lldb-enumerations.h
  stable/12/contrib/llvm-project/lldb/source/Core/CoreProperties.td
  stable/12/contrib/llvm-project/llvm/include/llvm/Analysis/ValueLattice.h
  stable/12/contrib/llvm-project/llvm/include/llvm/DebugInfo/CodeView/GlobalTypeTableBuilder.h
  stable/12/contrib/llvm-project/llvm/include/llvm/IR/IntrinsicsPowerPC.td
  stable/12/contrib/llvm-project/llvm/include/llvm/Support/AArch64TargetParser.def
  stable/12/contrib/llvm-project/llvm/include/llvm/Support/ManagedStatic.h
  stable/12/contrib/llvm-project/llvm/include/llvm/Target/TargetSelectionDAG.td
  stable/12/contrib/llvm-project/llvm/lib/Analysis/LazyValueInfo.cpp
  stable/12/contrib/llvm-project/llvm/lib/Analysis/ValueLattice.cpp
  stable/12/contrib/llvm-project/llvm/lib/CodeGen/BranchFolding.cpp
  stable/12/contrib/llvm-project/llvm/lib/CodeGen/MachineSink.cpp
  stable/12/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  stable/12/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
  stable/12/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  stable/12/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  stable/12/contrib/llvm-project/llvm/lib/DebugInfo/CodeView/MergingTypeTableBuilder.cpp
  stable/12/contrib/llvm-project/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
  stable/12/contrib/llvm-project/llvm/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp
  stable/12/contrib/llvm-project/llvm/lib/LTO/LTO.cpp
  stable/12/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64.td
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedA53.td
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedA57.td
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedCyclone.td
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedExynosM3.td
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedExynosM5.td
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedFalkor.td
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedKryo.td
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedThunderX.td
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedThunderX2T99.td
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Subtarget.h
  stable/12/contrib/llvm-project/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/BPF/BTFDebug.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFCopy.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFCopy.h
  stable/12/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFDeadCode.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFDeadCode.h
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/P9InstrResources.td
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.h
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrAltivec.td
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrVSX.td
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.h
  stable/12/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86.h
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86.td
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86AsmPrinter.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86FastISel.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86FrameLowering.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.h
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86InstrCompiler.td
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86InstrControl.td
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86InstrInfo.td
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86MCInstLower.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86Subtarget.h
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86TargetMachine.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86TargetMachine.h
  stable/12/contrib/llvm-project/llvm/lib/Transforms/Coroutines/CoroSplit.cpp
  stable/12/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp
  stable/12/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
  stable/12/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
  stable/12/contrib/llvm-project/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
  stable/12/contrib/llvm-project/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
  stable/12/contrib/llvm-project/llvm/lib/Transforms/Utils/ValueMapper.cpp
  stable/12/contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/Object.cpp
  stable/12/contrib/llvm-project/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
  stable/12/etc/mtree/BSD.debug.dist
  stable/12/etc/mtree/BSD.usr.dist
  stable/12/lib/clang/freebsd_cc_version.h
  stable/12/lib/clang/headers/Makefile
  stable/12/lib/clang/include/VCSVersion.inc
  stable/12/lib/clang/include/clang/Basic/Version.inc
  stable/12/lib/clang/include/clang/Config/config.h
  stable/12/lib/clang/include/lld/Common/Version.inc
  stable/12/lib/clang/include/lldb/Host/Config.h
  stable/12/lib/clang/include/llvm/Config/config.h
  stable/12/lib/clang/include/llvm/Config/llvm-config.h
  stable/12/lib/clang/include/llvm/Support/VCSRevision.h
  stable/12/lib/clang/libclang/Makefile
  stable/12/lib/clang/liblldb/Makefile
  stable/12/lib/clang/libllvm/Makefile
  stable/12/lib/libclang_rt/Makefile.inc
  stable/12/share/mk/src.opts.mk
  stable/12/sys/sys/param.h
  stable/12/targets/pseudo/bootstrap-tools/Makefile
  stable/12/targets/pseudo/clang/Makefile.depend
  stable/12/tools/build/mk/OptionalObsoleteFiles.inc
  stable/12/usr.bin/clang/Makefile
  stable/12/usr.bin/clang/bugpoint/bugpoint.1
  stable/12/usr.bin/clang/clang/clang.1
  stable/12/usr.bin/clang/llc/llc.1
  stable/12/usr.bin/clang/lldb/Makefile
  stable/12/usr.bin/clang/lldb/lldb.1
  stable/12/usr.bin/clang/lli/lli.1
  stable/12/usr.bin/clang/llvm-ar/Makefile
  stable/12/usr.bin/clang/llvm-ar/llvm-ar.1
  stable/12/usr.bin/clang/llvm-as/llvm-as.1
  stable/12/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1
  stable/12/usr.bin/clang/llvm-cov/llvm-cov.1
  stable/12/usr.bin/clang/llvm-cxxfilt/Makefile
  stable/12/usr.bin/clang/llvm-diff/llvm-diff.1
  stable/12/usr.bin/clang/llvm-dis/llvm-dis.1
  stable/12/usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1
  stable/12/usr.bin/clang/llvm-extract/llvm-extract.1
  stable/12/usr.bin/clang/llvm-link/llvm-link.1
  stable/12/usr.bin/clang/llvm-mca/llvm-mca.1
  stable/12/usr.bin/clang/llvm-nm/llvm-nm.1
  stable/12/usr.bin/clang/llvm-objcopy/Makefile
  stable/12/usr.bin/clang/llvm-objdump/llvm-objdump.1
  stable/12/usr.bin/clang/llvm-pdbutil/llvm-pdbutil.1
  stable/12/usr.bin/clang/llvm-profdata/llvm-profdata.1
  stable/12/usr.bin/clang/llvm-strings/Makefile
  stable/12/usr.bin/clang/llvm-symbolizer/Makefile
  stable/12/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1
  stable/12/usr.bin/clang/llvm-tblgen/llvm-tblgen.1
  stable/12/usr.bin/clang/opt/opt.1
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/Makefile.inc1
==============================================================================
--- stable/12/Makefile.inc1	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/Makefile.inc1	Fri Jul 24 20:48:06 2020	(r363494)
@@ -659,7 +659,7 @@ BSARGS= 	DESTDIR= \
 		MK_HTML=no NO_LINT=yes MK_MAN=no \
 		-DNO_PIC MK_PROFILE=no -DNO_SHARED \
 		-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
-		MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \
+		MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \
 		MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no \
 		MK_INCLUDES=yes
 
@@ -680,7 +680,7 @@ TMAKE=		\
 		SSP_CFLAGS= \
 		-DNO_LINT \
 		-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
-		MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \
+		MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \
 		MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no
 
 # cross-tools stage
@@ -2445,6 +2445,7 @@ NXBMAKEARGS+= \
 	-DNO_PIC \
 	SSP_CFLAGS= \
 	MK_CLANG_EXTRAS=no \
+	MK_CLANG_FORMAT=no \
 	MK_CLANG_FULL=no \
 	MK_CTF=no \
 	MK_DEBUG_FILES=no \

Modified: stable/12/ObsoleteFiles.inc
==============================================================================
--- stable/12/ObsoleteFiles.inc	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/ObsoleteFiles.inc	Fri Jul 24 20:48:06 2020	(r363494)
@@ -38,6 +38,257 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20200722: new clang import which bumps version from 10.0.0 to 10.0.1.
+OLD_FILES+=usr/lib/clang/10.0.0/include/cuda_wrappers/algorithm
+OLD_FILES+=usr/lib/clang/10.0.0/include/cuda_wrappers/complex
+OLD_FILES+=usr/lib/clang/10.0.0/include/cuda_wrappers/new
+OLD_DIRS+=usr/lib/clang/10.0.0/include/cuda_wrappers
+OLD_FILES+=usr/lib/clang/10.0.0/include/fuzzer/FuzzedDataProvider.h
+OLD_DIRS+=usr/lib/clang/10.0.0/include/fuzzer
+OLD_FILES+=usr/lib/clang/10.0.0/include/openmp_wrappers/__clang_openmp_math.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/openmp_wrappers/__clang_openmp_math_declares.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/openmp_wrappers/cmath
+OLD_FILES+=usr/lib/clang/10.0.0/include/openmp_wrappers/math.h
+OLD_DIRS+=usr/lib/clang/10.0.0/include/openmp_wrappers
+OLD_FILES+=usr/lib/clang/10.0.0/include/ppc_wrappers/emmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/ppc_wrappers/mm_malloc.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/ppc_wrappers/mmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/ppc_wrappers/pmmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/ppc_wrappers/smmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/ppc_wrappers/tmmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/ppc_wrappers/xmmintrin.h
+OLD_DIRS+=usr/lib/clang/10.0.0/include/ppc_wrappers
+OLD_FILES+=usr/lib/clang/10.0.0/include/profile/InstrProfData.inc
+OLD_DIRS+=usr/lib/clang/10.0.0/include/profile
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/allocator_interface.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/asan_interface.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/common_interface_defs.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/coverage_interface.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/dfsan_interface.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/hwasan_interface.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/linux_syscall_hooks.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/lsan_interface.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/msan_interface.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/netbsd_syscall_hooks.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/scudo_interface.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/tsan_interface.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/tsan_interface_atomic.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sanitizer/ubsan_interface.h
+OLD_DIRS+=usr/lib/clang/10.0.0/include/sanitizer
+OLD_FILES+=usr/lib/clang/10.0.0/include/xray/xray_interface.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/xray/xray_log_interface.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/xray/xray_records.h
+OLD_DIRS+=usr/lib/clang/10.0.0/include/xray
+OLD_FILES+=usr/lib/clang/10.0.0/include/__clang_cuda_builtin_vars.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/__clang_cuda_cmath.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/__clang_cuda_complex_builtins.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/__clang_cuda_device_functions.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/__clang_cuda_intrinsics.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/__clang_cuda_libdevice_declares.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/__clang_cuda_math_forward_declares.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/__clang_cuda_runtime_wrapper.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/__stddef_max_align_t.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/__wmmintrin_aes.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/__wmmintrin_pclmul.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/adxintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/altivec.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/ammintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/arm64intr.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/arm_acle.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/arm_cmse.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/arm_fp16.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/arm_mve.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/arm_neon.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/armintr.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx2intrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512bf16intrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512bitalgintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512bwintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512cdintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512dqintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512erintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512fintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512ifmaintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512ifmavlintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512pfintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vbmi2intrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vbmiintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vbmivlintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vlbf16intrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vlbitalgintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vlbwintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vlcdintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vldqintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vlintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vlvbmi2intrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vlvnniintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vlvp2intersectintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vnniintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vp2intersectintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vpopcntdqintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avx512vpopcntdqvlintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/avxintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/bmi2intrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/bmiintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/cetintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/cldemoteintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/clflushoptintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/clwbintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/clzerointrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/cpuid.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/emmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/enqcmdintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/f16cintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/fma4intrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/fmaintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/fxsrintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/gfniintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/htmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/htmxlintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/ia32intrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/immintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/invpcidintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/lwpintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/lzcntintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/mm3dnow.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/mm_malloc.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/mmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/module.modulemap
+OLD_FILES+=usr/lib/clang/10.0.0/include/movdirintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/msa.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/mwaitxintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/nmmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/opencl-c-base.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/opencl-c.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/pconfigintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/pkuintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/pmmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/popcntintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/prfchwintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/ptwriteintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/rdseedintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/rtmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/s390intrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/sgxintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/shaintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/smmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/tbmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/tmmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/vadefs.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/vaesintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/vecintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/vpclmulqdqintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/waitpkgintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/wbnoinvdintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/wmmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/x86intrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/xmmintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/xopintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/xsavecintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/xsaveintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/xsaveoptintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/xsavesintrin.h
+OLD_FILES+=usr/lib/clang/10.0.0/include/xtestintrin.h
+OLD_DIRS+=usr/lib/clang/10.0.0/include
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-aarch64.so
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-arm.so
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-armhf.so
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-i386.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-i386.so
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-preinit-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-preinit-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-preinit-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan-x86_64.so
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan_cxx-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan_cxx-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan_cxx-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.cfi-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.cfi-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.cfi-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.cfi-i386.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.cfi-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.cfi_diag-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.cfi_diag-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.cfi_diag-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.cfi_diag-i386.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.cfi_diag-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.dd-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.dd-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.fuzzer-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.fuzzer-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.fuzzer_no_main-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.msan-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.msan-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.msan_cxx-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.msan_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.profile-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.profile-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.profile-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.profile-i386.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.profile-powerpc.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.profile-powerpc64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.profile-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.safestack-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.safestack-i386.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.stats-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.stats-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.stats-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.stats-i386.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.stats-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.stats_client-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.stats_client-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.stats_client-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.stats_client-i386.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.tsan-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.tsan-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.tsan_cxx-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_minimal-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_minimal-i386.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_standalone-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-basic-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-basic-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-basic-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-basic-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-fdr-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-fdr-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-fdr-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-fdr-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-profiling-aarch64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-profiling-arm.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-profiling-armhf.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-profiling-x86_64.a
+OLD_FILES+=usr/lib/clang/10.0.0/lib/freebsd/libclang_rt.xray-x86_64.a
+OLD_DIRS+=usr/lib/clang/10.0.0/lib/freebsd
+OLD_DIRS+=usr/lib/clang/10.0.0/lib
+OLD_DIRS+=usr/lib/clang/10.0.0
+
 # 20200516: Remove bogus man links
 OLD_FILES+=usr/share/man/man3/getauusernam_R.3.gz
 OLD_FILES+=usr/share/man/man3/getauclassnam_3.3.gz
@@ -5375,7 +5626,6 @@ OLD_FILES+=usr/include/clang/3.3/x86intrin.h
 OLD_FILES+=usr/include/clang/3.3/xmmintrin.h
 OLD_FILES+=usr/include/clang/3.3/xopintrin.h
 OLD_FILES+=usr/share/man/man1/llvm-prof.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz
 OLD_DIRS+=usr/include/clang/3.3
 # 20140216: nve(4) removed
 OLD_FILES+=usr/share/man/man4/if_nve.4.gz

Modified: stable/12/UPDATING
==============================================================================
--- stable/12/UPDATING	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/UPDATING	Fri Jul 24 20:48:06 2020	(r363494)
@@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITHOUT_CLANG and 
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
+20200722:
+	Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have
+	been upgraded to 10.0.1.  Please see the 20141231 entry below for
+	information about prerequisites and upgrading, if you are not already
+	using clang 3.5.0 or higher.
+
 20200708:
 	read(2) of a directory fd is now rejected by default.  root may
 	re-enable it for the entire system with the

Modified: stable/12/contrib/llvm-project/FREEBSD-Xlist
==============================================================================
--- stable/12/contrib/llvm-project/FREEBSD-Xlist	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/FREEBSD-Xlist	Fri Jul 24 20:48:06 2020	(r363494)
@@ -3,6 +3,7 @@
 .clang-format
 .clang-tidy
 .git-blame-ignore-revs
+.github/
 .gitignore
 CONTRIBUTING.md
 README.md
@@ -264,6 +265,7 @@ lldb/.clang-format
 lldb/.gitignore
 lldb/CMakeLists.txt
 lldb/CODE_OWNERS.txt
+lldb/bindings/CMakeLists.txt
 lldb/cmake/
 lldb/docs/.htaccess
 lldb/docs/CMakeLists.txt
@@ -529,6 +531,7 @@ llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt
 llvm/lib/ExecutionEngine/PerfJITEvents/LLVMBuild.txt
 llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt
 llvm/lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt
+llvm/lib/Extensions/
 llvm/lib/Frontend/CMakeLists.txt
 llvm/lib/Frontend/LLVMBuild.txt
 llvm/lib/Frontend/OpenMP/CMakeLists.txt
@@ -861,7 +864,8 @@ llvm/tools/llvm-dis/LLVMBuild.txt
 llvm/tools/llvm-dwarfdump/CMakeLists.txt
 llvm/tools/llvm-dwarfdump/LLVMBuild.txt
 llvm/tools/llvm-dwarfdump/fuzzer/
-llvm/tools/llvm-dwp/
+llvm/tools/llvm-dwp/CMakeLists.txt
+llvm/tools/llvm-dwp/LLVMBuild.txt
 llvm/tools/llvm-elfabi/
 llvm/tools/llvm-exegesis/
 llvm/tools/llvm-extract/CMakeLists.txt
@@ -908,12 +912,14 @@ llvm/tools/llvm-reduce/
 llvm/tools/llvm-rtdyld/CMakeLists.txt
 llvm/tools/llvm-rtdyld/LLVMBuild.txt
 llvm/tools/llvm-shlib/
-llvm/tools/llvm-size/
+llvm/tools/llvm-size/CMakeLists.txt
+llvm/tools/llvm-size/LLVMBuild.txt
 llvm/tools/llvm-special-case-list-fuzzer/
 llvm/tools/llvm-split/
 llvm/tools/llvm-stress/CMakeLists.txt
 llvm/tools/llvm-stress/LLVMBuild.txt
-llvm/tools/llvm-strings/
+llvm/tools/llvm-strings/CMakeLists.txt
+llvm/tools/llvm-strings/LLVMBuild.txt
 llvm/tools/llvm-symbolizer/CMakeLists.txt
 llvm/tools/llvm-undname/
 llvm/tools/llvm-xray/CMakeLists.txt

Modified: stable/12/contrib/llvm-project/clang/include/clang/AST/DeclBase.h
==============================================================================
--- stable/12/contrib/llvm-project/clang/include/clang/AST/DeclBase.h	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/include/clang/AST/DeclBase.h	Fri Jul 24 20:48:06 2020	(r363494)
@@ -856,14 +856,15 @@ class alignas(8) Decl { (public)
     return getParentFunctionOrMethod() == nullptr;
   }
 
-  /// Returns true if this declaration lexically is inside a function.
-  /// It recognizes non-defining declarations as well as members of local
-  /// classes:
+  /// Returns true if this declaration is lexically inside a function or inside
+  /// a variable initializer. It recognizes non-defining declarations as well
+  /// as members of local classes:
   /// \code
   ///     void foo() { void bar(); }
   ///     void foo2() { class ABC { void bar(); }; }
+  ///     inline int x = [](){ return 0; };
   /// \endcode
-  bool isLexicallyWithinFunctionOrMethod() const;
+  bool isInLocalScope() const;
 
   /// If this decl is defined inside a function/method/block it returns
   /// the corresponding DeclContext, otherwise it returns null.

Modified: stable/12/contrib/llvm-project/clang/include/clang/Basic/Attr.td
==============================================================================
--- stable/12/contrib/llvm-project/clang/include/clang/Basic/Attr.td	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/include/clang/Basic/Attr.td	Fri Jul 24 20:48:06 2020	(r363494)
@@ -685,7 +685,7 @@ def XRayLogArgs : InheritableAttr {
 
 def PatchableFunctionEntry
     : InheritableAttr,
-      TargetSpecificAttr<TargetArch<["aarch64", "x86", "x86_64"]>> {
+      TargetSpecificAttr<TargetArch<["aarch64", "aarch64_be", "x86", "x86_64"]>> {
   let Spellings = [GCC<"patchable_function_entry">];
   let Subjects = SubjectList<[Function, ObjCMethod]>;
   let Args = [UnsignedArgument<"Count">, DefaultIntArgument<"Offset", 0>];

Modified: stable/12/contrib/llvm-project/clang/include/clang/Driver/Options.td
==============================================================================
--- stable/12/contrib/llvm-project/clang/include/clang/Driver/Options.td	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/include/clang/Driver/Options.td	Fri Jul 24 20:48:06 2020	(r363494)
@@ -2267,6 +2267,14 @@ def mspeculative_load_hardening : Flag<["-"], "mspecul
   Group<m_Group>, Flags<[CoreOption,CC1Option]>;
 def mno_speculative_load_hardening : Flag<["-"], "mno-speculative-load-hardening">,
   Group<m_Group>, Flags<[CoreOption]>;
+def mlvi_hardening : Flag<["-"], "mlvi-hardening">, Group<m_Group>, Flags<[CoreOption,DriverOption]>,
+  HelpText<"Enable all mitigations for Load Value Injection (LVI)">;
+def mno_lvi_hardening : Flag<["-"], "mno-lvi-hardening">, Group<m_Group>, Flags<[CoreOption,DriverOption]>,
+  HelpText<"Disable mitigations for Load Value Injection (LVI)">;
+def mlvi_cfi : Flag<["-"], "mlvi-cfi">, Group<m_Group>, Flags<[CoreOption,DriverOption]>,
+  HelpText<"Enable only control-flow mitigations for Load Value Injection (LVI)">;
+def mno_lvi_cfi : Flag<["-"], "mno-lvi-cfi">, Group<m_Group>, Flags<[CoreOption,DriverOption]>,
+  HelpText<"Disable control-flow mitigations for Load Value Injection (LVI)">;
 
 def mrelax : Flag<["-"], "mrelax">, Group<m_riscv_Features_Group>,
   HelpText<"Enable linker relaxation">;
@@ -2439,6 +2447,12 @@ def mlongcall: Flag<["-"], "mlongcall">,
     Group<m_ppc_Features_Group>;
 def mno_longcall : Flag<["-"], "mno-longcall">,
     Group<m_ppc_Features_Group>;
+def maix_struct_return : Flag<["-"], "maix-struct-return">,
+  Group<m_Group>, Flags<[CC1Option]>,
+  HelpText<"Return all structs in memory (PPC32 only)">;
+def msvr4_struct_return : Flag<["-"], "msvr4-struct-return">,
+  Group<m_Group>, Flags<[CC1Option]>,
+  HelpText<"Return small structs in registers (PPC32 only)">;
 
 def mvx : Flag<["-"], "mvx">, Group<m_Group>;
 def mno_vx : Flag<["-"], "mno-vx">, Group<m_Group>;

Modified: stable/12/contrib/llvm-project/clang/lib/AST/DeclBase.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/AST/DeclBase.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/AST/DeclBase.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -332,13 +332,16 @@ void Decl::setDeclContextsImpl(DeclContext *SemaDC, De
   }
 }
 
-bool Decl::isLexicallyWithinFunctionOrMethod() const {
+bool Decl::isInLocalScope() const {
   const DeclContext *LDC = getLexicalDeclContext();
   while (true) {
     if (LDC->isFunctionOrMethod())
       return true;
     if (!isa<TagDecl>(LDC))
       return false;
+    if (const auto *CRD = dyn_cast<CXXRecordDecl>(LDC))
+      if (CRD->isLambda())
+        return true;
     LDC = LDC->getLexicalParent();
   }
   return false;

Modified: stable/12/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -8593,6 +8593,10 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const 
 static bool EvaluateArrayNewInitList(EvalInfo &Info, LValue &This,
                                      APValue &Result, const InitListExpr *ILE,
                                      QualType AllocType);
+static bool EvaluateArrayNewConstructExpr(EvalInfo &Info, LValue &This,
+                                          APValue &Result,
+                                          const CXXConstructExpr *CCE,
+                                          QualType AllocType);
 
 bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {
   if (!Info.getLangOpts().CPlusPlus2a)
@@ -8642,6 +8646,7 @@ bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNe
 
   const Expr *Init = E->getInitializer();
   const InitListExpr *ResizedArrayILE = nullptr;
+  const CXXConstructExpr *ResizedArrayCCE = nullptr;
 
   QualType AllocType = E->getAllocatedType();
   if (Optional<const Expr*> ArraySize = E->getArraySize()) {
@@ -8685,7 +8690,7 @@ bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNe
     //   -- the new-initializer is a braced-init-list and the number of
     //      array elements for which initializers are provided [...]
     //      exceeds the number of elements to initialize
-    if (Init) {
+    if (Init && !isa<CXXConstructExpr>(Init)) {
       auto *CAT = Info.Ctx.getAsConstantArrayType(Init->getType());
       assert(CAT && "unexpected type for array initializer");
 
@@ -8708,6 +8713,8 @@ bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNe
       // special handling for this case when we initialize.
       if (InitBound != AllocBound)
         ResizedArrayILE = cast<InitListExpr>(Init);
+      } else if (Init) {
+        ResizedArrayCCE = cast<CXXConstructExpr>(Init);
     }
 
     AllocType = Info.Ctx.getConstantArrayType(AllocType, ArrayBound, nullptr,
@@ -8772,6 +8779,10 @@ bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNe
     if (!EvaluateArrayNewInitList(Info, Result, *Val, ResizedArrayILE,
                                   AllocType))
       return false;
+  } else if (ResizedArrayCCE) {
+    if (!EvaluateArrayNewConstructExpr(Info, Result, *Val, ResizedArrayCCE,
+                                       AllocType))
+      return false;
   } else if (Init) {
     if (!EvaluateInPlace(*Val, Info, Result, Init))
       return false;
@@ -9595,6 +9606,16 @@ static bool EvaluateArrayNewInitList(EvalInfo &Info, L
          "not an array rvalue");
   return ArrayExprEvaluator(Info, This, Result)
       .VisitInitListExpr(ILE, AllocType);
+}
+
+static bool EvaluateArrayNewConstructExpr(EvalInfo &Info, LValue &This,
+                                          APValue &Result,
+                                          const CXXConstructExpr *CCE,
+                                          QualType AllocType) {
+  assert(CCE->isRValue() && CCE->getType()->isArrayType() &&
+         "not an array rvalue");
+  return ArrayExprEvaluator(Info, This, Result)
+      .VisitCXXConstructExpr(CCE, This, &Result, AllocType);
 }
 
 // Return true iff the given array filler may depend on the element index.

Modified: stable/12/contrib/llvm-project/clang/lib/AST/RawCommentList.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/AST/RawCommentList.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/AST/RawCommentList.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -430,7 +430,7 @@ std::string RawComment::getFormattedText(const SourceM
   };
 
   auto DropTrailingNewLines = [](std::string &Str) {
-    while (Str.back() == '\n')
+    while (!Str.empty() && Str.back() == '\n')
       Str.pop_back();
   };
 

Modified: stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h	Fri Jul 24 20:48:06 2020	(r363494)
@@ -276,11 +276,12 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public T
       break;
     case 'Q': // Memory operand that is an offset from a register (it is
               // usually better to use `m' or `es' in asm statements)
+      Info.setAllowsRegister();
+      LLVM_FALLTHROUGH;
     case 'Z': // Memory operand that is an indexed or indirect from a
               // register (it is usually better to use `m' or `es' in
               // asm statements)
       Info.setAllowsMemory();
-      Info.setAllowsRegister();
       break;
     case 'R': // AIX TOC entry
     case 'a': // Address operand that is an indexed or indirect from a

Modified: stable/12/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -1847,9 +1847,16 @@ void CodeGenModule::SetFunctionAttributes(GlobalDecl G
   else if (const auto *SA = FD->getAttr<SectionAttr>())
      F->setSection(SA->getName());
 
+  // If we plan on emitting this inline builtin, we can't treat it as a builtin.
   if (FD->isInlineBuiltinDeclaration()) {
-    F->addAttribute(llvm::AttributeList::FunctionIndex,
-                    llvm::Attribute::NoBuiltin);
+    const FunctionDecl *FDBody;
+    bool HasBody = FD->hasBody(FDBody);
+    (void)HasBody;
+    assert(HasBody && "Inline builtin declarations should always have an "
+                      "available body!");
+    if (shouldEmitFunction(FDBody))
+      F->addAttribute(llvm::AttributeList::FunctionIndex,
+                      llvm::Attribute::NoBuiltin);
   }
 
   if (FD->isReplaceableGlobalAllocationFunction()) {

Modified: stable/12/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -4123,22 +4123,39 @@ namespace {
 /// PPC32_SVR4_ABIInfo - The 32-bit PowerPC ELF (SVR4) ABI information.
 class PPC32_SVR4_ABIInfo : public DefaultABIInfo {
   bool IsSoftFloatABI;
+  bool IsRetSmallStructInRegABI;
 
   CharUnits getParamTypeAlignment(QualType Ty) const;
 
 public:
-  PPC32_SVR4_ABIInfo(CodeGen::CodeGenTypes &CGT, bool SoftFloatABI)
-      : DefaultABIInfo(CGT), IsSoftFloatABI(SoftFloatABI) {}
+  PPC32_SVR4_ABIInfo(CodeGen::CodeGenTypes &CGT, bool SoftFloatABI,
+                     bool RetSmallStructInRegABI)
+      : DefaultABIInfo(CGT), IsSoftFloatABI(SoftFloatABI),
+        IsRetSmallStructInRegABI(RetSmallStructInRegABI) {}
 
+  ABIArgInfo classifyReturnType(QualType RetTy) const;
+
+  void computeInfo(CGFunctionInfo &FI) const override {
+    if (!getCXXABI().classifyReturnType(FI))
+      FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
+    for (auto &I : FI.arguments())
+      I.info = classifyArgumentType(I.type);
+  }
+
   Address EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
                     QualType Ty) const override;
 };
 
 class PPC32TargetCodeGenInfo : public TargetCodeGenInfo {
 public:
-  PPC32TargetCodeGenInfo(CodeGenTypes &CGT, bool SoftFloatABI)
-      : TargetCodeGenInfo(new PPC32_SVR4_ABIInfo(CGT, SoftFloatABI)) {}
+  PPC32TargetCodeGenInfo(CodeGenTypes &CGT, bool SoftFloatABI,
+                         bool RetSmallStructInRegABI)
+      : TargetCodeGenInfo(new PPC32_SVR4_ABIInfo(CGT, SoftFloatABI,
+                                                 RetSmallStructInRegABI)) {}
 
+  static bool isStructReturnInRegABI(const llvm::Triple &Triple,
+                                     const CodeGenOptions &Opts);
+
   int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const override {
     // This is recovered from gcc output.
     return 1; // r1 is the dedicated stack pointer
@@ -4173,6 +4190,34 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(Qu
   return CharUnits::fromQuantity(4);
 }
 
+ABIArgInfo PPC32_SVR4_ABIInfo::classifyReturnType(QualType RetTy) const {
+  uint64_t Size;
+
+  // -msvr4-struct-return puts small aggregates in GPR3 and GPR4.
+  if (isAggregateTypeForABI(RetTy) && IsRetSmallStructInRegABI &&
+      (Size = getContext().getTypeSize(RetTy)) <= 64) {
+    // System V ABI (1995), page 3-22, specified:
+    // > A structure or union whose size is less than or equal to 8 bytes
+    // > shall be returned in r3 and r4, as if it were first stored in the
+    // > 8-byte aligned memory area and then the low addressed word were
+    // > loaded into r3 and the high-addressed word into r4.  Bits beyond
+    // > the last member of the structure or union are not defined.
+    //
+    // GCC for big-endian PPC32 inserts the pad before the first member,
+    // not "beyond the last member" of the struct.  To stay compatible
+    // with GCC, we coerce the struct to an integer of the same size.
+    // LLVM will extend it and return i32 in r3, or i64 in r3:r4.
+    if (Size == 0)
+      return ABIArgInfo::getIgnore();
+    else {
+      llvm::Type *CoerceTy = llvm::Type::getIntNTy(getVMContext(), Size);
+      return ABIArgInfo::getDirect(CoerceTy);
+    }
+  }
+
+  return DefaultABIInfo::classifyReturnType(RetTy);
+}
+
 // TODO: this implementation is now likely redundant with
 // DefaultABIInfo::EmitVAArg.
 Address PPC32_SVR4_ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAList,
@@ -4328,6 +4373,25 @@ Address PPC32_SVR4_ABIInfo::EmitVAArg(CodeGenFunction 
   return Result;
 }
 
+bool PPC32TargetCodeGenInfo::isStructReturnInRegABI(
+    const llvm::Triple &Triple, const CodeGenOptions &Opts) {
+  assert(Triple.getArch() == llvm::Triple::ppc);
+
+  switch (Opts.getStructReturnConvention()) {
+  case CodeGenOptions::SRCK_Default:
+    break;
+  case CodeGenOptions::SRCK_OnStack: // -maix-struct-return
+    return false;
+  case CodeGenOptions::SRCK_InRegs: // -msvr4-struct-return
+    return true;
+  }
+
+  if (Triple.isOSBinFormatELF() && !Triple.isOSLinux())
+    return true;
+
+  return false;
+}
+
 bool
 PPC32TargetCodeGenInfo::initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF,
                                                 llvm::Value *Address) const {
@@ -9613,7 +9677,8 @@ ABIArgInfo RISCVABIInfo::classifyArgumentType(QualType
   uint64_t Size = getContext().getTypeSize(Ty);
 
   // Pass floating point values via FPRs if possible.
-  if (IsFixed && Ty->isFloatingType() && FLen >= Size && ArgFPRsLeft) {
+  if (IsFixed && Ty->isFloatingType() && !Ty->isComplexType() &&
+      FLen >= Size && ArgFPRsLeft) {
     ArgFPRsLeft--;
     return ABIArgInfo::getDirect();
   }
@@ -9852,10 +9917,14 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeG
     return SetCGInfo(new ARMTargetCodeGenInfo(Types, Kind));
   }
 
-  case llvm::Triple::ppc:
+  case llvm::Triple::ppc: {
+    bool IsSoftFloat =
+        CodeGenOpts.FloatABI == "soft" || getTarget().hasFeature("spe");
+    bool RetSmallStructInRegABI =
+        PPC32TargetCodeGenInfo::isStructReturnInRegABI(Triple, CodeGenOpts);
     return SetCGInfo(
-        new PPC32TargetCodeGenInfo(Types, CodeGenOpts.FloatABI == "soft" ||
-                                   getTarget().hasFeature("spe")));
+        new PPC32TargetCodeGenInfo(Types, IsSoftFloat, RetSmallStructInRegABI));
+  }
   case llvm::Triple::ppc64:
     if (Triple.isOSBinFormatELF()) {
       PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv1;

Modified: stable/12/contrib/llvm-project/clang/lib/Driver/SanitizerArgs.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Driver/SanitizerArgs.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Driver/SanitizerArgs.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -454,8 +454,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
         << lastArgumentForMask(D, Args, Kinds & NeedsLTO) << "-flto";
   }
 
-  if ((Kinds & SanitizerKind::ShadowCallStack) &&
-      TC.getTriple().getArch() == llvm::Triple::aarch64 &&
+  if ((Kinds & SanitizerKind::ShadowCallStack) && TC.getTriple().isAArch64() &&
       !llvm::AArch64::isX18ReservedByDefault(TC.getTriple()) &&
       !Args.hasArg(options::OPT_ffixed_x18)) {
     D.Diag(diag::err_drv_argument_only_allowed_with)

Modified: stable/12/contrib/llvm-project/clang/lib/Driver/ToolChain.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Driver/ToolChain.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Driver/ToolChain.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -954,15 +954,12 @@ SanitizerMask ToolChain::getSupportedSanitizers() cons
   if (getTriple().getArch() == llvm::Triple::x86 ||
       getTriple().getArch() == llvm::Triple::x86_64 ||
       getTriple().getArch() == llvm::Triple::arm ||
-      getTriple().getArch() == llvm::Triple::aarch64 ||
       getTriple().getArch() == llvm::Triple::wasm32 ||
-      getTriple().getArch() == llvm::Triple::wasm64)
+      getTriple().getArch() == llvm::Triple::wasm64 || getTriple().isAArch64())
     Res |= SanitizerKind::CFIICall;
-  if (getTriple().getArch() == llvm::Triple::x86_64 ||
-      getTriple().getArch() == llvm::Triple::aarch64)
+  if (getTriple().getArch() == llvm::Triple::x86_64 || getTriple().isAArch64())
     Res |= SanitizerKind::ShadowCallStack;
-  if (getTriple().getArch() == llvm::Triple::aarch64 ||
-      getTriple().getArch() == llvm::Triple::aarch64_be)
+  if (getTriple().isAArch64())
     Res |= SanitizerKind::MemTag;
   return Res;
 }

Modified: stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/RISCV.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/RISCV.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -426,8 +426,9 @@ void riscv::getRISCVTargetFeatures(const Driver &D, co
   if (Args.hasArg(options::OPT_ffixed_x31))
     Features.push_back("+reserve-x31");
 
-  // -mrelax is default, unless -mno-relax is specified.
-  if (Args.hasFlag(options::OPT_mrelax, options::OPT_mno_relax, true))
+  // FreeBSD local, because ld.lld doesn't support relaxations
+  // -mno-relax is default, unless -mrelax is specified.
+  if (Args.hasFlag(options::OPT_mrelax, options::OPT_mno_relax, false))
     Features.push_back("+relax");
   else
     Features.push_back("-relax");

Modified: stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -147,6 +147,7 @@ void x86::getX86TargetFeatures(const Driver &D, const 
   // flags). This is a bit hacky but keeps existing usages working. We should
   // consider deprecating this and instead warn if the user requests external
   // retpoline thunks and *doesn't* request some form of retpolines.
+  auto SpectreOpt = clang::driver::options::ID::OPT_INVALID;
   if (Args.hasArgNoClaim(options::OPT_mretpoline, options::OPT_mno_retpoline,
                          options::OPT_mspeculative_load_hardening,
                          options::OPT_mno_speculative_load_hardening)) {
@@ -154,12 +155,14 @@ void x86::getX86TargetFeatures(const Driver &D, const 
                      false)) {
       Features.push_back("+retpoline-indirect-calls");
       Features.push_back("+retpoline-indirect-branches");
+      SpectreOpt = options::OPT_mretpoline;
     } else if (Args.hasFlag(options::OPT_mspeculative_load_hardening,
                             options::OPT_mno_speculative_load_hardening,
                             false)) {
       // On x86, speculative load hardening relies on at least using retpolines
       // for indirect calls.
       Features.push_back("+retpoline-indirect-calls");
+      SpectreOpt = options::OPT_mspeculative_load_hardening;
     }
   } else if (Args.hasFlag(options::OPT_mretpoline_external_thunk,
                           options::OPT_mno_retpoline_external_thunk, false)) {
@@ -167,6 +170,26 @@ void x86::getX86TargetFeatures(const Driver &D, const 
     // eventually switch to an error here.
     Features.push_back("+retpoline-indirect-calls");
     Features.push_back("+retpoline-indirect-branches");
+    SpectreOpt = options::OPT_mretpoline_external_thunk;
+  }
+
+  auto LVIOpt = clang::driver::options::ID::OPT_INVALID;
+  if (Args.hasFlag(options::OPT_mlvi_hardening, options::OPT_mno_lvi_hardening,
+                   false)) {
+    Features.push_back("+lvi-load-hardening");
+    Features.push_back("+lvi-cfi"); // load hardening implies CFI protection
+    LVIOpt = options::OPT_mlvi_hardening;
+  } else if (Args.hasFlag(options::OPT_mlvi_cfi, options::OPT_mno_lvi_cfi,
+                          false)) {
+    Features.push_back("+lvi-cfi");
+    LVIOpt = options::OPT_mlvi_cfi;
+  }
+
+  if (SpectreOpt != clang::driver::options::ID::OPT_INVALID &&
+      LVIOpt != clang::driver::options::ID::OPT_INVALID) {
+    D.Diag(diag::err_drv_argument_not_allowed_with)
+        << D.getOpts().getOptionName(SpectreOpt)
+        << D.getOpts().getOptionName(LVIOpt);
   }
 
   // Now add any that the user explicitly requested on the command line,

Modified: stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -4421,6 +4421,19 @@ void Clang::ConstructJob(Compilation &C, const JobActi
     CmdArgs.push_back(A->getValue());
   }
 
+  if (Arg *A = Args.getLastArg(options::OPT_maix_struct_return,
+                               options::OPT_msvr4_struct_return)) {
+    if (TC.getArch() != llvm::Triple::ppc) {
+      D.Diag(diag::err_drv_unsupported_opt_for_target)
+          << A->getSpelling() << RawTriple.str();
+    } else if (A->getOption().matches(options::OPT_maix_struct_return)) {
+      CmdArgs.push_back("-maix-struct-return");
+    } else {
+      assert(A->getOption().matches(options::OPT_msvr4_struct_return));
+      CmdArgs.push_back("-msvr4-struct-return");
+    }
+  }
+
   if (Arg *A = Args.getLastArg(options::OPT_fpcc_struct_return,
                                options::OPT_freg_struct_return)) {
     if (TC.getArch() != llvm::Triple::x86) {

Modified: stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -1146,6 +1146,7 @@ void Darwin::addProfileRTLibs(const ArgList &Args,
       addExportedSymbol(CmdArgs, "___gcov_flush");
       addExportedSymbol(CmdArgs, "_flush_fn_list");
       addExportedSymbol(CmdArgs, "_writeout_fn_list");
+      addExportedSymbol(CmdArgs, "_reset_fn_list");
     } else {
       addExportedSymbol(CmdArgs, "___llvm_profile_filename");
       addExportedSymbol(CmdArgs, "___llvm_profile_raw_version");

Modified: stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -309,7 +309,7 @@ static const char *getLDMOption(const llvm::Triple &T,
   }
 }
 
-static bool getPIE(const ArgList &Args, const toolchains::Linux &ToolChain) {
+static bool getPIE(const ArgList &Args, const ToolChain &TC) {
   if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_static) ||
       Args.hasArg(options::OPT_r) || Args.hasArg(options::OPT_static_pie))
     return false;
@@ -317,17 +317,16 @@ static bool getPIE(const ArgList &Args, const toolchai
   Arg *A = Args.getLastArg(options::OPT_pie, options::OPT_no_pie,
                            options::OPT_nopie);
   if (!A)
-    return ToolChain.isPIEDefault();
+    return TC.isPIEDefault();
   return A->getOption().matches(options::OPT_pie);
 }
 
-static bool getStaticPIE(const ArgList &Args,
-                         const toolchains::Linux &ToolChain) {
+static bool getStaticPIE(const ArgList &Args, const ToolChain &TC) {
   bool HasStaticPIE = Args.hasArg(options::OPT_static_pie);
   // -no-pie is an alias for -nopie. So, handling -nopie takes care of
   // -no-pie as well.
   if (HasStaticPIE && Args.hasArg(options::OPT_nopie)) {
-    const Driver &D = ToolChain.getDriver();
+    const Driver &D = TC.getDriver();
     const llvm::opt::OptTable &Opts = D.getOpts();
     const char *StaticPIEName = Opts.getOptionName(options::OPT_static_pie);
     const char *NoPIEName = Opts.getOptionName(options::OPT_nopie);
@@ -346,8 +345,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation
                                            const InputInfoList &Inputs,
                                            const ArgList &Args,
                                            const char *LinkingOutput) const {
-  const toolchains::Linux &ToolChain =
-      static_cast<const toolchains::Linux &>(getToolChain());
+  // FIXME: The Linker class constructor takes a ToolChain and not a
+  // Generic_ELF, so the static_cast might return a reference to a invalid
+  // instance (see PR45061). Ideally, the Linker constructor needs to take a
+  // Generic_ELF instead.
+  const toolchains::Generic_ELF &ToolChain =
+      static_cast<const toolchains::Generic_ELF &>(getToolChain());
   const Driver &D = ToolChain.getDriver();
 
   const llvm::Triple &Triple = getToolChain().getEffectiveTriple();
@@ -418,8 +421,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation
   if (isAndroid)
       CmdArgs.push_back("--warn-shared-textrel");
 
-  for (const auto &Opt : ToolChain.ExtraOpts)
-    CmdArgs.push_back(Opt.c_str());
+  ToolChain.addExtraOpts(CmdArgs);
 
   CmdArgs.push_back("--eh-frame-hdr");
 

Modified: stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.h
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.h	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.h	Fri Jul 24 20:48:06 2020	(r363494)
@@ -356,6 +356,12 @@ class LLVM_LIBRARY_VISIBILITY Generic_ELF : public Gen
   void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
                              llvm::opt::ArgStringList &CC1Args,
                              Action::OffloadKind DeviceOffloadKind) const override;
+
+  virtual std::string getDynamicLinker(const llvm::opt::ArgList &Args) const {
+    return {};
+  }
+
+  virtual void addExtraOpts(llvm::opt::ArgStringList &CmdArgs) const {}
 };
 
 } // end namespace toolchains

Modified: stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Hurd.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Hurd.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Hurd.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -61,8 +61,7 @@ static StringRef getOSLibDir(const llvm::Triple &Tripl
   return Triple.isArch32Bit() ? "lib" : "lib64";
 }
 
-Hurd::Hurd(const Driver &D, const llvm::Triple &Triple,
-           const ArgList &Args)
+Hurd::Hurd(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
     : Generic_ELF(D, Triple, Args) {
   std::string SysRoot = computeSysRoot();
   path_list &Paths = getFilePaths();
@@ -169,4 +168,9 @@ void Hurd::AddClangSystemIncludeArgs(const ArgList &Dr
   addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/include");
 
   addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include");
+}
+
+void Hurd::addExtraOpts(llvm::opt::ArgStringList &CmdArgs) const {
+  for (const auto &Opt : ExtraOpts)
+    CmdArgs.push_back(Opt.c_str());
 }

Modified: stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Hurd.h
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Hurd.h	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Hurd.h	Fri Jul 24 20:48:06 2020	(r363494)
@@ -27,9 +27,11 @@ class LLVM_LIBRARY_VISIBILITY Hurd : public Generic_EL
   AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
                             llvm::opt::ArgStringList &CC1Args) const override;
 
-  virtual std::string computeSysRoot() const;
+  std::string computeSysRoot() const;
 
-  virtual std::string getDynamicLinker(const llvm::opt::ArgList &Args) const;
+  std::string getDynamicLinker(const llvm::opt::ArgList &Args) const override;
+
+  void addExtraOpts(llvm::opt::ArgStringList &CmdArgs) const override;
 
   std::vector<std::string> ExtraOpts;
 

Modified: stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -986,3 +986,8 @@ void Linux::addProfileRTLibs(const llvm::opt::ArgList 
         Twine("-u", llvm::getInstrProfRuntimeHookVarName())));
   ToolChain::addProfileRTLibs(Args, CmdArgs);
 }
+
+void Linux::addExtraOpts(llvm::opt::ArgStringList &CmdArgs) const {
+  for (const auto &Opt : ExtraOpts)
+    CmdArgs.push_back(Opt.c_str());
+}

Modified: stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.h
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.h	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.h	Fri Jul 24 20:48:06 2020	(r363494)
@@ -42,7 +42,9 @@ class LLVM_LIBRARY_VISIBILITY Linux : public Generic_E
                         llvm::opt::ArgStringList &CmdArgs) const override;
   virtual std::string computeSysRoot() const;
 
-  virtual std::string getDynamicLinker(const llvm::opt::ArgList &Args) const;
+  std::string getDynamicLinker(const llvm::opt::ArgList &Args) const override;
+
+  void addExtraOpts(llvm::opt::ArgStringList &CmdArgs) const override;
 
   std::vector<std::string> ExtraOpts;
 

Modified: stable/12/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp
==============================================================================
--- stable/12/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp	Fri Jul 24 20:44:50 2020	(r363493)
+++ stable/12/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp	Fri Jul 24 20:48:06 2020	(r363494)
@@ -2176,6 +2176,10 @@ static bool isFunctionDeclarationName(const FormatToke
         Next = Next->Next;
         continue;
       }
+      if (Next->is(TT_TemplateOpener) && Next->MatchingParen) {
+        Next = Next->MatchingParen;
+        continue;
+      }
 
       break;
     }
@@ -2705,20 +2709,40 @@ bool TokenAnnotator::spaceRequiredBetween(const Annota
                                     tok::l_square));
   if (Right.is(tok::star) && Left.is(tok::l_paren))
     return false;
-  if (Right.isOneOf(tok::star, tok::amp, tok::ampamp) &&
-      (Left.is(tok::identifier) || Left.isSimpleTypeSpecifier()) &&
-      // Space between the type and the * in:
-      //   operator void*()
-      //   operator char*()
-      //   operator /*comment*/ const char*()
-      //   operator volatile /*comment*/ char*()
-      //   operator Foo*()
-      // dependent on PointerAlignment style.
-      Left.Previous &&
-      (Left.Previous->endsSequence(tok::kw_operator) ||
-       Left.Previous->endsSequence(tok::kw_const, tok::kw_operator) ||
-       Left.Previous->endsSequence(tok::kw_volatile, tok::kw_operator)))
-    return (Style.PointerAlignment != FormatStyle::PAS_Left);
+  if (Right.is(tok::star) && Left.is(tok::star))
+    return false;
+  if (Right.isOneOf(tok::star, tok::amp, tok::ampamp)) {
+    const FormatToken *Previous = &Left;
+    while (Previous && !Previous->is(tok::kw_operator)) {
+      if (Previous->is(tok::identifier) || Previous->isSimpleTypeSpecifier()) {
+        Previous = Previous->getPreviousNonComment();

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007242048.06OKm7vm013727>