Update LLVM build glue for 5.0RC1. trunk
authorjoerg <joerg@NetBSD.org>
Tue, 01 Aug 2017 20:07:37 +0000
branchtrunk
changeset 271306 b55db841d4de
parent 271305 22d01579a7e7
child 271307 83677e4f4847
Update LLVM build glue for 5.0RC1.
distrib/sets/lists/base/mi
distrib/sets/lists/comp/ad.arm
distrib/sets/lists/comp/ad.mips
distrib/sets/lists/comp/ad.powerpc
distrib/sets/lists/comp/md.amd64
distrib/sets/lists/comp/md.i386
distrib/sets/lists/comp/mi
etc/mtree/NetBSD.dist.base
external/bsd/llvm/Makefile
external/bsd/llvm/Makefile.inc
external/bsd/llvm/bin/Makefile
external/bsd/llvm/bin/bugpoint/Makefile
external/bsd/llvm/bin/clang-rename/Makefile
external/bsd/llvm/bin/clang-tblgen/Makefile
external/bsd/llvm/bin/clang/Makefile
external/bsd/llvm/bin/llc/Makefile
external/bsd/llvm/bin/lli/Makefile
external/bsd/llvm/bin/llvm-ar/Makefile
external/bsd/llvm/bin/llvm-as/Makefile
external/bsd/llvm/bin/llvm-cov/Makefile
external/bsd/llvm/bin/llvm-cxxdump/Makefile
external/bsd/llvm/bin/llvm-diff/Makefile
external/bsd/llvm/bin/llvm-dis/Makefile
external/bsd/llvm/bin/llvm-dwarfdump/Makefile
external/bsd/llvm/bin/llvm-dwp/Makefile
external/bsd/llvm/bin/llvm-extract/Makefile
external/bsd/llvm/bin/llvm-link/Makefile
external/bsd/llvm/bin/llvm-nm/Makefile
external/bsd/llvm/bin/llvm-objdump/Makefile
external/bsd/llvm/bin/llvm-profdata/Makefile
external/bsd/llvm/bin/llvm-readobj/Makefile
external/bsd/llvm/bin/llvm-size/Makefile
external/bsd/llvm/bin/llvm-symbolizer/Makefile
external/bsd/llvm/bin/llvm-xray/Makefile
external/bsd/llvm/bin/opt/Makefile
external/bsd/llvm/bin/sancov/Makefile
external/bsd/llvm/bin/sanstats/Makefile
external/bsd/llvm/bin/tblgen/Makefile
external/bsd/llvm/config/clang/Config/config.h
external/bsd/llvm/config/llvm/Config/config.h.in
external/bsd/llvm/dist/llvm-configure/autoconf/configure.ac
external/bsd/llvm/dist/llvm-configure/configure
external/bsd/llvm/dist/llvm-configure/include/llvm/Config/config.h.in
external/bsd/llvm/include/Makefile
external/bsd/llvm/lib/Makefile
external/bsd/llvm/lib/libLLVMAArch64CodeGen/Makefile
external/bsd/llvm/lib/libLLVMAArch64MCTargetDesc/Makefile
external/bsd/llvm/lib/libLLVMARMCodeGen/Makefile
external/bsd/llvm/lib/libLLVMAnalysis/Makefile
external/bsd/llvm/lib/libLLVMBinaryFormat/Makefile
external/bsd/llvm/lib/libLLVMCodeGen/Makefile
external/bsd/llvm/lib/libLLVMDebugInfoCodeView/Makefile
external/bsd/llvm/lib/libLLVMDebugInfoDWARF/Makefile
external/bsd/llvm/lib/libLLVMDebugInfoMSF/Makefile
external/bsd/llvm/lib/libLLVMDebugInfoPDB/Makefile
external/bsd/llvm/lib/libLLVMDebugInfoPDBNative/Makefile
external/bsd/llvm/lib/libLLVMDebugInfoPDBRaw/Makefile
external/bsd/llvm/lib/libLLVMGlobalISel/Makefile
external/bsd/llvm/lib/libLLVMIR/Makefile
external/bsd/llvm/lib/libLLVMInstrumentation/Makefile
external/bsd/llvm/lib/libLLVMMC/Makefile
external/bsd/llvm/lib/libLLVMMipsCodeGen/Makefile
external/bsd/llvm/lib/libLLVMObject/Makefile
external/bsd/llvm/lib/libLLVMObjectYAML/Makefile
external/bsd/llvm/lib/libLLVMOrc/Makefile
external/bsd/llvm/lib/libLLVMPowerPCCodeGen/Makefile
external/bsd/llvm/lib/libLLVMScalarOpts/Makefile
external/bsd/llvm/lib/libLLVMSelectionDAG/Makefile
external/bsd/llvm/lib/libLLVMSupport/Makefile
external/bsd/llvm/lib/libLLVMToolDrivers/Makefile
external/bsd/llvm/lib/libLLVMTransformsUtils/Makefile
external/bsd/llvm/lib/libLLVMVectorize/Makefile
external/bsd/llvm/lib/libLLVMX86CodeGen/Makefile
external/bsd/llvm/lib/libLLVMXRay/Makefile
external/bsd/llvm/lib/libclangAST/Makefile
external/bsd/llvm/lib/libclangBasic/Makefile
external/bsd/llvm/lib/libclangCodeGen/Makefile
external/bsd/llvm/lib/libclangDriver/Makefile
external/bsd/llvm/lib/libclangFormat/Makefile
external/bsd/llvm/lib/libclangFrontend/Makefile
external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile
external/bsd/llvm/lib/libclangStaticAnalyzerCore/Makefile
external/bsd/llvm/lib/libclangToolingRefactoring/Makefile
tools/llvm-lib/libLLVMBinaryFormat/Makefile
--- a/distrib/sets/lists/base/mi	Tue Aug 01 19:58:33 2017 +0000
+++ b/distrib/sets/lists/base/mi	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1158 2017/05/27 21:02:54 bouyer Exp $
+# $NetBSD: mi,v 1.1159 2017/08/01 20:07:43 joerg Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1047,7 +1047,8 @@
 ./usr/include/clang-3.5				base-obsolete		obsolete
 ./usr/include/clang-3.6				base-obsolete		obsolete
 ./usr/include/clang-3.8				base-obsolete		obsolete
-./usr/include/clang-4.0				base-c-usr
+./usr/include/clang-4.0				base-obsolete		obsolete
+./usr/include/clang-5.0				base-c-usr
 ./usr/include/compat				base-obsolete		obsolete
 ./usr/include/crypto				base-c-usr
 ./usr/include/dev				base-c-usr
--- a/distrib/sets/lists/comp/ad.arm	Tue Aug 01 19:58:33 2017 +0000
+++ b/distrib/sets/lists/comp/ad.arm	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.arm,v 1.78 2017/01/11 12:02:24 joerg Exp $
+# $NetBSD: ad.arm,v 1.79 2017/08/01 20:07:43 joerg Exp $
 ./usr/include/acorn26				comp-c-include
 ./usr/include/acorn26/ansi.h			comp-obsolete		obsolete
 ./usr/include/acorn26/aout_machdep.h		comp-obsolete		obsolete
@@ -298,8 +298,10 @@
 ./usr/include/clang-3.6/arm_neon.h		comp-obsolete		obsolete
 ./usr/include/clang-3.8/arm_acle.h		comp-obsolete		obsolete
 ./usr/include/clang-3.8/arm_neon.h		comp-obsolete		obsolete
-./usr/include/clang-4.0/arm_acle.h		comp-c-include		llvm
-./usr/include/clang-4.0/arm_neon.h		comp-c-include		llvm
+./usr/include/clang-4.0/arm_acle.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/arm_neon.h		comp-obsolete		obsolete
+./usr/include/clang-5.0/arm_acle.h		comp-c-include		llvm
+./usr/include/clang-5.0/arm_neon.h		comp-c-include		llvm
 ./usr/include/epoc32				comp-c-include
 ./usr/include/epoc32/ansi.h			comp-obsolete		obsolete
 ./usr/include/epoc32/aout_machdep.h		comp-obsolete		obsolete
--- a/distrib/sets/lists/comp/ad.mips	Tue Aug 01 19:58:33 2017 +0000
+++ b/distrib/sets/lists/comp/ad.mips	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips,v 1.69 2017/02/23 19:51:46 macallan Exp $
+# $NetBSD: ad.mips,v 1.70 2017/08/01 20:07:43 joerg Exp $
 -./usr/lib/64/libgomp.a
 -./usr/lib/64/libgomp.so
 -./usr/lib/64/libgomp.so.1
@@ -7,7 +7,8 @@
 -./usr/lib/64/libgomp_pic.a
 ./usr/bin/elf2aout				comp-obsolete		obsolete
 ./usr/bin/elf2ecoff				comp-sysutil-bin
-./usr/include/clang-4.0/msa.h			comp-c-include		llvm
+./usr/include/clang-4.0/msa.h			comp-obsolete		obsolete
+./usr/include/clang-5.0/msa.h			comp-c-include		llvm
 ./usr/include/g++/bits/mips32			comp-c-include		compat,arch64
 ./usr/include/g++/bits/mips32/c++config.h	comp-c-include		compat,arch64,gcc
 ./usr/include/g++/bits/mips64			comp-c-include		compat,arch64
--- a/distrib/sets/lists/comp/ad.powerpc	Tue Aug 01 19:58:33 2017 +0000
+++ b/distrib/sets/lists/comp/ad.powerpc	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.powerpc,v 1.86 2017/01/11 12:02:24 joerg Exp $
+# $NetBSD: ad.powerpc,v 1.87 2017/08/01 20:07:43 joerg Exp $
 ./usr/bin/elf2aout				comp-sysutil-bin
 ./usr/bin/psim					comp-debug-bin		gdb
 ./usr/include/altivec.h				comp-obsolete		obsolete
@@ -8,9 +8,12 @@
 ./usr/include/clang-3.8/altivec.h		comp-obsolete		obsolete
 ./usr/include/clang-3.8/htmintrin.h		comp-obsolete		obsolete
 ./usr/include/clang-3.8/htmxlintrin.h		comp-obsolete		obsolete
-./usr/include/clang-4.0/altivec.h		comp-c-include		llvm
-./usr/include/clang-4.0/htmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/htmxlintrin.h		comp-c-include		llvm
+./usr/include/clang-4.0/altivec.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/htmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/htmxlintrin.h		comp-obsolete		obsolete
+./usr/include/clang-5.0/altivec.h		comp-c-include		llvm
+./usr/include/clang-5.0/htmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/htmxlintrin.h		comp-c-include		llvm
 ./usr/include/g++/bits/powerpc			comp-c-include		compat
 ./usr/include/g++/bits/powerpc/c++config.h	comp-c-include		compat,gcc
 ./usr/include/g++/bits/powerpc64		comp-c-include		compat
--- a/distrib/sets/lists/comp/md.amd64	Tue Aug 01 19:58:33 2017 +0000
+++ b/distrib/sets/lists/comp/md.amd64	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.246 2017/08/01 16:54:19 maya Exp $
+# $NetBSD: md.amd64,v 1.247 2017/08/01 20:07:43 joerg Exp $
 
 ./usr/include/amd64				comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
@@ -218,62 +218,121 @@
 ./usr/include/clang-3.8/xsaveoptintrin.h	comp-obsolete		obsolete
 ./usr/include/clang-3.8/xsavesintrin.h		comp-obsolete		obsolete
 ./usr/include/clang-3.8/xtestintrin.h		comp-obsolete		obsolete
-./usr/include/clang-4.0/__wmmintrin_aes.h	comp-c-include		llvm
-./usr/include/clang-4.0/__wmmintrin_pclmul.h	comp-c-include		llvm
-./usr/include/clang-4.0/adxintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/ammintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/avx2intrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/avx512bwintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512cdintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512dqintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512erintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512fintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/avx512ifmaintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512ifmavlintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512pfintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512vbmiintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512vbmivlintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512vlbwintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512vlcdintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512vldqintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512vlintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avxintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/bmi2intrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/bmiintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/clflushoptintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/cpuid.h			comp-c-include		llvm
-./usr/include/clang-4.0/emmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/f16cintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/fma4intrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/fmaintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/fxsrintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/ia32intrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/immintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/lzcntintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/mm3dnow.h		comp-c-include		llvm
-./usr/include/clang-4.0/mm_malloc.h		comp-c-include		llvm
-./usr/include/clang-4.0/mmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/mwaitxintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/nmmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/pkuintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/pmmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/popcntintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/prfchwintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/rdseedintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/rtmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/shaintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/smmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/tbmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/tmmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/wmmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/x86intrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/xmmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/xopintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/xsavecintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/xsaveintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/xsaveoptintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/xsavesintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/xtestintrin.h		comp-c-include		llvm
+./usr/include/clang-4.0/__wmmintrin_aes.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/__wmmintrin_pclmul.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/adxintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/ammintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/avx2intrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512bwintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512cdintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512dqintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512erintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512fintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512ifmaintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512ifmavlintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512pfintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512vbmiintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512vbmivlintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512vlbwintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512vlcdintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512vldqintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512vlintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avxintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/bmi2intrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/bmiintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/clflushoptintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/cpuid.h			comp-obsolete		obsolete
+./usr/include/clang-4.0/emmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/f16cintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/fma4intrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/fmaintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/fxsrintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/ia32intrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/immintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/lzcntintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/mm3dnow.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/mm_malloc.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/mmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/mwaitxintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/nmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/pkuintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/pmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/popcntintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/prfchwintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/rdseedintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/rtmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/shaintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/smmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/tbmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/tmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/wmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/x86intrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/xmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/xopintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/xsavecintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/xsaveintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/xsaveoptintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/xsavesintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/xtestintrin.h		comp-obsolete		obsolete
+./usr/include/clang-5.0/__wmmintrin_aes.h	comp-c-include		llvm
+./usr/include/clang-5.0/__wmmintrin_pclmul.h	comp-c-include		llvm
+./usr/include/clang-5.0/adxintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/ammintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/avx2intrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/avx512bwintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512cdintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512dqintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512erintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512fintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/avx512ifmaintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512ifmavlintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512pfintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vbmiintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vbmivlintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vlbwintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vlcdintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vldqintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vlintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vpopcntdqintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avxintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/bmi2intrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/bmiintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/clflushoptintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/clzerointrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/cpuid.h			comp-c-include		llvm
+./usr/include/clang-5.0/emmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/f16cintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/fma4intrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/fmaintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/fxsrintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/ia32intrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/immintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/lzcntintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/lwpintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/mm3dnow.h		comp-c-include		llvm
+./usr/include/clang-5.0/mm_malloc.h		comp-c-include		llvm
+./usr/include/clang-5.0/mmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/mwaitxintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/nmmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/pkuintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/pmmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/popcntintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/prfchwintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/rdseedintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/rtmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/shaintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/smmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/tbmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/tmmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/wmmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/x86intrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/xmmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/xopintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/xsavecintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/xsaveintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/xsaveoptintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/xsavesintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/xtestintrin.h		comp-c-include		llvm
 ./usr/include/emmintrin.h			comp-obsolete		obsolete
 ./usr/include/g++/bits/i386			comp-c-include		compat
 ./usr/include/g++/bits/i386/c++config.h		comp-c-include		gcccmds,gcc,compat
--- a/distrib/sets/lists/comp/md.i386	Tue Aug 01 19:58:33 2017 +0000
+++ b/distrib/sets/lists/comp/md.i386	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.170 2017/08/01 16:54:19 maya Exp $
+# $NetBSD: md.i386,v 1.171 2017/08/01 20:07:43 joerg Exp $
 ./usr/include/clang-3.4/__wmmintrin_aes.h	comp-obsolete		obsolete
 ./usr/include/clang-3.4/__wmmintrin_pclmul.h	comp-obsolete		obsolete
 ./usr/include/clang-3.4/ammintrin.h		comp-obsolete		obsolete
@@ -146,62 +146,121 @@
 ./usr/include/clang-3.8/xsaveoptintrin.h	comp-obsolete		obsolete
 ./usr/include/clang-3.8/xsavesintrin.h		comp-obsolete		obsolete
 ./usr/include/clang-3.8/xtestintrin.h		comp-obsolete		obsolete
-./usr/include/clang-4.0/__wmmintrin_aes.h	comp-c-include		llvm
-./usr/include/clang-4.0/__wmmintrin_pclmul.h	comp-c-include		llvm
-./usr/include/clang-4.0/ammintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/adxintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/avx2intrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/avx512bwintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512cdintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512dqintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512erintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512fintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/avx512ifmaintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512ifmavlintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512pfintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512vbmiintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512vbmivlintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512vlbwintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512vlcdintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512vldqintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avx512vlintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/avxintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/bmi2intrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/bmiintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/clflushoptintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/cpuid.h			comp-c-include		llvm
-./usr/include/clang-4.0/emmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/f16cintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/fma4intrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/fmaintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/fxsrintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/ia32intrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/immintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/lzcntintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/mm3dnow.h		comp-c-include		llvm
-./usr/include/clang-4.0/mm_malloc.h		comp-c-include		llvm
-./usr/include/clang-4.0/mmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/mwaitxintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/nmmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/pkuintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/pmmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/popcntintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/prfchwintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/rdseedintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/rtmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/shaintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/smmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/tbmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/tmmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/wmmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/x86intrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/xmmintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/xopintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/xsavecintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/xsaveintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/xsaveoptintrin.h	comp-c-include		llvm
-./usr/include/clang-4.0/xsavesintrin.h		comp-c-include		llvm
-./usr/include/clang-4.0/xtestintrin.h		comp-c-include		llvm
+./usr/include/clang-4.0/__wmmintrin_aes.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/__wmmintrin_pclmul.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/adxintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/ammintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/avx2intrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512bwintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512cdintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512dqintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512erintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512fintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512ifmaintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512ifmavlintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512pfintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512vbmiintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512vbmivlintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512vlbwintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512vlcdintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512vldqintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avx512vlintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/avxintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/bmi2intrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/bmiintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/clflushoptintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/cpuid.h			comp-obsolete		obsolete
+./usr/include/clang-4.0/emmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/f16cintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/fma4intrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/fmaintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/fxsrintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/ia32intrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/immintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/lzcntintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/mm3dnow.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/mm_malloc.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/mmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/mwaitxintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/nmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/pkuintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/pmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/popcntintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/prfchwintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/rdseedintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/rtmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/shaintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/smmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/tbmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/tmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/wmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/x86intrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/xmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/xopintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/xsavecintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/xsaveintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/xsaveoptintrin.h	comp-obsolete		obsolete
+./usr/include/clang-4.0/xsavesintrin.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/xtestintrin.h		comp-obsolete		obsolete
+./usr/include/clang-5.0/__wmmintrin_aes.h	comp-c-include		llvm
+./usr/include/clang-5.0/__wmmintrin_pclmul.h	comp-c-include		llvm
+./usr/include/clang-5.0/adxintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/ammintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/avx2intrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/avx512bwintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512cdintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512dqintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512erintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512fintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/avx512ifmaintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512ifmavlintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512pfintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vbmiintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vbmivlintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vlbwintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vlcdintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vldqintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vlintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avx512vpopcntdqintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/avxintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/bmi2intrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/bmiintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/clflushoptintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/clzerointrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/cpuid.h			comp-c-include		llvm
+./usr/include/clang-5.0/emmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/f16cintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/fma4intrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/fmaintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/fxsrintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/ia32intrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/immintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/lwpintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/lzcntintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/mm3dnow.h		comp-c-include		llvm
+./usr/include/clang-5.0/mm_malloc.h		comp-c-include		llvm
+./usr/include/clang-5.0/mmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/mwaitxintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/nmmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/pkuintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/pmmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/popcntintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/prfchwintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/rdseedintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/rtmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/shaintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/smmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/tbmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/tmmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/wmmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/x86intrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/xmmintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/xopintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/xsavecintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/xsaveintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/xsaveoptintrin.h	comp-c-include		llvm
+./usr/include/clang-5.0/xsavesintrin.h		comp-c-include		llvm
+./usr/include/clang-5.0/xtestintrin.h		comp-c-include		llvm
 ./usr/include/emmintrin.h			comp-obsolete		obsolete
 ./usr/include/gcc-4.1/emmintrin.h		comp-obsolete		obsolete
 ./usr/include/gcc-4.1/mm_malloc.h		comp-obsolete		obsolete
--- a/distrib/sets/lists/comp/mi	Tue Aug 01 19:58:33 2017 +0000
+++ b/distrib/sets/lists/comp/mi	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2141 2017/06/20 01:17:13 kamil Exp $
+#	$NetBSD: mi,v 1.2142 2017/08/01 20:07:43 joerg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.comp				comp-sys-root
@@ -358,9 +358,10 @@
 ./usr/include/clang-3.8/stdalign.h		comp-obsolete		obsolete
 ./usr/include/clang-3.8/stdatomic.h		comp-obsolete		obsolete
 ./usr/include/clang-3.8/stdnoreturn.h		comp-obsolete		obsolete
-./usr/include/clang-4.0/stdalign.h		comp-c-include		llvm
-./usr/include/clang-4.0/stdatomic.h		comp-c-include		llvm
-./usr/include/clang-4.0/stdnoreturn.h		comp-c-include		llvm
+./usr/include/clang-4.0/stdalign.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/stdatomic.h		comp-obsolete		obsolete
+./usr/include/clang-4.0/stdnoreturn.h		comp-obsolete		obsolete
+./usr/include/clang-5.0/stdatomic.h		comp-c-include		llvm
 ./usr/include/complex.h				comp-c-include
 ./usr/include/cpio.h				comp-c-include
 ./usr/include/crypto/cryptodev.h		comp-c-include
--- a/etc/mtree/NetBSD.dist.base	Tue Aug 01 19:58:33 2017 +0000
+++ b/etc/mtree/NetBSD.dist.base	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.160 2017/05/27 21:02:55 bouyer Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.161 2017/08/01 20:07:43 joerg Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -106,7 +106,7 @@
 ./usr/include/c++
 ./usr/include/c++/experimental
 ./usr/include/c++/ext
-./usr/include/clang-4.0
+./usr/include/clang-5.0
 ./usr/include/crypto
 ./usr/include/dev
 ./usr/include/dev/apm
--- a/external/bsd/llvm/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2014/01/15 20:53:00 joerg Exp $
+#	$NetBSD: Makefile,v 1.9 2017/08/01 20:07:37 joerg Exp $
 
 .include <bsd.init.mk>
 
@@ -30,4 +30,9 @@
 	fi
 	cd ${MCLINKER_SRCDIR} && git checkout ${MCLINKER_REVISION}
 
+import-clang:
+	cd ${CLANG_SRCDIR} && cvs -d cvs.netbsd.org:/cvsroot import -m "Import clang ${CLANG_REVISION} from ${SVN_BRANCH}" src/external/bsd/llvm/dist/clang LLVM clang-${CLANG_REVISION:C,^r,,}
+import-llvm:
+	cd ${LLVM_SRCDIR} && cvs -d cvs.netbsd.org:/cvsroot import -m "Import LLVM ${CLANG_REVISION} from ${SVN_BRANCH}" src/external/bsd/llvm/dist/llvm LLVM llvm-${LLVM_REVISION:C,^r,,}
+
 .include <bsd.subdir.mk>
--- a/external/bsd/llvm/Makefile.inc	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/Makefile.inc	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.83 2017/02/09 17:58:57 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.84 2017/08/01 20:07:37 joerg Exp $
 
 .if !defined(LLVM_TOPLEVEL_MK)
 LLVM_TOPLEVEL_MK=
@@ -6,9 +6,9 @@
 .include <bsd.own.mk>
 
 SVN_ROOT=		http://llvm.org/svn/llvm-project
-SVN_BRANCH=		branches/release_40
+SVN_BRANCH=		branches/release_50
 
-COMMON_REVISION=	r294123
+COMMON_REVISION=	r309604
 CLANG_REVISION=		${COMMON_REVISION}
 LLD_REVISION=		${COMMON_REVISION}
 LLDB_REVISION=		${COMMON_REVISION}
@@ -17,9 +17,9 @@
 MCLINKER_REVISION=	deeb2a77b4165827316f88e0a7ba4ba6b743a080
 MCLINKER_ROOT=		https://code.google.com/p/mclinker/
 
-LLVM_VERSION=		4.0.0
-CLANG_VERSION=		4.0.0
-LLD_VERSION=		4.0.0
+LLVM_VERSION=		5.0.0
+CLANG_VERSION=		5.0.0
+LLD_VERSION=		5.0.0
 
 CLANG_SRCDIR:=	${.PARSEDIR}/dist/clang
 LLD_SRCDIR:=	${.PARSEDIR}/dist/lld
@@ -33,7 +33,8 @@
 		-I${LLVM_SRCDIR}/include -I${MCLINKER_SRCDIR}/include \
 		-I${LLDB_SRCDIR}/include \
 		-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS \
-		-D__STDC_FORMAT_MACROS -DCLANG_ENABLE_STATIC_ANALYZER
+		-D__STDC_FORMAT_MACROS -DCLANG_ENABLE_STATIC_ANALYZER \
+		-DLLVM_BUILD_GLOBAL_ISEL
 
 .if defined(HOSTLIB) || defined(HOSTPROG)
 LLVM_INCLUDE_CONFIG=	${LLVM_TOOLCONF_OBJDIR}/config/include
--- a/external/bsd/llvm/bin/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2017/01/11 12:02:24 joerg Exp $
+#	$NetBSD: Makefile,v 1.17 2017/08/01 20:07:37 joerg Exp $
 
 .include <bsd.own.mk>
 
@@ -25,6 +25,7 @@
 SUBDIR+= \
 	bugpoint \
 	clang-format \
+	clang-rename \
 	llc \
 	lli \
 	llvm-ar \
@@ -47,6 +48,7 @@
 	llvm-size \
 	llvm-strings \
 	llvm-symbolizer \
+	llvm-xray \
 	opt \
 	sancov \
 	sanstats
--- a/external/bsd/llvm/bin/bugpoint/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/bugpoint/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2017/01/11 12:02:24 joerg Exp $
+#	$NetBSD: Makefile,v 1.11 2017/08/01 20:07:37 joerg Exp $
 
 PROG_CXX=	bugpoint
 NOMAN=		yes
@@ -18,26 +18,67 @@
 	bugpoint.cpp
 
 LLVM_LIBS+= \
-	CodeGen \
 	ObjCARC \
+	ipo \
 	IRReader \
 	AsmParser \
 	BitReader \
 	BitWriter \
+	AArch64CodeGen \
+	AArch64TargetInfo \
+	AArch64AsmParser \
+	AArch64MCTargetDesc \
+	AArch64AsmPrinter \
+	AArch64Utils \
+	ARMCodeGen \
+	ARMTargetInfo \
+	ARMMCTargetDesc \
+	ARMAsmParser \
+	ARMAsmPrinter \
+	MipsCodeGen \
+	MipsTargetInfo \
+	MipsAsmPrinter \
+	MipsAsmParser \
+	MipsMCTargetDesc \
+	PowerPCCodeGen \
+	PowerPCTargetInfo \
+	PowerPCMCTargetDesc \
+	PowerPCAsmParser \
+	PowerPCAsmPrinter \
+	SparcCodeGen \
+	SparcTargetInfo \
+	SparcMCTargetDesc \
+	SparcAsmParser \
+	SparcAsmPrinter \
+	X86CodeGen \
+	X86MCTargetDesc \
+	X86TargetInfo \
+	X86Utils \
+	X86AsmParser \
+	X86AsmPrinter \
+	GlobalISel \
+	SelectionDAG \
+	AsmPrinter \
+	DebugInfoCodeView \
+	DebugInfoMSF \
+	Passes \
+	CodeGen \
+	Vectorize \
+	Target \
 	InstCombine \
 	Instrumentation \
-	Linker \
 	ScalarOpts \
-	ipo \
-	Object \
+	ProfileData \
+	MCDisassembler \
 	MCParser \
 	MC \
-	ProfileData \
-	Target \
-	Vectorize \
+	Analysis \
+	Object \
+	Linker \
 	TransformsUtils \
-	Analysis \
 	IR \
+	Option \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/bin/clang-rename/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -0,0 +1,47 @@
+#	$NetBSD: Makefile,v 1.1 2017/08/01 20:07:37 joerg Exp $
+
+PROG_CXX=	clang-rename
+NOMAN=		yes
+
+.include <bsd.init.mk>
+
+.PATH: ${CLANG_SRCDIR}/tools/clang-rename
+
+SRCS=	ClangRename.cpp
+
+CLANG_LIBS+= \
+	clangToolingRefactoring \
+	clangToolingCore \
+	clangTooling \
+	clangFrontend \
+	clangIndex \
+	clangSerialization \
+	clangDriver \
+	clangParse \
+	clangRewrite \
+	clangSema \
+	clangEdit \
+	clangAnalysis \
+	clangASTMatchers \
+	clangAST \
+	clangLex \
+	clangBasic
+
+LLVM_LIBS+= \
+	ProfileData \
+	BitReader \
+	IR \
+	MCParser \
+	MC \
+	Option \
+	Support \
+	Demangle
+
+.include "${.PARSEDIR}/../../link.mk"
+
+LDADD+=	-lz
+.if !defined(HOSTPROG)
+DPADD+=	${LIBZ}
+.endif
+
+.include <bsd.prog.mk>
--- a/external/bsd/llvm/bin/clang-tblgen/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/clang-tblgen/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2017/01/11 12:02:25 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/08/01 20:07:37 joerg Exp $
 
 PROG_CXX=	clang-tblgen
 NOMAN=		yes
@@ -13,6 +13,7 @@
 	ClangCommentHTMLNamedCharacterReferenceEmitter.cpp \
 	ClangCommentHTMLTagsEmitter.cpp \
 	ClangDiagnosticsEmitter.cpp \
+	ClangOptionDocEmitter.cpp \
 	ClangSACheckersEmitter.cpp \
 	NeonEmitter.cpp \
 	TableGen.cpp
--- a/external/bsd/llvm/bin/clang/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/clang/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.35 2017/01/11 12:02:25 joerg Exp $
+#	$NetBSD: Makefile,v 1.36 2017/08/01 20:07:37 joerg Exp $
 
 PROG_CXX=	clang
 NOMAN=		yes
@@ -101,6 +101,7 @@
 	TransformsUtils \
 	IR \
 	Option \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llc/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llc/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.23 2017/01/11 12:02:25 joerg Exp $
+#	$NetBSD: Makefile,v 1.24 2017/08/01 20:07:37 joerg Exp $
 
 PROG_CXX=	llc
 NOMAN=		yes
@@ -10,6 +10,7 @@
 SRCS=	llc.cpp
 
 LLVM_LIBS+= \
+	Vectorize \
 	MIRParser \
 	AsmPrinter \
 	DebugInfoMSF \
@@ -54,6 +55,7 @@
 	Object \
 	SelectionDAG \
 	CodeGen \
+	ProfileData \
 	Instrumentation \
 	ScalarOpts \
 	TransformsUtils \
@@ -62,6 +64,7 @@
 	MCParser \
 	MC \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/lli/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/lli/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2017/01/11 12:02:25 joerg Exp $
+#	$NetBSD: Makefile,v 1.16 2017/08/01 20:07:37 joerg Exp $
 
 PROG_CXX=	lli
 NOMAN=		yes
@@ -36,6 +36,7 @@
 	Target \
 	MC \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-ar/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-ar/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2017/01/11 12:02:25 joerg Exp $
+#	$NetBSD: Makefile,v 1.9 2017/08/01 20:07:38 joerg Exp $
 
 PROG_CXX=	llvm-ar
 NOMAN=		yes
@@ -44,7 +44,8 @@
 	MC \
 	BitReader \
 	IR \
-	LibDriver \
+	BinaryFormat \
+	ToolDrivers \
 	Option \
 	Support \
 	Demangle
--- a/external/bsd/llvm/bin/llvm-as/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-as/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2017/01/11 12:02:25 joerg Exp $
+#	$NetBSD: Makefile,v 1.4 2017/08/01 20:07:38 joerg Exp $
 
 PROG_CXX=	llvm-as
 NOMAN=		yes
@@ -12,7 +12,11 @@
 LLVM_LIBS+= \
 	AsmParser \
 	BitWriter \
+	Object \
+	MCParser \
+	MC \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-cov/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-cov/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2017/08/01 20:07:38 joerg Exp $
 
 PROG_CXX=	llvm-cov
 NOMAN=		yes
@@ -27,6 +27,7 @@
 	MC \
 	BitReader \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-cxxdump/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-cxxdump/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2017/08/01 20:07:38 joerg Exp $
 
 PROG_CXX=	llvm-cxxdump
 NOMAN=		yes
@@ -22,6 +22,7 @@
 	MCParser \
 	MC \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-diff/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-diff/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2017/01/11 12:02:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/08/01 20:07:38 joerg Exp $
 
 PROG_CXX=	llvm-diff
 NOMAN=		yes
@@ -17,6 +17,7 @@
 	AsmParser \
 	BitReader \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-dis/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-dis/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2017/01/11 12:02:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.5 2017/08/01 20:07:38 joerg Exp $
 
 PROG_CXX=	llvm-dis
 NOMAN=		yes
@@ -13,6 +13,7 @@
 	Analysis \
 	BitReader \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-dwarfdump/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-dwarfdump/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2017/01/11 12:02:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.5 2017/08/01 20:07:38 joerg Exp $
 
 PROG_CXX=	llvm-dwarfdump
 NOMAN=		yes
@@ -14,6 +14,7 @@
 	Object \
 	BitReader \
 	IR \
+	BinaryFormat \
 	MC \
 	MCParser \
 	Support \
--- a/external/bsd/llvm/bin/llvm-dwp/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-dwp/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2017/08/01 20:07:38 joerg Exp $
 
 PROG_CXX=	llvm-dwp
 NOMAN=		yes
@@ -47,6 +47,7 @@
 	MCParser \
 	SelectionDAG \
 	CodeGen \
+	ProfileData \
 	Target \
 	InstCombine \
 	Instrumentation \
@@ -55,6 +56,7 @@
 	TransformsUtils \
 	Analysis \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-extract/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-extract/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2017/08/01 20:07:38 joerg Exp $
 
 PROG_CXX=	llvm-extract
 NOMAN=		yes
@@ -23,6 +23,7 @@
 	ProfileData \
 	Target \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-link/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-link/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2017/08/01 20:07:38 joerg Exp $
 
 PROG_CXX=	llvm-link
 NOMAN=		yes
@@ -10,18 +10,20 @@
 SRCS=	llvm-link.cpp
 
 LLVM_LIBS+= \
-	Object \
-	MC \
 	IRReader \
 	AsmParser \
 	BitReader \
 	BitWriter \
+	Object \
+	MCParser \
+	MC \
 	ipo \
 	Linker \
 	TransformsUtils \
 	Analysis \
 	Target \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-nm/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-nm/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2017/08/01 20:07:38 joerg Exp $
 
 PROG_CXX=	llvm-nm
 NOMAN=		yes
@@ -44,6 +44,7 @@
 	MC \
 	BitReader \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-objdump/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-objdump/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2017/01/11 12:02:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.14 2017/08/01 20:07:38 joerg Exp $
 
 PROG_CXX=	llvm-objdump
 NOMAN=		yes
@@ -52,12 +52,13 @@
 	DebugInfoDWARF \
 	DebugInfoSymbolize \
 	DebugInfoPDB \
-	DebugInfoPDBRaw \
+	DebugInfoPDBNative \
 	Object \
 	BitReader \
 	MCParser \
 	MC \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-profdata/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-profdata/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2017/01/11 12:02:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.4 2017/08/01 20:07:39 joerg Exp $
 
 PROG_CXX=	llvm-profdata
 NOMAN=		yes
@@ -12,6 +12,7 @@
 LLVM_LIBS+= \
 	ProfileData \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-readobj/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-readobj/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2017/01/11 12:02:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.11 2017/08/01 20:07:39 joerg Exp $
 
 PROG_CXX=	llvm-readobj
 NOMAN=		yes
@@ -8,7 +8,6 @@
 .PATH: ${LLVM_SRCDIR}/tools/llvm-readobj
 
 SRCS=	llvm-readobj.cpp \
-	ARMAttributeParser.cpp \
 	ARMWinEHPrinter.cpp \
 	COFFDumper.cpp \
 	COFFImportDumper.cpp \
@@ -16,6 +15,7 @@
 	Error.cpp \
 	MachODumper.cpp \
 	ObjDumper.cpp \
+	WasmDumper.cpp \
 	Win64EHDumper.cpp
 
 LLVM_LIBS+= \
@@ -32,6 +32,7 @@
 	MCParser \
 	BitReader \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-size/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-size/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2017/01/11 12:02:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.4 2017/08/01 20:07:39 joerg Exp $
 
 PROG_CXX=	llvm-size
 NOMAN=		yes
@@ -15,6 +15,7 @@
 	MC \
 	BitReader \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-symbolizer/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-symbolizer/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2017/08/01 20:07:39 joerg Exp $
 
 PROG_CXX=	llvm-symbolizer
 NOMAN=		yes
@@ -13,12 +13,13 @@
 	DebugInfoSymbolize \
 	DebugInfoDWARF \
 	DebugInfoPDB \
-	DebugInfoPDBRaw \
+	DebugInfoPDBNative \
 	Object \
 	MCParser \
 	MC \
 	BitReader \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/llvm-xray/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-xray/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2017/02/09 17:58:57 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/08/01 20:07:39 joerg Exp $
 
 PROG_CXX=	llvm-xray
 NOMAN=		yes
@@ -8,13 +8,35 @@
 .PATH: ${LLVM_SRCDIR}/tools/llvm-xray
 
 SRCS=	func-id-helper.cc \
+	llvm-xray.cc \
 	xray-account.cc \
-	xray-converter.cc
+	xray-color-helper.cc \
+	xray-converter.cc \
+	xray-extract.cc \
+	xray-graph.cc \
+	xray-graph-diff.cc \
+	xray-registry.cc
 
 LLVM_LIBS+= \
+	XRay \
+	DebugInfoSymbolize \
+	DebugInfoDWARF \
+	DebugInfoPDB \
+	DebugInfoPDBNative \
+	Object \
+	BitReader \
+	MCParser \
+	IR \
+	MC \
+	BinaryFormat \
 	Support \
 	Demangle
 
+LDADD+=	-lz
+.if !defined(HOSTPROG)
+DPADD+=	${LIBZ}
+.endif
+
 .include "${.PARSEDIR}/../../link.mk"
 
 .include <bsd.prog.mk>
--- a/external/bsd/llvm/bin/opt/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/opt/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2017/01/11 12:02:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.18 2017/08/01 20:07:39 joerg Exp $
 
 PROG_CXX=	opt
 NOMAN=		yes
@@ -77,6 +77,7 @@
 	TransformsUtils \
 	Analysis \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/sancov/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/sancov/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2017/08/01 20:07:39 joerg Exp $
 
 PROG_CXX=	sancov
 NOMAN=		yes
@@ -41,12 +41,13 @@
 	DebugInfoSymbolize \
 	DebugInfoDWARF \
 	DebugInfoPDB \
-	DebugInfoPDBRaw \
+	DebugInfoPDBNative \
 	Object \
 	BitReader \
 	IR \
 	MCParser \
 	MC \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/sanstats/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/sanstats/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/08/01 20:07:39 joerg Exp $
 
 PROG_CXX=	sanstats
 NOMAN=		yes
@@ -13,12 +13,13 @@
 	DebugInfoSymbolize \
 	DebugInfoDWARF \
 	DebugInfoPDB \
-	DebugInfoPDBRaw \
+	DebugInfoPDBNative \
 	Object \
 	MCParser \
 	MC \
 	BitReader \
 	IR \
+	BinaryFormat \
 	Support \
 	Demangle
 
--- a/external/bsd/llvm/bin/tblgen/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/bin/tblgen/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21 2017/01/11 12:02:28 joerg Exp $
+#	$NetBSD: Makefile,v 1.22 2017/08/01 20:07:39 joerg Exp $
 
 PROG_CXX=	llvm-tblgen
 NOMAN=		yes
@@ -34,6 +34,7 @@
 	IntrinsicEmitter.cpp \
 	OptParserEmitter.cpp \
 	PseudoLoweringEmitter.cpp \
+	RegisterBankEmitter.cpp \
 	RegisterInfoEmitter.cpp \
 	SearchableTableEmitter.cpp \
 	SubtargetEmitter.cpp \
@@ -41,6 +42,7 @@
 	TableGen.cpp \
 	Types.cpp \
 	X86DisassemblerTables.cpp \
+	X86EVEX2VEXTablesEmitter.cpp \
 	X86ModRMFilters.cpp \
 	X86RecognizableInstr.cpp
 
--- a/external/bsd/llvm/config/clang/Config/config.h	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/config/clang/Config/config.h	Tue Aug 01 20:07:37 2017 +0000
@@ -29,7 +29,7 @@
 #define CLANG_RESOURCE_DIR ""
 
 /* Directories clang will search for headers */
-#define C_INCLUDE_DIRS "/usr/include/clang-4.0:/usr/include"
+#define C_INCLUDE_DIRS "/usr/include/clang-5.0:/usr/include"
 
 /* Default <path> to all compiler invocations for --sysroot=<path>. */
 #define DEFAULT_SYSROOT ""
--- a/external/bsd/llvm/config/llvm/Config/config.h.in	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/config/llvm/Config/config.h.in	Tue Aug 01 20:07:37 2017 +0000
@@ -7,6 +7,9 @@
 /* Exported configuration */
 #include "llvm/Config/llvm-config.h"
 
+/* Header containing the backtrace function */
+#define BACKTRACE_HEADER <execinfo.h>
+
 /* Bug report URL. */
 #define BUG_REPORT_URL "http://llvm.org/bugs/"
 
@@ -30,7 +33,7 @@
 #define CLANG_RESOURCE_DIR ""
 
 /* Directories clang will search for headers */
-#define C_INCLUDE_DIRS "/usr/include/clang-4.0:/usr/include"
+#define C_INCLUDE_DIRS "/usr/include/clang-5.0:/usr/include"
 
 /* Default <path> to all compiler invocations for --sysroot=<path>. */
 #define DEFAULT_SYSROOT ""
--- a/external/bsd/llvm/dist/llvm-configure/autoconf/configure.ac	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/dist/llvm-configure/autoconf/configure.ac	Tue Aug 01 20:07:37 2017 +0000
@@ -1959,6 +1959,7 @@
 
 AC_DEFINE([LLVM_ENABLE_ABI_BREAKING_CHECKS],[0],
           [Define to 1 to checks for ABI changes, and to 0 otherwise.])
+AC_DEFINE_UNQUOTED([BACKTRACE_HEADER], [<execinfo.h>], [Header containing the backtrace function])
 
 dnl===-----------------------------------------------------------------------===
 dnl===
--- a/external/bsd/llvm/dist/llvm-configure/configure	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/dist/llvm-configure/configure	Tue Aug 01 20:07:37 2017 +0000
@@ -10195,6 +10195,11 @@
 $as_echo "#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0" >>confdefs.h
 
 
+cat >>confdefs.h <<_ACEOF
+#define BACKTRACE_HEADER <execinfo.h>
+_ACEOF
+
+
 
 ac_config_headers="$ac_config_headers include/llvm/Config/config.h include/llvm/Config/llvm-config.h include/llvm/Config/abi-breaking.h"
 
--- a/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/config.h.in	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/config.h.in	Tue Aug 01 20:07:37 2017 +0000
@@ -6,6 +6,9 @@
 /* Exported configuration */
 #include "llvm/Config/llvm-config.h"
 
+/* Header containing the backtrace function */
+#undef BACKTRACE_HEADER
+
 /* Bug report URL. */
 #undef BUG_REPORT_URL
 
--- a/external/bsd/llvm/include/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/include/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.40 2017/01/11 12:02:28 joerg Exp $
+#	$NetBSD: Makefile,v 1.41 2017/08/01 20:07:40 joerg Exp $
 
 .include <bsd.init.mk>
 
@@ -24,10 +24,12 @@
 	avx512vlcdintrin.h \
 	avx512vldqintrin.h \
 	avx512vlintrin.h \
+	avx512vpopcntdqintrin.h \
 	avxintrin.h \
 	bmi2intrin.h \
 	bmiintrin.h \
 	clflushoptintrin.h \
+	clzerointrin.h \
 	cpuid.h \
 	emmintrin.h \
 	f16cintrin.h \
@@ -36,6 +38,7 @@
 	fxsrintrin.h \
 	ia32intrin.h \
 	immintrin.h \
+	lwpintrin.h \
 	lzcntintrin.h \
 	mm3dnow.h \
 	mmintrin.h \
@@ -72,7 +75,7 @@
 .elif ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "mips64"
 INCS=	msa.h
 .endif
-INCS+=	stdalign.h stdatomic.h stdnoreturn.h
+INCS+=	stdatomic.h
 INCSDIR=	/usr/include/clang-${CLANG_VERSION:R}
 
 .PATH:	${LLVM_SRCDIR}/include/llvm/IR \
@@ -101,7 +104,9 @@
 	clang/AST/AttrVisitor.inc|-gen-clang-attr-ast-visitor \
 	clang/Basic/AttrList.inc|-gen-clang-attr-list \
 	clang/Basic/AttrHasAttributeImpl.inc|-gen-clang-attr-has-attribute-impl \
+	clang/Basic/AttrSubMatchRulesList.inc|-gen-clang-attr-subject-match-rule-list \
 	clang/Parse/AttrParserStringSwitches.inc|-gen-clang-attr-parser-string-switches \
+	clang/Parse/AttrSubMatchRulesParserStringSwitches.inc|-gen-clang-attr-subject-match-rules-parser-string-switches \
 	clang/Sema/AttrParsedAttrImpl.inc|-gen-clang-attr-parsed-attr-impl \
 	clang/Sema/AttrParsedAttrKinds.inc|-gen-clang-attr-parsed-attr-kinds \
 	clang/Sema/AttrParsedAttrList.inc|-gen-clang-attr-parsed-attr-list \
@@ -159,8 +164,8 @@
 
 .include "${.PARSEDIR}/../tablegen.mk"
 
-DPSRCS+=	clang/Basic/Version.inc
-CLEANFILES+=	clang/Basic/Version.inc
+DPSRCS+=	clang/Basic/Version.inc llvm/Support/VCSRevision.h
+CLEANFILES+=	clang/Basic/Version.inc llvm/Support/VCSRevision.h
 
 clang/Basic/Version.inc: ${LLVM_TOPLEVEL}/Makefile.inc
 	mkdir -p ${.TARGET:H}
@@ -171,7 +176,11 @@
 	printf '#define CLANG_VERSION_PATCHLEVEL ${CLANG_VERSION:R:R}\n' >> ${.TARGET}.tmp
 	mv ${.TARGET}.tmp ${.TARGET}
 
-lld/Config/Version.inc: ${LLVM_TOPLEVEL}/Makefile.inc
+llvm/Support/VCSRevision.h: ${LLVM_TOPLEVEL}/Makefile.inc
+	mkdir -p ${.TARGET:H}
+	printf '#define LLVM_DEFAULT_TARGET_TRIPLE "${MACHINE_GNU_PLATFORM}"\n' >> ${.TARGET}.tmp
+	printf '#define LLVM_REVISION "svn-r${LLVM_REVISION}"\n' >> ${.TARGET}.tmp
+	mv ${.TARGET}.tmp ${.TARGET}
 
 .if ${MKLLD} != "no"
 DPSRCS+=	lld/Config/Version.inc
--- a/external/bsd/llvm/lib/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.44 2017/01/11 12:02:28 joerg Exp $
+# $NetBSD: Makefile,v 1.45 2017/08/01 20:07:40 joerg Exp $
 
 .include <bsd.own.mk>
 
@@ -6,6 +6,7 @@
 	libLLVMAnalysis \
 	libLLVMAsmParser \
 	libLLVMAsmPrinter \
+	libLLVMBinaryFormat \
 	libLLVMBitReader \
 	libLLVMBitWriter \
 	libLLVMCodeGen \
@@ -103,7 +104,7 @@
 SUBDIR+= \
 	libLLVMDebugInfoDWARF \
 	libLLVMDebugInfoPDB \
-	libLLVMDebugInfoPDBRaw \
+	libLLVMDebugInfoPDBNative \
 	libLLVMDebugInfoSymbolize
 .endif
 
@@ -111,9 +112,10 @@
 SUBDIR+= \
 	libLLVMHello \
 	libLLVMInterpreter \
-	libLLVMLibDriver \
 	libLLVMLineEditor \
-	libLLVMObjectYAML
+	libLLVMObjectYAML \
+	libLLVMToolDrivers \
+	libLLVMXRay
 .endif
 
 SUBDIR+= \
@@ -144,7 +146,8 @@
 	libclangFormat \
 	libclangIndex \
 	libclangTooling \
-	libclangToolingCore
+	libclangToolingCore \
+	libclangToolingRefactoring
 .endif
 
 .if ${MKLLD} != "no"
--- a/external/bsd/llvm/lib/libLLVMAArch64CodeGen/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMAArch64CodeGen/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2017/01/11 12:02:28 joerg Exp $
+#	$NetBSD: Makefile,v 1.8 2017/08/01 20:07:40 joerg Exp $
 
 LIB=	LLVMAArch64CodeGen
 
@@ -8,33 +8,33 @@
 
 CPPFLAGS+=	-I${LLVM_SRCDIR}/lib/Target/AArch64
 
-# Used only with GlobalISel:
-#	AArch64CallLowering.cpp
-#	AArch64InstructionSelector.cpp
-#	AArch64LegalizerInfo.cpp
-#	AArch64RegisterBankInfo.cpp
-
 SRCS+=	AArch64A53Fix835769.cpp \
 	AArch64A57FPLoadBalancing.cpp \
-	AArch64AddressTypePromotion.cpp \
 	AArch64AdvSIMDScalarPass.cpp \
 	AArch64AsmPrinter.cpp \
+	AArch64CallLowering.cpp \
 	AArch64CleanupLocalDynamicTLSPass.cpp \
 	AArch64CollectLOH.cpp \
+	AArch64CondBrTuning.cpp \
 	AArch64ConditionOptimizer.cpp \
 	AArch64ConditionalCompares.cpp \
 	AArch64DeadRegisterDefinitionsPass.cpp \
 	AArch64ExpandPseudoInsts.cpp \
+	AArch64FalkorHWPFFix.cpp \
 	AArch64FastISel.cpp \
 	AArch64FrameLowering.cpp \
 	AArch64InstrInfo.cpp \
+	AArch64InstructionSelector.cpp \
 	AArch64ISelDAGToDAG.cpp \
 	AArch64ISelLowering.cpp \
+	AArch64LegalizerInfo.cpp \
 	AArch64LoadStoreOptimizer.cpp \
 	AArch64MCInstLower.cpp \
+	AArch64MacroFusion.cpp \
 	AArch64PBQPRegAlloc.cpp \
 	AArch64PromoteConstant.cpp \
 	AArch64RedundantCopyElimination.cpp \
+	AArch64RegisterBankInfo.cpp \
 	AArch64RegisterInfo.cpp \
 	AArch64SelectionDAGInfo.cpp \
 	AArch64StorePairSuppress.cpp \
@@ -54,9 +54,11 @@
 	AArch64GenDAGISel.inc|-gen-dag-isel \
 	AArch64GenDisassemblerTables.inc|-gen-disassembler \
 	AArch64GenFastISel.inc|-gen-fast-isel \
+	AArch64GenGlobalISel.inc|-gen-global-isel \
 	AArch64GenInstrInfo.inc|-gen-instr-info \
 	AArch64GenMCCodeEmitter.inc|-gen-emitter \
 	AArch64GenMCPseudoLowering.inc|-gen-pseudo-lowering \
+	AArch64GenRegisterBank.inc|-gen-register-bank \
 	AArch64GenRegisterInfo.inc|-gen-register-info \
 	AArch64GenSubtargetInfo.inc|-gen-subtarget \
 	AArch64GenSystemOperands.inc|-gen-searchable-tables
--- a/external/bsd/llvm/lib/libLLVMAArch64MCTargetDesc/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMAArch64MCTargetDesc/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2014/08/10 17:34:21 joerg Exp $
+#	$NetBSD: Makefile,v 1.4 2017/08/01 20:07:40 joerg Exp $
 
 LIB=	LLVMAArch64MCTargetDesc
 
@@ -17,7 +17,9 @@
 	AArch64MCExpr.cpp \
 	AArch64MCTargetDesc.cpp \
 	AArch64MachObjectWriter.cpp \
-	AArch64TargetStreamer.cpp
+	AArch64TargetStreamer.cpp \
+	AArch64WinCOFFObjectWriter.cpp \
+	AArch64WinCOFFStreamer.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMARMCodeGen/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMARMCodeGen/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2017/01/11 12:02:28 joerg Exp $
+#	$NetBSD: Makefile,v 1.17 2017/08/01 20:07:40 joerg Exp $
 
 LIB=	LLVMARMCodeGen
 
@@ -6,15 +6,10 @@
 
 .PATH: ${LLVM_SRCDIR}/lib/Target/ARM
 
-# Used only with GlobalISel:
-#	ARMCallLowering.cpp
-#	ARMInstructionSelector.cpp
-#	ARMLegalizerInfo.cpp
-#	ARMRegisterBankInfo.cpp
-
 SRCS+=	ARMAsmPrinter.cpp \
 	ARMBaseInstrInfo.cpp \
 	ARMBaseRegisterInfo.cpp \
+	ARMCallLowering.cpp \
 	ARMComputeBlockSize.cpp \
 	ARMConstantIslandPass.cpp \
 	ARMConstantPoolValue.cpp \
@@ -25,10 +20,14 @@
 	ARMISelDAGToDAG.cpp \
 	ARMISelLowering.cpp \
 	ARMInstrInfo.cpp \
+	ARMInstructionSelector.cpp \
+	ARMLegalizerInfo.cpp \
 	ARMLoadStoreOptimizer.cpp \
 	ARMMCInstLower.cpp \
 	ARMMachineFunctionInfo.cpp \
+	ARMMacroFusion.cpp \
 	ARMOptimizeBarriersPass.cpp \
+	ARMRegisterBankInfo.cpp \
 	ARMRegisterInfo.cpp \
 	ARMSelectionDAGInfo.cpp \
 	ARMSubtarget.cpp \
@@ -47,18 +46,20 @@
 TABLEGEN_SRC=		ARM.td
 TABLEGEN_INCLUDES=	-I${LLVM_SRCDIR}/lib/Target/ARM
 TABLEGEN_OUTPUT= \
-	ARMGenRegisterInfo.inc|-gen-register-info \
+	ARMGenAsmMatcher.inc|-gen-asm-matcher \
+	ARMGenAsmWriter.inc|-gen-asm-writer \
+	ARMGenCallingConv.inc|-gen-callingconv \
+	ARMGenCodeEmitter.inc|-gen-emitter \
+	ARMGenDAGISel.inc|-gen-dag-isel \
+	ARMGenDisassemblerTables.inc|-gen-disassembler \
+	ARMGenFastISel.inc|-gen-fast-isel \
+	ARMGenGlobalISel.inc|-gen-global-isel \
 	ARMGenInstrInfo.inc|-gen-instr-info \
-	ARMGenCodeEmitter.inc|-gen-emitter \
 	ARMGenMCCodeEmitter.inc|-gen-emitter \
 	ARMGenMCPseudoLowering.inc|-gen-pseudo-lowering \
-	ARMGenAsmWriter.inc|-gen-asm-writer \
-	ARMGenAsmMatcher.inc|-gen-asm-matcher \
-	ARMGenDAGISel.inc|-gen-dag-isel \
-	ARMGenFastISel.inc|-gen-fast-isel \
-	ARMGenCallingConv.inc|-gen-callingconv \
-	ARMGenSubtargetInfo.inc|-gen-subtarget \
-	ARMGenDisassemblerTables.inc|-gen-disassembler
+	ARMGenRegisterBank.inc|-gen-register-bank \
+	ARMGenRegisterInfo.inc|-gen-register-info \
+	ARMGenSubtargetInfo.inc|-gen-subtarget
 
 .include "${.PARSEDIR}/../../tablegen.mk"
 
--- a/external/bsd/llvm/lib/libLLVMAnalysis/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMAnalysis/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.23 2017/02/09 17:58:57 joerg Exp $
+#	$NetBSD: Makefile,v 1.24 2017/08/01 20:07:40 joerg Exp $
 
 LIB=	LLVMAnalysis
 
@@ -60,6 +60,8 @@
 	MemoryBuiltins.cpp \
 	MemoryDependenceAnalysis.cpp \
 	MemoryLocation.cpp \
+	MemorySSAUpdater.cpp \
+	MemorySSA.cpp \
 	ModuleDebugInfoPrinter.cpp \
 	ModuleSummaryAnalysis.cpp \
 	ObjCARCAliasAnalysis.cpp \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/lib/libLLVMBinaryFormat/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -0,0 +1,16 @@
+#	$NetBSD: Makefile,v 1.1 2017/08/01 20:07:40 joerg Exp $
+
+LIB=	LLVMBinaryFormat
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/lib/BinaryFormat
+
+SRCS+=	Dwarf.cpp \
+	Magic.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
--- a/external/bsd/llvm/lib/libLLVMCodeGen/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMCodeGen/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.32 2017/01/11 12:02:29 joerg Exp $
+#	$NetBSD: Makefile,v 1.33 2017/08/01 20:07:40 joerg Exp $
 
 LIB=	LLVMCodeGen
 
@@ -11,6 +11,7 @@
 	Analysis.cpp \
 	AtomicExpandPass.cpp \
 	BasicTargetTransformInfo.cpp \
+	BranchCoalescing.cpp \
 	BranchFolding.cpp \
 	BranchRelaxation.cpp \
 	BuiltinGCs.cpp \
@@ -29,6 +30,8 @@
 	ExecutionDepsFix.cpp \
 	ExpandISelPseudos.cpp \
 	ExpandPostRAPseudos.cpp \
+	ExpandReductions.cpp \
+	FEntryInserter.cpp \
 	FaultMaps.cpp \
 	FuncletLayout.cpp \
 	GCMetadata.cpp \
@@ -44,6 +47,7 @@
 	IntrinsicLowering.cpp \
 	LLVMTargetMachine.cpp \
 	LatencyPriorityQueue.cpp \
+	LazyMachineBlockFrequencyInfo.cpp \
 	LexicalScopes.cpp \
 	LiveDebugValues.cpp \
 	LiveDebugVariables.cpp \
@@ -53,7 +57,9 @@
 	LivePhysRegs.cpp \
 	LiveRangeCalc.cpp \
 	LiveRangeEdit.cpp \
+	LiveRangeShrink.cpp \
 	LiveRegMatrix.cpp \
+	LiveRegUnits.cpp \
 	LiveStackAnalysis.cpp \
 	LiveVariables.cpp \
 	LocalStackSlotAllocation.cpp \
@@ -70,6 +76,7 @@
 	MachineCombiner.cpp \
 	MachineDominanceFrontier.cpp \
 	MachineDominators.cpp \
+	MachineFrameInfo.cpp \
 	MachineFunction.cpp \
 	MachineFunctionPass.cpp \
 	MachineFunctionPrinterPass.cpp \
@@ -79,6 +86,8 @@
 	MachineLoopInfo.cpp \
 	MachineModuleInfo.cpp \
 	MachineModuleInfoImpls.cpp \
+	MachineOutliner.cpp \
+	MachineOptimizationRemarkEmitter.cpp \
 	MachinePassRegistry.cpp \
 	MachinePipeliner.cpp \
 	MachinePostDominators.cpp \
@@ -89,6 +98,7 @@
 	MachineSink.cpp \
 	MachineTraceMetrics.cpp \
 	MachineVerifier.cpp \
+	MacroFusion.cpp \
 	OptimizePHIs.cpp \
 	PHIElimination.cpp \
 	PHIEliminationUtils.cpp \
@@ -119,6 +129,7 @@
 	SafeStack.cpp \
 	SafeStackColoring.cpp \
 	SafeStackLayout.cpp \
+	ScalarizeMaskedMemIntrin.cpp \
 	ScheduleDAG.cpp \
 	ScheduleDAGInstrs.cpp \
 	ScheduleDAGPrinter.cpp \
--- a/external/bsd/llvm/lib/libLLVMDebugInfoCodeView/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMDebugInfoCodeView/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2017/02/09 17:58:57 joerg Exp $
+#	$NetBSD: Makefile,v 1.4 2017/08/01 20:07:40 joerg Exp $
 
 LIB=	LLVMDebugInfoCodeView
 
@@ -7,24 +7,37 @@
 .PATH: ${LLVM_SRCDIR}/lib/DebugInfo/CodeView
 
 SRCS+=	CVSymbolVisitor.cpp \
-	CVTypeDumper.cpp \
 	CVTypeVisitor.cpp \
 	CodeViewError.cpp \
 	CodeViewRecordIO.cpp \
+	DebugFrameDataSubsection.cpp \
+	DebugChecksumsSubsection.cpp \
+	DebugCrossExSubsection.cpp \
+	DebugSymbolsSubsection.cpp \
+	DebugCrossImpSubsection.cpp \
+	DebugInlineeLinesSubsection.cpp \
+	DebugSubsectionRecord.cpp \
+	DebugSubsection.cpp \
+	DebugSubsectionVisitor.cpp \
+	DebugLinesSubsection.cpp \
+	DebugStringTableSubsection.cpp \
 	EnumTables.cpp \
+	Formatters.cpp \
 	Line.cpp \
-	ModuleSubstream.cpp \
-	ModuleSubstreamVisitor.cpp \
 	RecordSerialization.cpp \
+	StringsAndChecksums.cpp \
 	SymbolDumper.cpp \
 	SymbolRecordMapping.cpp \
-	TypeDatabase.cpp \
-	TypeDatabaseVisitor.cpp \
+	SymbolSerializer.cpp \
 	TypeDumpVisitor.cpp \
-	TypeRecord.cpp \
+	TypeIndex.cpp \
+	TypeIndexDiscovery.cpp \
+	TypeName.cpp \
+	LazyRandomTypeCollection.cpp \
 	TypeRecordMapping.cpp \
 	TypeSerializer.cpp \
-	TypeStreamMerger.cpp
+	TypeStreamMerger.cpp \
+	TypeTableCollection.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMDebugInfoDWARF/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMDebugInfoDWARF/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:29 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2017/08/01 20:07:40 joerg Exp $
 
 LIB=	LLVMDebugInfoDWARF
 
@@ -10,6 +10,7 @@
 	DWARFAcceleratorTable.cpp \
 	DWARFCompileUnit.cpp \
 	DWARFContext.cpp \
+	DWARFDataExtractor.cpp \
 	DWARFDebugAbbrev.cpp \
 	DWARFDebugArangeSet.cpp \
 	DWARFDebugAranges.cpp \
@@ -26,6 +27,7 @@
 	DWARFTypeUnit.cpp \
 	DWARFUnit.cpp \
 	DWARFUnitIndex.cpp \
+	DWARFVerifier.cpp \
 	SyntaxHighlighting.cpp
 
 .if defined(HOSTLIB)
--- a/external/bsd/llvm/lib/libLLVMDebugInfoMSF/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMDebugInfoMSF/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:29 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/08/01 20:07:40 joerg Exp $
 
 LIB=	LLVMDebugInfoMSF
 
@@ -9,9 +9,7 @@
 SRCS+=	MappedBlockStream.cpp \
 	MSFBuilder.cpp \
 	MSFCommon.cpp \
-	MSFError.cpp \
-	StreamReader.cpp \
-	StreamWriter.cpp
+	MSFError.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMDebugInfoPDB/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMDebugInfoPDB/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:29 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2017/08/01 20:07:41 joerg Exp $
 
 LIB=	LLVMDebugInfoPDB
 
@@ -44,7 +44,8 @@
 	PDBSymbolTypeVTableShape.cpp \
 	PDBSymbolUnknown.cpp \
 	PDBSymbolUsingNamespace.cpp \
-	PDBSymDumper.cpp
+	PDBSymDumper.cpp \
+	UDTLayout.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/lib/libLLVMDebugInfoPDBNative/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -0,0 +1,45 @@
+#	$NetBSD: Makefile,v 1.1 2017/08/01 20:07:41 joerg Exp $
+
+LIB=	LLVMDebugInfoPDBNative
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/lib/DebugInfo/PDB/Native
+
+SRCS+=	DbiModuleDescriptor.cpp \
+	DbiModuleDescriptorBuilder.cpp \
+	DbiModuleList.cpp \
+	DbiStreamBuilder.cpp \
+	DbiStream.cpp \
+	EnumTables.cpp \
+	GlobalsStream.cpp \
+	GSI.cpp \
+	Hash.cpp \
+	HashTable.cpp \
+	InfoStreamBuilder.cpp \
+	InfoStream.cpp \
+	ModuleDebugStream.cpp \
+	NamedStreamMap.cpp \
+	NativeBuiltinSymbol.cpp \
+	NativeCompilandSymbol.cpp \
+	NativeEnumModules.cpp \
+	NativeExeSymbol.cpp \
+	NativeRawSymbol.cpp \
+	NativeSession.cpp \
+	PDBFileBuilder.cpp \
+	PDBFile.cpp \
+	PDBStringTable.cpp \
+	PDBStringTableBuilder.cpp \
+	PublicsStream.cpp \
+	PublicsStreamBuilder.cpp \
+	RawError.cpp \
+	SymbolStream.cpp \
+	TpiHashing.cpp \
+	TpiStreamBuilder.cpp \
+	TpiStream.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
--- a/external/bsd/llvm/lib/libLLVMDebugInfoPDBRaw/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMDebugInfoPDBRaw/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,36 +0,0 @@
-#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:29 joerg Exp $
-
-LIB=	LLVMDebugInfoPDBRaw
-
-.include <bsd.init.mk>
-
-.PATH: ${LLVM_SRCDIR}/lib/DebugInfo/PDB/Raw
-
-SRCS+=	DbiStreamBuilder.cpp \
-	DbiStream.cpp \
-	EnumTables.cpp \
-	GSI.cpp \
-	GlobalsStream.cpp \
-	Hash.cpp \
-	InfoStreamBuilder.cpp \
-	InfoStream.cpp \
-	ModInfo.cpp \
-	ModStream.cpp \
-	NameHashTable.cpp \
-	NameMapBuilder.cpp \
-	NameMap.cpp \
-	PDBFileBuilder.cpp \
-	PDBFile.cpp \
-	PublicsStream.cpp \
-	RawError.cpp \
-	RawSession.cpp \
-	SymbolStream.cpp \
-	TpiHashing.cpp \
-	TpiStreamBuilder.cpp \
-	TpiStream.cpp
-
-.if defined(HOSTLIB)
-.include <bsd.hostlib.mk>
-.else
-.include <bsd.lib.mk>
-.endif
--- a/external/bsd/llvm/lib/libLLVMGlobalISel/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMGlobalISel/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:29 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/08/01 20:07:41 joerg Exp $
 
 LIB=	LLVMGlobalISel
 
@@ -15,6 +15,7 @@
 	Legalizer.cpp \
 	LegalizerHelper.cpp \
 	LegalizerInfo.cpp \
+	Localizer.cpp \
 	RegBankSelect.cpp \
 	RegisterBank.cpp \
 	RegisterBankInfo.cpp \
--- a/external/bsd/llvm/lib/libLLVMIR/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMIR/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2017/01/11 12:02:29 joerg Exp $
+#	$NetBSD: Makefile,v 1.12 2017/08/01 20:07:41 joerg Exp $
 
 LIB=	LLVMIR
 
@@ -51,6 +51,7 @@
 	PassManager.cpp \
 	PassRegistry.cpp \
 	ProfileSummary.cpp \
+	SafepointIRVerifier.cpp \
 	Statepoint.cpp \
 	Type.cpp \
 	TypeFinder.cpp \
--- a/external/bsd/llvm/lib/libLLVMInstrumentation/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMInstrumentation/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2017/01/11 12:02:29 joerg Exp $
+#	$NetBSD: Makefile,v 1.16 2017/08/01 20:07:41 joerg Exp $
 
 LIB=	LLVMInstrumentation
 
@@ -16,6 +16,7 @@
 	Instrumentation.cpp \
 	MemorySanitizer.cpp \
 	PGOInstrumentation.cpp \
+	PGOMemOPSizeOpt.cpp \
 	SanitizerCoverage.cpp \
 	ThreadSanitizer.cpp
 
--- a/external/bsd/llvm/lib/libLLVMMC/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMMC/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2017/01/11 12:02:30 joerg Exp $
+#	$NetBSD: Makefile,v 1.20 2017/08/01 20:07:41 joerg Exp $
 
 LIB=	LLVMMC
 
@@ -13,6 +13,7 @@
 	MCAsmInfoCOFF.cpp \
 	MCAsmInfoDarwin.cpp \
 	MCAsmInfoELF.cpp \
+	MCAsmInfoWasm.cpp \
 	MCAsmStreamer.cpp \
 	MCAssembler.cpp \
 	MCCodeEmitter.cpp \
@@ -41,19 +42,23 @@
 	MCSectionCOFF.cpp \
 	MCSectionELF.cpp \
 	MCSectionMachO.cpp \
+	MCSectionWasm.cpp \
 	MCStreamer.cpp \
 	MCSubtargetInfo.cpp \
 	MCSymbol.cpp \
 	MCSymbolELF.cpp \
 	MCTargetOptions.cpp \
 	MCValue.cpp \
+	MCWasmObjectTargetWriter.cpp \
+	MCWasmStreamer.cpp \
 	MCWin64EH.cpp \
+	MCWinCOFFStreamer.cpp \
 	MCWinEH.cpp \
 	MachObjectWriter.cpp \
-	WinCOFFStreamer.cpp \
-	WinCOFFObjectWriter.cpp \
 	StringTableBuilder.cpp \
-	SubtargetFeature.cpp
+	SubtargetFeature.cpp \
+	WasmObjectWriter.cpp \
+	WinCOFFObjectWriter.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMMipsCodeGen/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMMipsCodeGen/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.27 2017/01/11 12:02:30 joerg Exp $
+#	$NetBSD: Makefile,v 1.28 2017/08/01 20:07:41 joerg Exp $
 
 LIB=	LLVMMipsCodeGen
 
@@ -6,7 +6,8 @@
 
 .PATH: ${LLVM_SRCDIR}/lib/Target/Mips
 
-SRCS+=	Mips16ISelDAGToDAG.cpp \
+SRCS+=	MicroMipsSizeReduction.cpp \
+	Mips16ISelDAGToDAG.cpp \
 	Mips16ISelLowering.cpp \
 	Mips16InstrInfo.cpp \
 	Mips16FrameLowering.cpp \
--- a/external/bsd/llvm/lib/libLLVMObject/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMObject/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2017/02/09 17:58:57 joerg Exp $
+#	$NetBSD: Makefile,v 1.15 2017/08/01 20:07:41 joerg Exp $
 
 LIB=	LLVMObject
 
@@ -9,15 +9,17 @@
 SRCS+=	Archive.cpp \
 	ArchiveWriter.cpp \
 	Binary.cpp \
+	COFFImportFile.cpp \
+	COFFModuleDefinition.cpp \
 	COFFObjectFile.cpp \
 	Decompressor.cpp \
 	ELF.cpp \
 	ELFObjectFile.cpp \
 	Error.cpp \
 	IRObjectFile.cpp \
+	IRSymtab.cpp \
 	MachOObjectFile.cpp \
 	MachOUniversal.cpp \
-	ModuleSummaryIndexObjectFile.cpp \
 	ModuleSymbolTable.cpp \
 	Object.cpp \
 	ObjectFile.cpp \
@@ -25,6 +27,7 @@
 	SymbolSize.cpp \
 	SymbolicFile.cpp \
 	WasmObjectFile.cpp \
+	WindowsResource.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMObjectYAML/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMObjectYAML/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:30 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/08/01 20:07:41 joerg Exp $
 
 LIB=	LLVMObjectYAML
 
@@ -7,10 +7,16 @@
 .PATH: ${LLVM_SRCDIR}/lib/ObjectYAML
 
 SRCS+=	COFFYAML.cpp \
+	CodeViewYAMLDebugSections.cpp \
+	CodeViewYAMLSymbols.cpp \
+	CodeViewYAMLTypes.cpp \
+	DWARFEmitter.cpp \
+	DWARFVisitor.cpp \
 	DWARFYAML.cpp \
 	ELFYAML.cpp \
 	MachOYAML.cpp \
 	ObjectYAML.cpp \
+	WasmYAML.cpp \
 	YAML.cpp
 
 .if defined(HOSTLIB)
--- a/external/bsd/llvm/lib/libLLVMOrc/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMOrc/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:30 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2017/08/01 20:07:41 joerg Exp $
 
 LIB=	LLVMOrc
 
@@ -12,6 +12,7 @@
 	OrcABISupport.cpp \
 	OrcCBindings.cpp \
 	OrcError.cpp \
-	OrcMCJITReplacement.cpp
+	OrcMCJITReplacement.cpp \
+	RPCUtils.cpp
 
 .include <bsd.lib.mk>
--- a/external/bsd/llvm/lib/libLLVMPowerPCCodeGen/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMPowerPCCodeGen/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2017/01/11 12:02:30 joerg Exp $
+#	$NetBSD: Makefile,v 1.13 2017/08/01 20:07:41 joerg Exp $
 
 LIB=	LLVMPowerPCCodeGen
 
@@ -12,6 +12,7 @@
 	PPCCCState.cpp \
 	PPCCTRLoops.cpp \
 	PPCEarlyReturn.cpp \
+	PPCExpandISEL.cpp \
 	PPCHazardRecognizers.cpp \
 	PPCInstrInfo.cpp \
 	PPCISelDAGToDAG.cpp \
--- a/external/bsd/llvm/lib/libLLVMScalarOpts/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMScalarOpts/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.22 2017/02/09 17:58:57 joerg Exp $
+#	$NetBSD: Makefile,v 1.23 2017/08/01 20:07:42 joerg Exp $
 
 LIB=	LLVMScalarOpts
 
@@ -19,13 +19,14 @@
 	Float2Int.cpp \
 	GVN.cpp \
 	GVNHoist.cpp \
+	GVNSink.cpp \
 	GuardWidening.cpp \
 	IVUsersPrinter.cpp \
 	IndVarSimplify.cpp \
 	InductiveRangeCheckElimination.cpp \
+	InferAddressSpaces.cpp \
 	JumpThreading.cpp \
 	LICM.cpp \
-	LoadCombine.cpp \
 	LoopAccessAnalysisPrinter.cpp \
 	LoopDataPrefetch.cpp \
 	LoopDistribute.cpp \
@@ -35,6 +36,7 @@
 	LoopInterchange.cpp \
 	LoopLoadElimination.cpp \
 	LoopPassManager.cpp \
+	LoopPredication.cpp \
 	LoopRerollPass.cpp \
 	LoopRotation.cpp \
 	LoopSimplifyCFG.cpp \
@@ -60,6 +62,7 @@
 	Scalar.cpp \
 	Scalarizer.cpp \
 	SeparateConstOffsetFromGEP.cpp \
+	SimpleLoopUnswitch.cpp \
 	SimplifyCFGPass.cpp \
 	Sink.cpp \
 	SpeculativeExecution.cpp \
--- a/external/bsd/llvm/lib/libLLVMSelectionDAG/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMSelectionDAG/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2017/08/01 20:07:42 joerg Exp $
 
 LIB=	LLVMSelectionDAG
 
@@ -23,6 +23,7 @@
 	ScheduleDAGSDNodes.cpp \
 	ScheduleDAGVLIW.cpp \
 	SelectionDAG.cpp \
+	SelectionDAGAddressAnalysis.cpp \
 	SelectionDAGBuilder.cpp \
 	SelectionDAGDumper.cpp \
 	SelectionDAGISel.cpp \
--- a/external/bsd/llvm/lib/libLLVMSupport/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMSupport/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.33 2017/01/11 12:02:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.34 2017/08/01 20:07:42 joerg Exp $
 
 LIB=	LLVMSupport
 
@@ -6,12 +6,18 @@
 
 .PATH: ${LLVM_SRCDIR}/lib/Support
 
-SRCS+=	APFloat.cpp \
+SRCS+=	AMDGPUCodeObjectMetadata.cpp \
+	APFloat.cpp \
 	APInt.cpp \
 	APSInt.cpp \
+	ARMAttributeParser.cpp \
 	ARMBuildAttrs.cpp \
 	ARMWinEH.cpp \
 	Allocator.cpp \
+	BinaryStreamError.cpp \
+	BinaryStreamReader.cpp \
+	BinaryStreamRef.cpp \
+	BinaryStreamWriter.cpp \
 	BlockFrequency.cpp \
 	BranchProbability.cpp \
 	COM.cpp \
@@ -23,10 +29,10 @@
 	ConvertUTFWrapper.cpp \
 	CrashRecoveryContext.cpp \
 	DataExtractor.cpp \
+	DebugCounter.cpp \
 	Debug.cpp \
 	DeltaAlgorithm.cpp \
 	DAGDeltaAlgorithm.cpp \
-	Dwarf.cpp \
 	Error.cpp \
 	ErrorHandling.cpp \
 	FileOutputBuffer.cpp \
@@ -43,12 +49,14 @@
 	LineIterator.cpp \
 	Locale.cpp \
 	LockFileManager.cpp \
+	LowLevelType.cpp \
 	MD5.cpp \
 	ManagedStatic.cpp \
 	MathExtras.cpp \
 	MemoryBuffer.cpp \
 	NativeFormatting.cpp \
 	Options.cpp \
+	Parallel.cpp \
 	PluginLoader.cpp \
 	PrettyStackTrace.cpp \
 	Regex.cpp \
@@ -100,7 +108,6 @@
 	RWMutex.cpp \
 	RandomNumberGenerator.cpp \
 	ScaledNumber.cpp \
-	SearchForAddressOfSpecialSymbol.cpp \
 	Signals.cpp \
 	ThreadLocal.cpp \
 	ThreadPool.cpp \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/lib/libLLVMToolDrivers/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -0,0 +1,21 @@
+#	$NetBSD: Makefile,v 1.1 2017/08/01 20:07:42 joerg Exp $
+
+LIB=	LLVMToolDrivers
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/lib/ToolDrivers/llvm-lib
+
+SRCS+=	LibDriver.cpp
+
+TABLEGEN_SRC=		Options.td
+TABLEGEN_OUTPUT= \
+	Options.inc|-gen-opt-parser-defs
+
+.include "${.PARSEDIR}/../../tablegen.mk"
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
--- a/external/bsd/llvm/lib/libLLVMTransformsUtils/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMTransformsUtils/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2017/01/11 12:02:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.20 2017/08/01 20:07:42 joerg Exp $
 
 LIB=	LLVMTransformsUtils
 
@@ -38,12 +38,14 @@
 	LoopUtils.cpp \
 	LoopVersioning.cpp \
 	LowerInvoke.cpp \
+	LowerMemIntrinsics.cpp \
 	LowerSwitch.cpp \
 	Mem2Reg.cpp \
-	MemorySSA.cpp \
 	MetaRenamer.cpp \
 	ModuleUtils.cpp \
 	NameAnonGlobals.cpp \
+	OrderedInstructions.cpp \
+	PredicateInfo.cpp \
 	PromoteMemoryToRegister.cpp \
 	SSAUpdater.cpp \
 	SanitizerStats.cpp \
@@ -57,6 +59,7 @@
 	SymbolRewriter.cpp \
 	UnifyFunctionExitNodes.cpp \
 	Utils.cpp \
+	VNCoercion.cpp \
 	ValueMapper.cpp
 
 .if defined(HOSTLIB)
--- a/external/bsd/llvm/lib/libLLVMVectorize/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMVectorize/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2017/08/01 20:07:42 joerg Exp $
 
 LIB=	LLVMVectorize
 
@@ -6,8 +6,7 @@
 
 .PATH: ${LLVM_SRCDIR}/lib/Transforms/Vectorize
 
-SRCS+=	BBVectorize.cpp \
-	LoadStoreVectorizer.cpp \
+SRCS+=	LoadStoreVectorizer.cpp \
 	LoopVectorize.cpp \
 	SLPVectorizer.cpp \
 	Vectorize.cpp
--- a/external/bsd/llvm/lib/libLLVMX86CodeGen/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMX86CodeGen/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2017/01/11 12:02:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.16 2017/08/01 20:07:42 joerg Exp $
 
 LIB=	LLVMX86CodeGen
 
@@ -6,12 +6,11 @@
 
 .PATH: ${LLVM_SRCDIR}/lib/Target/X86
 
-# Used only with GlobalISel:
-#	X86CallLowering.cpp
-
 SRCS+=	X86AsmPrinter.cpp \
 	X86CallFrameOptimization.cpp \
+	X86CallLowering.cpp \
 	X86CallingConv.cpp \
+	X86CmovConversion.cpp \
 	X86EvexToVex.cpp\
 	X86ExpandPseudo.cpp \
 	X86FastISel.cpp \
@@ -24,11 +23,15 @@
 	X86ISelLowering.cpp \
 	X86InstrFMA3Info.cpp \
 	X86InstrInfo.cpp \
+	X86InstructionSelector.cpp \
 	X86InterleavedAccess.cpp \
+	X86LegalizerInfo.cpp \
 	X86MachineFunctionInfo.cpp \
+	X86MacroFusion.cpp \
 	X86MCInstLower.cpp \
 	X86OptimizeLEAs.cpp \
 	X86PadShortFunction.cpp \
+	X86RegisterBankInfo.cpp \
 	X86RegisterInfo.cpp \
 	X86SelectionDAGInfo.cpp \
 	X86ShuffleDecodeConstantPool.cpp \
@@ -49,8 +52,11 @@
 	X86GenCallingConv.inc|-gen-callingconv \
 	X86GenDAGISel.inc|-gen-dag-isel \
 	X86GenDisassemblerTables.inc|-gen-disassembler \
+	X86GenEVEX2VEXTables.inc|-gen-x86-EVEX2VEX-tables \
 	X86GenFastISel.inc|-gen-fast-isel \
+	X86GenGlobalISel.inc|-gen-global-isel \
 	X86GenInstrInfo.inc|-gen-instr-info \
+	X86GenRegisterBank.inc|-gen-register-bank \
 	X86GenRegisterInfo.inc|-gen-register-info \
 	X86GenSubtargetInfo.inc|-gen-subtarget
 
--- a/external/bsd/llvm/lib/libLLVMXRay/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMXRay/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2017/02/09 17:58:57 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/08/01 20:07:42 joerg Exp $
 
 LIB=	LLVMXRay
 
@@ -6,6 +6,11 @@
 
 .PATH: ${LLVM_SRCDIR}/lib/XRay
 
-SRCS+=	Trace.cpp
+SRCS+=	InstrumentationMap.cpp \
+	Trace.cpp
 
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
 .include <bsd.lib.mk>
+.endif
--- a/external/bsd/llvm/lib/libclangAST/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libclangAST/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2016/02/27 21:47:35 joerg Exp $
+#	$NetBSD: Makefile,v 1.15 2017/08/01 20:07:42 joerg Exp $
 
 LIB=	clangAST
 
@@ -12,6 +12,7 @@
 	ASTDiagnostic.cpp \
 	ASTDumper.cpp \
 	ASTImporter.cpp \
+	ASTStructuralEquivalence.cpp \
 	ASTTypeTraits.cpp \
 	AttrImpl.cpp \
 	CXXInheritance.cpp \
@@ -36,6 +37,7 @@
 	ExprConstant.cpp \
 	ExprCXX.cpp \
 	ExprObjC.cpp \
+	ExternalASTMerger.cpp \
 	ExternalASTSource.cpp \
 	InheritViz.cpp \
 	ItaniumCXXABI.cpp \
@@ -45,6 +47,7 @@
 	MicrosoftMangle.cpp \
 	NSAPI.cpp \
 	NestedNameSpecifier.cpp \
+	ODRHash.cpp \
 	OpenMPClause.cpp \
 	ParentMap.cpp \
 	RawCommentList.cpp \
--- a/external/bsd/llvm/lib/libclangBasic/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libclangBasic/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2017/01/11 12:02:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.16 2017/08/01 20:07:42 joerg Exp $
 
 LIB=	clangBasic
 
@@ -17,6 +17,7 @@
 	FileSystemStatCache.cpp \
 	IdentifierTable.cpp \
 	LangOptions.cpp \
+	MemoryBufferCache.cpp \
 	Module.cpp \
 	ObjCRuntime.cpp \
 	OpenMPKinds.cpp \
@@ -31,7 +32,8 @@
 	Version.cpp \
 	VersionTuple.cpp \
 	VirtualFileSystem.cpp \
-	Warnings.cpp
+	Warnings.cpp \
+	XRayLists.cpp
 
 CPPFLAGS.Version.cpp=	-DSVN_REVISION=\"${CLANG_REVISION}\" \
 			-DLLVM_REVISION=\"${LLVM_REVISION}\"
--- a/external/bsd/llvm/lib/libclangCodeGen/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libclangCodeGen/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2017/01/11 12:02:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.15 2017/08/01 20:07:42 joerg Exp $
 
 LIB=	clangCodeGen
 
@@ -10,7 +10,6 @@
 	CGAtomic.cpp \
 	CGBlocks.cpp \
 	CGBuiltin.cpp \
-	CGCUDABuiltin.cpp \
 	CGCUDANV.cpp \
 	CGCUDARuntime.cpp \
 	CGCXX.cpp \
@@ -29,6 +28,7 @@
 	CGExprConstant.cpp \
 	CGExprCXX.cpp \
 	CGExprScalar.cpp \
+	CGGPUBuiltin.cpp \
 	CGLoopInfo.cpp \
 	CGObjC.cpp \
 	CGObjCGNU.cpp \
@@ -49,8 +49,10 @@
 	CodeGenPGO.cpp \
 	CodeGenTBAA.cpp \
 	CodeGenTypes.cpp \
+	ConstantInitBuilder.cpp \
 	CoverageMappingGen.cpp \
 	ItaniumCXXABI.cpp \
+	MacroPPCallbacks.cpp \
 	MicrosoftCXXABI.cpp \
 	ModuleBuilder.cpp \
 	ObjectFilePCHContainerOperations.cpp \
--- a/external/bsd/llvm/lib/libclangDriver/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libclangDriver/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2017/01/11 12:02:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.12 2017/08/01 20:07:42 joerg Exp $
 
 LIB=	clangDriver
 
@@ -6,23 +6,67 @@
 
 .PATH: ${CLANG_SRCDIR}/lib/Driver
 
+CPPFLAGS+=	-I${CLANG_SRCDIR}/lib/Driver
+
 SRCS+=	Action.cpp \
 	Compilation.cpp \
-	CrossWindowsToolChain.cpp \
 	Distro.cpp \
 	Driver.cpp \
 	DriverOptions.cpp \
 	Job.cpp \
-	MSVCToolChain.cpp \
-	MinGWToolChain.cpp \
 	Multilib.cpp \
 	Phases.cpp \
 	SanitizerArgs.cpp \
 	Tool.cpp \
 	ToolChain.cpp \
-	ToolChains.cpp \
-	Tools.cpp \
-	Types.cpp
+	Types.cpp \
+	XRayArgs.cpp
+
+.PATH: ${CLANG_SRCDIR}/lib/Driver/ToolChains
+
+SRCS+=	AMDGPU.cpp \
+	AVR.cpp \
+	Ananas.cpp \
+	BareMetal.cpp \
+	Bitrig.cpp \
+	Clang.cpp \
+	CloudABI.cpp \
+	CommonArgs.cpp \
+	Contiki.cpp \
+	CrossWindows.cpp \
+	Cuda.cpp \
+	Darwin.cpp \
+	DragonFly.cpp \
+	FreeBSD.cpp \
+	Fuchsia.cpp \
+	Gnu.cpp \
+	Haiku.cpp \
+	Hexagon.cpp \
+	Linux.cpp \
+	MinGW.cpp \
+	Minix.cpp \
+	MipsLinux.cpp \
+	MSVC.cpp \
+	Myriad.cpp \
+	NaCl.cpp \
+	NetBSD.cpp \
+	OpenBSD.cpp \
+	PS4CPU.cpp \
+	Solaris.cpp \
+	TCE.cpp \
+	WebAssembly.cpp \
+	XCore.cpp
+
+.PATH: ${CLANG_SRCDIR}/lib/Driver/ToolChains/Arch
+
+SRCS+=	AArch64.cpp \
+	ARM.cpp \
+	Mips.cpp \
+	PPC.cpp \
+	Sparc.cpp \
+	SystemZ.cpp \
+	X86.cpp
+
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libclangFormat/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libclangFormat/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2017/08/01 20:07:42 joerg Exp $
 
 LIB=	clangFormat
 
@@ -8,16 +8,17 @@
 
 SRCS+=	AffectedRangeManager.cpp \
 	BreakableToken.cpp \
-	Comments.cpp \
 	ContinuationIndenter.cpp \
 	Format.cpp \
 	FormatToken.cpp \
 	FormatTokenLexer.cpp \
+	NamespaceEndCommentsFixer.cpp \
 	SortJavaScriptImports.cpp \
 	TokenAnalyzer.cpp \
 	TokenAnnotator.cpp \
 	UnwrappedLineFormatter.cpp \
 	UnwrappedLineParser.cpp \
+	UsingDeclarationsSorter.cpp \
 	WhitespaceManager.cpp
 
 .if defined(HOSTLIB)
--- a/external/bsd/llvm/lib/libclangFrontend/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libclangFrontend/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2016/02/27 21:47:35 joerg Exp $
+#	$NetBSD: Makefile,v 1.16 2017/08/01 20:07:43 joerg Exp $
 
 LIB=	clangFrontend
 
@@ -31,6 +31,7 @@
 	ModuleDependencyCollector.cpp \
 	MultiplexConsumer.cpp \
 	PCHContainerOperations.cpp \
+	PrecompiledPreamble.cpp \
 	PrintPreprocessedOutput.cpp \
 	SerializedDiagnosticPrinter.cpp \
 	SerializedDiagnosticReader.cpp \
--- a/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.26 2017/01/11 12:02:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.27 2017/08/01 20:07:43 joerg Exp $
 
 LIB=	clangStaticAnalyzerCheckers
 
@@ -43,7 +43,7 @@
 	GTestChecker.cpp \
 	GenericTaintChecker.cpp \
 	IdenticalExprChecker.cpp \
-	IteratorPastEndChecker.cpp \
+	IteratorChecker.cpp \
 	IvarInvalidationChecker.cpp \
 	LLVMConventionsChecker.cpp \
 	LocalizationChecker.cpp \
@@ -55,6 +55,7 @@
 	MallocChecker.cpp \
 	MallocOverflowSecurityChecker.cpp \
 	MallocSizeofChecker.cpp \
+	MisusedMovedObjectChecker.cpp \
 	NSAutoreleasePoolChecker.cpp \
 	NSErrorChecker.cpp \
 	NoReturnFunctionChecker.cpp \
--- a/external/bsd/llvm/lib/libclangStaticAnalyzerCore/Makefile	Tue Aug 01 19:58:33 2017 +0000
+++ b/external/bsd/llvm/lib/libclangStaticAnalyzerCore/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2016/02/27 21:47:36 joerg Exp $
+#	$NetBSD: Makefile,v 1.16 2017/08/01 20:07:43 joerg Exp $
 
 LIB=	clangStaticAnalyzerCore
 
@@ -39,6 +39,7 @@
 	PlistDiagnostics.cpp \
 	ProgramState.cpp \
 	RangeConstraintManager.cpp \
+	RangedConstraintManager.cpp \
 	RegionStore.cpp \
 	SimpleConstraintManager.cpp \
 	SimpleSValBuilder.cpp \
@@ -46,7 +47,8 @@
 	SValBuilder.cpp \
 	SVals.cpp \
 	SubEngine.cpp \
-	SymbolManager.cpp
+	SymbolManager.cpp \
+	Z3ConstraintManager.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/lib/libclangToolingRefactoring/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -0,0 +1,22 @@
+#	$NetBSD: Makefile,v 1.1 2017/08/01 20:07:43 joerg Exp $
+
+LIB=	clangToolingRefactoring
+
+.include <bsd.init.mk>
+
+.PATH: ${CLANG_SRCDIR}/lib/Tooling/Refactoring
+
+SRCS+=	AtomicChange.cpp
+
+.PATH: ${CLANG_SRCDIR}/lib/Tooling/Refactoring/Rename
+
+SRCS+=	RenamingAction.cpp \
+	USRFinder.cpp \
+	USRFindingAction.cpp \
+	USRLocFinder.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/llvm-lib/libLLVMBinaryFormat/Makefile	Tue Aug 01 20:07:37 2017 +0000
@@ -0,0 +1,3 @@
+#	$NetBSD: Makefile,v 1.1 2017/08/01 20:07:43 joerg Exp $
+
+.include <bsd.init.mk>