Update LLVM build glue for pre-4.0.0 r291444. trunk
authorjoerg <joerg@NetBSD.org>
Wed, 11 Jan 2017 12:02:24 +0000
branchtrunk
changeset 247660 0c9a6fd5d7eb
parent 247659 d60992f89e46
child 247661 a992b511203b
Update LLVM build glue for pre-4.0.0 r291444.
distrib/sets/lists/base/mi
distrib/sets/lists/comp/ad.arm
distrib/sets/lists/comp/ad.powerpc
distrib/sets/lists/comp/md.amd64
distrib/sets/lists/comp/md.i386
distrib/sets/lists/comp/mi
external/bsd/llvm/Makefile.inc
external/bsd/llvm/bin/Makefile
external/bsd/llvm/bin/bugpoint/Makefile
external/bsd/llvm/bin/clang-format/Makefile
external/bsd/llvm/bin/clang-tblgen/Makefile
external/bsd/llvm/bin/clang/Makefile
external/bsd/llvm/bin/llc/Makefile
external/bsd/llvm/bin/lld/Makefile
external/bsd/llvm/bin/lldb/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-bcanalyzer/Makefile
external/bsd/llvm/bin/llvm-cov/Makefile
external/bsd/llvm/bin/llvm-cxxdump/Makefile
external/bsd/llvm/bin/llvm-cxxfilt/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-mc/Makefile
external/bsd/llvm/bin/llvm-mcld/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-ranlib/Makefile
external/bsd/llvm/bin/llvm-readobj/Makefile
external/bsd/llvm/bin/llvm-size/Makefile
external/bsd/llvm/bin/llvm-strings/Makefile
external/bsd/llvm/bin/llvm-symbolizer/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/AsmParsers.def
external/bsd/llvm/config/llvm/Config/AsmPrinters.def
external/bsd/llvm/config/llvm/Config/Disassemblers.def
external/bsd/llvm/config/llvm/Config/Targets.def
external/bsd/llvm/config/llvm/Config/abi-breaking.h
external/bsd/llvm/config/llvm/Config/config.h.in
external/bsd/llvm/config/llvm/Config/llvm-config.h.in
external/bsd/llvm/config/llvm/Support/DataTypes.h
external/bsd/llvm/include/Makefile
external/bsd/llvm/lib/Makefile
external/bsd/llvm/lib/libLLVMAArch64CodeGen/Makefile
external/bsd/llvm/lib/libLLVMARMCodeGen/Makefile
external/bsd/llvm/lib/libLLVMAnalysis/Makefile
external/bsd/llvm/lib/libLLVMAsmPrinter/Makefile
external/bsd/llvm/lib/libLLVMBitReader/Makefile
external/bsd/llvm/lib/libLLVMCodeGen/Makefile
external/bsd/llvm/lib/libLLVMCppBackend/Makefile
external/bsd/llvm/lib/libLLVMCppBackendInfo/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/libLLVMDebugInfoPDBRaw/Makefile
external/bsd/llvm/lib/libLLVMDemangle/Makefile
external/bsd/llvm/lib/libLLVMGlobalISel/Makefile
external/bsd/llvm/lib/libLLVMIR/Makefile
external/bsd/llvm/lib/libLLVMInstrumentation/Makefile
external/bsd/llvm/lib/libLLVMLTO/Makefile
external/bsd/llvm/lib/libLLVMMC/Makefile
external/bsd/llvm/lib/libLLVMMCDisassembler/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/libLLVMProfileData/Makefile
external/bsd/llvm/lib/libLLVMProfileDataCoverage/Makefile
external/bsd/llvm/lib/libLLVMRuntimeDyld/Makefile
external/bsd/llvm/lib/libLLVMScalarOpts/Makefile
external/bsd/llvm/lib/libLLVMSelectionDAG/Makefile
external/bsd/llvm/lib/libLLVMSparcCodeGen/Makefile
external/bsd/llvm/lib/libLLVMSupport/Makefile
external/bsd/llvm/lib/libLLVMTarget/Makefile
external/bsd/llvm/lib/libLLVMTransformsCoroutines/Makefile
external/bsd/llvm/lib/libLLVMTransformsUtils/Makefile
external/bsd/llvm/lib/libLLVMVectorize/Makefile
external/bsd/llvm/lib/libLLVMX86CodeGen/Makefile
external/bsd/llvm/lib/libLLVMX86Disassembler/Makefile
external/bsd/llvm/lib/libLLVMX86MCTargetDesc/Makefile
external/bsd/llvm/lib/libLLVMipo/Makefile
external/bsd/llvm/lib/libclangAnalysis/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/libclangIndex/Makefile
external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile
external/bsd/llvm/lib/libclangTooling/Makefile
external/bsd/llvm/lib/libclangToolingCore/Makefile
--- a/distrib/sets/lists/base/mi	Wed Jan 11 11:53:07 2017 +0000
+++ b/distrib/sets/lists/base/mi	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1148 2017/01/07 20:43:16 christos Exp $
+# $NetBSD: mi,v 1.1149 2017/01/11 12:02:24 joerg Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1032,7 +1032,8 @@
 ./usr/include/clang-3.4				base-obsolete		obsolete
 ./usr/include/clang-3.5				base-obsolete		obsolete
 ./usr/include/clang-3.6				base-obsolete		obsolete
-./usr/include/clang-3.8				base-c-usr
+./usr/include/clang-3.8				base-obsolete		obsolete
+./usr/include/clang-4.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	Wed Jan 11 11:53:07 2017 +0000
+++ b/distrib/sets/lists/comp/ad.arm	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.arm,v 1.77 2017/01/05 13:45:51 wiz Exp $
+# $NetBSD: ad.arm,v 1.78 2017/01/11 12:02:24 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
@@ -296,8 +296,10 @@
 ./usr/include/cats/wchar_limits.h		comp-obsolete		obsolete
 ./usr/include/clang-3.6/arm_acle.h		comp-obsolete		obsolete
 ./usr/include/clang-3.6/arm_neon.h		comp-obsolete		obsolete
-./usr/include/clang-3.8/arm_acle.h		comp-c-include		llvm
-./usr/include/clang-3.8/arm_neon.h		comp-c-include		llvm
+./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/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.powerpc	Wed Jan 11 11:53:07 2017 +0000
+++ b/distrib/sets/lists/comp/ad.powerpc	Wed Jan 11 12:02:24 2017 +0000
@@ -1,13 +1,16 @@
-# $NetBSD: ad.powerpc,v 1.85 2017/01/05 13:45:51 wiz Exp $
+# $NetBSD: ad.powerpc,v 1.86 2017/01/11 12:02:24 joerg Exp $
 ./usr/bin/elf2aout				comp-sysutil-bin
 ./usr/bin/psim					comp-debug-bin		gdb
 ./usr/include/altivec.h				comp-obsolete		obsolete
 ./usr/include/clang-3.4/altivec.h		comp-obsolete		obsolete
 ./usr/include/clang-3.5/altivec.h		comp-obsolete		obsolete
 ./usr/include/clang-3.6/altivec.h		comp-obsolete		obsolete
-./usr/include/clang-3.8/altivec.h		comp-c-include		llvm
-./usr/include/clang-3.8/htmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/htmxlintrin.h		comp-c-include		llvm
+./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/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	Wed Jan 11 11:53:07 2017 +0000
+++ b/distrib/sets/lists/comp/md.amd64	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.241 2017/01/05 13:45:51 wiz Exp $
+# $NetBSD: md.amd64,v 1.242 2017/01/11 12:02:24 joerg Exp $
 
 ./usr/include/amd64				comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
@@ -170,54 +170,110 @@
 ./usr/include/clang-3.6/x86intrin.h		comp-obsolete		obsolete
 ./usr/include/clang-3.6/xmmintrin.h		comp-obsolete		obsolete
 ./usr/include/clang-3.6/xopintrin.h		comp-obsolete		obsolete
-./usr/include/clang-3.8/__wmmintrin_aes.h	comp-c-include		llvm
-./usr/include/clang-3.8/__wmmintrin_pclmul.h	comp-c-include		llvm
-./usr/include/clang-3.8/adxintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/ammintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/avx2intrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/avx512bwintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avx512cdintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avx512dqintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avx512erintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avx512fintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/avx512vlbwintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avx512vldqintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avx512vlintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avxintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/bmi2intrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/bmiintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/cpuid.h			comp-c-include		llvm
-./usr/include/clang-3.8/emmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/f16cintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/fma4intrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/fmaintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/fxsrintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/ia32intrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/immintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/lzcntintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/mm3dnow.h		comp-c-include		llvm
-./usr/include/clang-3.8/mm_malloc.h		comp-c-include		llvm
-./usr/include/clang-3.8/mmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/nmmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/pkuintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/pmmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/popcntintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/prfchwintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/rdseedintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/rtmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/shaintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/smmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/tbmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/tmmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/wmmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/x86intrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/xmmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/xopintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/xsavecintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/xsaveintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/xsaveoptintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/xsavesintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/xtestintrin.h		comp-c-include		llvm
+./usr/include/clang-3.8/__wmmintrin_aes.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/__wmmintrin_pclmul.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/adxintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/ammintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/avx2intrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512bwintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512cdintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512dqintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512erintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512fintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512vlbwintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512vldqintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512vlintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avxintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/bmi2intrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/bmiintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/cpuid.h			comp-obsolete		obsolete
+./usr/include/clang-3.8/emmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/f16cintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/fma4intrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/fmaintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/fxsrintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/ia32intrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/immintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/lzcntintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/mm3dnow.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/mm_malloc.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/mmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/nmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/pkuintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/pmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/popcntintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/prfchwintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/rdseedintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/rtmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/shaintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/smmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/tbmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/tmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/wmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/x86intrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/xmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/xopintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/xsavecintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/xsaveintrin.h		comp-obsolete		obsolete
+./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/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	Wed Jan 11 11:53:07 2017 +0000
+++ b/distrib/sets/lists/comp/md.i386	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.161 2017/01/05 13:45:51 wiz Exp $
+# $NetBSD: md.i386,v 1.162 2017/01/11 12:02:24 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
@@ -98,54 +98,110 @@
 ./usr/include/clang-3.6/x86intrin.h		comp-obsolete		obsolete
 ./usr/include/clang-3.6/xmmintrin.h		comp-obsolete		obsolete
 ./usr/include/clang-3.6/xopintrin.h		comp-obsolete		obsolete
-./usr/include/clang-3.8/__wmmintrin_aes.h	comp-c-include		llvm
-./usr/include/clang-3.8/__wmmintrin_pclmul.h	comp-c-include		llvm
-./usr/include/clang-3.8/adxintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/ammintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/avx2intrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/avx512bwintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avx512cdintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avx512dqintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avx512erintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avx512fintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/avx512vlbwintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avx512vldqintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avx512vlintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/avxintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/bmi2intrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/bmiintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/cpuid.h			comp-c-include		llvm
-./usr/include/clang-3.8/emmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/f16cintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/fma4intrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/fmaintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/fxsrintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/ia32intrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/immintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/lzcntintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/mm3dnow.h		comp-c-include		llvm
-./usr/include/clang-3.8/mm_malloc.h		comp-c-include		llvm
-./usr/include/clang-3.8/mmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/nmmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/pkuintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/pmmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/popcntintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/prfchwintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/rdseedintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/rtmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/shaintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/smmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/tbmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/tmmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/wmmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/x86intrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/xmmintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/xopintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/xsavecintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/xsaveintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/xsaveoptintrin.h	comp-c-include		llvm
-./usr/include/clang-3.8/xsavesintrin.h		comp-c-include		llvm
-./usr/include/clang-3.8/xtestintrin.h		comp-c-include		llvm
+./usr/include/clang-3.8/__wmmintrin_aes.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/__wmmintrin_pclmul.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/ammintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/adxintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/avx2intrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512bwintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512cdintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512dqintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512erintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512fintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512vlbwintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512vldqintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avx512vlintrin.h	comp-obsolete		obsolete
+./usr/include/clang-3.8/avxintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/bmi2intrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/bmiintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/cpuid.h			comp-obsolete		obsolete
+./usr/include/clang-3.8/emmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/f16cintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/fma4intrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/fmaintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/fxsrintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/ia32intrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/immintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/lzcntintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/mm3dnow.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/mm_malloc.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/mmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/nmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/pkuintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/pmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/popcntintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/prfchwintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/rdseedintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/rtmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/shaintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/smmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/tbmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/tmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/wmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/x86intrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/xmmintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/xopintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/xsavecintrin.h		comp-obsolete		obsolete
+./usr/include/clang-3.8/xsaveintrin.h		comp-obsolete		obsolete
+./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/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	Wed Jan 11 11:53:07 2017 +0000
+++ b/distrib/sets/lists/comp/mi	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2101 2017/01/10 10:13:24 roy Exp $
+#	$NetBSD: mi,v 1.2102 2017/01/11 12:02:24 joerg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.comp				comp-sys-root
@@ -354,9 +354,12 @@
 ./usr/include/clang-3.6/stdalign.h		comp-obsolete		obsolete
 ./usr/include/clang-3.6/stdatomic.h		comp-obsolete		obsolete
 ./usr/include/clang-3.6/stdnoreturn.h		comp-obsolete		obsolete
-./usr/include/clang-3.8/stdalign.h		comp-c-include		llvm
-./usr/include/clang-3.8/stdatomic.h		comp-c-include		llvm
-./usr/include/clang-3.8/stdnoreturn.h		comp-c-include		llvm
+./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/complex.h				comp-c-include
 ./usr/include/cpio.h				comp-c-include
 ./usr/include/crypto/cryptodev.h		comp-c-include
--- a/external/bsd/llvm/Makefile.inc	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/Makefile.inc	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.81 2016/09/03 23:22:38 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.82 2017/01/11 12:02:24 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_38
+SVN_BRANCH=		trunk
 
-COMMON_REVISION=	r280599
+COMMON_REVISION=	r291444
 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=		3.8.0
-CLANG_VERSION=		3.8.0
-LLD_VERSION=		3.8.0
+LLVM_VERSION=		4.0.0
+CLANG_VERSION=		4.0.0
+LLD_VERSION=		4.0.0
 
 CLANG_SRCDIR:=	${.PARSEDIR}/dist/clang
 LLD_SRCDIR:=	${.PARSEDIR}/dist/lld
@@ -27,6 +27,7 @@
 LLVM_SRCDIR:=	${.PARSEDIR}/dist/llvm
 MCLINKER_SRCDIR:=	${.PARSEDIR}/dist/mclinker
 LLVM_TOPLEVEL:=	${.PARSEDIR}
+CONFIG_DIR:=	${.PARSEDIR}/dist/llvm-configure
 
 CPPFLAGS+=	-I. -I${CLANG_SRCDIR}/include -I${LLD_SRCDIR}/include \
 		-I${LLVM_SRCDIR}/include -I${MCLINKER_SRCDIR}/include \
@@ -69,6 +70,7 @@
 	--with-c-include-dirs=/usr/include/clang-${CLANG_VERSION:R}:/usr/include \
 	--disable-timestamps --prefix=/usr --sysconfdir=/etc/llvm \
 	--with-clang-default-openmp-runtime=libomp \
+	--with-llvm-srcdir=${LLVM_SRCDIR} \
 	--with-clang-srcdir=${CLANG_SRCDIR} \
 	--host=${LLVM_PLATFORM} --disable-compiler-version-checks \
 	--disable-bindings llvm_cv_gnu_make_command=${MAKE}
--- a/external/bsd/llvm/bin/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2016/02/27 21:47:30 joerg Exp $
+#	$NetBSD: Makefile,v 1.16 2017/01/11 12:02:24 joerg Exp $
 
 .include <bsd.own.mk>
 
@@ -32,6 +32,7 @@
 	llvm-bcanalyzer \
 	llvm-cov \
 	llvm-cxxdump \
+	llvm-cxxfilt \
 	llvm-diff \
 	llvm-dis \
 	llvm-dwarfdump \
@@ -44,9 +45,11 @@
 	llvm-profdata \
 	llvm-readobj \
 	llvm-size \
+	llvm-strings \
 	llvm-symbolizer \
 	opt \
-	sancov
+	sancov \
+	sanstats
 .endif
 
 .include <bsd.subdir.mk>
--- a/external/bsd/llvm/bin/bugpoint/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/bugpoint/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2016/02/27 21:47:30 joerg Exp $
+#	$NetBSD: Makefile,v 1.10 2017/01/11 12:02:24 joerg Exp $
 
 PROG_CXX=	bugpoint
 NOMAN=		yes
@@ -26,19 +26,26 @@
 	BitWriter \
 	InstCombine \
 	Instrumentation \
-	MC \
 	Linker \
 	ScalarOpts \
 	ipo \
 	Object \
+	MCParser \
+	MC \
 	ProfileData \
 	Target \
 	Vectorize \
 	TransformsUtils \
 	Analysis \
 	IR \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
+LDADD+=	-lz
+.if !defined(HOSTPROG)
+DPADD+=	${LIBZ}
+.endif
+
 .include <bsd.prog.mk>
--- a/external/bsd/llvm/bin/clang-format/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/clang-format/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2015/01/29 20:41:33 joerg Exp $
+#	$NetBSD: Makefile,v 1.5 2017/01/11 12:02:25 joerg Exp $
 
 PROG_CXX=	clang-format
 NOMAN=		yes
@@ -30,7 +30,8 @@
 	MCParser \
 	MC \
 	Option \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/clang-tblgen/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/clang-tblgen/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2013/07/07 21:36:42 joerg Exp $
+#	$NetBSD: Makefile,v 1.5 2017/01/11 12:02:25 joerg Exp $
 
 PROG_CXX=	clang-tblgen
 NOMAN=		yes
@@ -19,7 +19,8 @@
 
 LLVM_LIBS+= \
 	TableGen \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/clang/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/clang/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.34 2016/02/27 21:47:30 joerg Exp $
+#	$NetBSD: Makefile,v 1.35 2017/01/11 12:02:25 joerg Exp $
 
 PROG_CXX=	clang
 NOMAN=		yes
@@ -23,6 +23,7 @@
 	clangStaticAnalyzerFrontend \
 	clangStaticAnalyzerCheckers \
 	clangStaticAnalyzerCore \
+	clangASTMatchers \
 	clangDriver \
 	clangSerialization \
 	clangCodeGen \
@@ -37,6 +38,9 @@
 	clangBasic
 
 LLVM_LIBS+= \
+	TransformsCoroutines \
+	ProfileDataCoverage \
+	LTO \
 	ObjCARC \
 	ipo \
 	IRReader \
@@ -75,8 +79,12 @@
 	X86Utils \
 	X86AsmParser \
 	X86AsmPrinter \
+	GlobalISel \
 	SelectionDAG \
 	AsmPrinter \
+	DebugInfoCodeView \
+	DebugInfoMSF \
+	Passes \
 	CodeGen \
 	Vectorize \
 	Target \
@@ -87,13 +95,14 @@
 	MCDisassembler \
 	MCParser \
 	MC \
+	Analysis \
 	Object \
 	Linker \
 	TransformsUtils \
-	Analysis \
 	IR \
 	Option \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/llc/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llc/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.22 2016/02/27 21:47:30 joerg Exp $
+#	$NetBSD: Makefile,v 1.23 2017/01/11 12:02:25 joerg Exp $
 
 PROG_CXX=	llc
 NOMAN=		yes
@@ -12,6 +12,8 @@
 LLVM_LIBS+= \
 	MIRParser \
 	AsmPrinter \
+	DebugInfoMSF \
+	DebugInfoCodeView \
 	IRReader \
 	AsmParser \
 	BitReader \
@@ -47,6 +49,7 @@
 	X86AsmParser \
 	X86AsmPrinter \
 	X86Utils \
+	GlobalISel \
 	MCDisassembler \
 	Object \
 	SelectionDAG \
@@ -59,7 +62,8 @@
 	MCParser \
 	MC \
 	IR \
-	Support
+	Support \
+	Demangle
 
 LDADD+=	-lz
 DPADD+=	${LIBZ}
--- a/external/bsd/llvm/bin/lld/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/lld/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2015/01/29 20:41:33 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2017/01/11 12:02:25 joerg Exp $
 
 PROG_CXX=	lld
 NOMAN=		yes
@@ -35,7 +35,8 @@
 	IR \
 	DebugInfo \
 	Option \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/lldb/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/lldb/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2016/02/27 21:47:30 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:25 joerg Exp $
 
 PROG_CXX=	lldb
 NOMAN=		yes
@@ -150,7 +150,8 @@
 	IR \
 	ProfileData \
 	Option \
-	Support
+	Support \
+	Demangle
 
 LDADD+=	-ledit -lterminfo -lexecinfo -lz
 DPADD+=	${LIBEDIT} ${LIBTERMINFO} ${LIBEXECINFO} ${LIBZ}
--- a/external/bsd/llvm/bin/lli/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/lli/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2016/02/27 21:47:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.15 2017/01/11 12:02:25 joerg Exp $
 
 PROG_CXX=	lli
 NOMAN=		yes
@@ -36,7 +36,8 @@
 	Target \
 	MC \
 	IR \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/llvm-ar/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-ar/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2016/02/27 21:47:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.8 2017/01/11 12:02:25 joerg Exp $
 
 PROG_CXX=	llvm-ar
 NOMAN=		yes
@@ -46,7 +46,8 @@
 	IR \
 	LibDriver \
 	Option \
-	Support
+	Support \
+	Demangle
 
 LDADD+=	-lz
 DPADD+=	${LIBZ}
--- a/external/bsd/llvm/bin/llvm-as/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-as/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2013/01/23 15:02:55 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2017/01/11 12:02:25 joerg Exp $
 
 PROG_CXX=	llvm-as
 NOMAN=		yes
@@ -13,7 +13,8 @@
 	AsmParser \
 	BitWriter \
 	IR \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/llvm-bcanalyzer/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-bcanalyzer/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2013/02/04 15:00:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2017/01/11 12:02:25 joerg Exp $
 
 PROG_CXX=	llvm-bcanalyzer
 NOMAN=		yes
@@ -11,7 +11,8 @@
 
 LLVM_LIBS+= \
 	BitReader \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/llvm-cov/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-cov/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2016/02/27 21:47:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:26 joerg Exp $
 
 PROG_CXX=	llvm-cov
 NOMAN=		yes
@@ -10,21 +10,31 @@
 SRCS=	gcov.cpp \
 	llvm-cov.cpp \
 	CodeCoverage.cpp \
+	CoverageExporterJson.cpp \
 	CoverageFilters.cpp \
 	CoverageReport.cpp \
 	CoverageSummaryInfo.cpp \
 	SourceCoverageView.cpp \
+	SourceCoverageViewHTML.cpp \
+	SourceCoverageViewText.cpp \
 	TestingSupport.cpp
 
 LLVM_LIBS+= \
+	ProfileDataCoverage \
 	ProfileData \
 	Object \
 	MCParser \
 	MC \
 	BitReader \
 	IR \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
+LDADD+=	-lz
+.if !defined(HOSTPROG)
+DPADD+=	${LIBZ}
+.endif
+
 .include <bsd.prog.mk>
--- a/external/bsd/llvm/bin/llvm-cxxdump/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-cxxdump/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2016/02/27 21:47:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:26 joerg Exp $
 
 PROG_CXX=	llvm-cxxdump
 NOMAN=		yes
@@ -22,7 +22,8 @@
 	MCParser \
 	MC \
 	IR \
-	Support
+	Support \
+	Demangle
 
 #LDADD+=	-lz
 #DPADD+=	${LIBZ}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/bin/llvm-cxxfilt/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -0,0 +1,19 @@
+#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:26 joerg Exp $
+
+PROG_CXX=	llvm-cxxfilt
+NOMAN=		yes
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/tools/llvm-cxxfilt
+
+SRCS=	llvm-cxxfilt.cpp
+
+LLVM_LIBS+= \
+	Demangle \
+	Support \
+	Demangle
+
+.include "${.PARSEDIR}/../../link.mk"
+
+.include <bsd.prog.mk>
--- a/external/bsd/llvm/bin/llvm-diff/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-diff/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2013/04/25 13:59:55 joerg Exp $
+#	$NetBSD: Makefile,v 1.5 2017/01/11 12:02:26 joerg Exp $
 
 PROG_CXX=	llvm-diff
 NOMAN=		yes
@@ -17,7 +17,8 @@
 	AsmParser \
 	BitReader \
 	IR \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/llvm-dis/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-dis/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2013/01/23 15:02:55 joerg Exp $
+#	$NetBSD: Makefile,v 1.4 2017/01/11 12:02:26 joerg Exp $
 
 PROG_CXX=	llvm-dis
 NOMAN=		yes
@@ -13,7 +13,8 @@
 	Analysis \
 	BitReader \
 	IR \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/llvm-dwarfdump/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-dwarfdump/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2016/02/27 21:47:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.4 2017/01/11 12:02:26 joerg Exp $
 
 PROG_CXX=	llvm-dwarfdump
 NOMAN=		yes
@@ -16,7 +16,8 @@
 	IR \
 	MC \
 	MCParser \
-	Support
+	Support \
+	Demangle
 
 LDADD+=	-lz
 DPADD+=	${LIBZ}
--- a/external/bsd/llvm/bin/llvm-dwp/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-dwp/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2016/02/27 21:47:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:26 joerg Exp $
 
 PROG_CXX=	llvm-dwp
 NOMAN=		yes
@@ -7,7 +7,8 @@
 
 .PATH: ${LLVM_SRCDIR}/tools/llvm-dwp
 
-SRCS=	llvm-dwp.cpp
+SRCS=	DWPError.cpp \
+	llvm-dwp.cpp
 
 LLVM_LIBS+= \
 	DebugInfoDWARF \
@@ -38,7 +39,10 @@
 	X86Utils \
 	X86AsmPrinter \
 	MCDisassembler \
+	GlobalISel \
 	AsmPrinter \
+	DebugInfoCodeView \
+	DebugInfoMSF \
 	Object \
 	MCParser \
 	SelectionDAG \
@@ -51,7 +55,8 @@
 	TransformsUtils \
 	Analysis \
 	IR \
-	Support
+	Support \
+	Demangle
 
 LDADD+=	-lz
 DPADD+=	${LIBZ}
--- a/external/bsd/llvm/bin/llvm-extract/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-extract/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2016/02/27 21:47:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:26 joerg Exp $
 
 PROG_CXX=	llvm-extract
 NOMAN=		yes
@@ -17,9 +17,14 @@
 	ipo \
 	TransformsUtils \
 	Analysis \
+	Object \
+	MCParser \
+	MC \
+	ProfileData \
 	Target \
 	IR \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/llvm-link/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-link/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2016/02/27 21:47:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:26 joerg Exp $
 
 PROG_CXX=	llvm-link
 NOMAN=		yes
@@ -11,16 +11,19 @@
 
 LLVM_LIBS+= \
 	Object \
+	MC \
 	IRReader \
 	AsmParser \
 	BitReader \
 	BitWriter \
+	ipo \
 	Linker \
 	TransformsUtils \
 	Analysis \
 	Target \
 	IR \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/llvm-mc/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-mc/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21 2015/01/29 20:41:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.22 2017/01/11 12:02:26 joerg Exp $
 
 PROG_CXX=	llvm-mc
 NOMAN=		yes
@@ -62,7 +62,8 @@
 	MCParser \
 	MC \
 	IR \
-	Support
+	Support \
+	Demangle
 
 LDADD+=	-lz
 DPADD+=	${LIBZ}
--- a/external/bsd/llvm/bin/llvm-mcld/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-mcld/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2013/02/27 21:25:08 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:27 joerg Exp $
 
 PROG_CXX=	ld.mcld
 NOMAN=		yes
@@ -69,7 +69,8 @@
 	MCParser \
 	MC \
 	IR \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/llvm-nm/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-nm/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2015/01/29 20:41:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:27 joerg Exp $
 
 PROG_CXX=	llvm-nm
 NOMAN=		yes
@@ -44,7 +44,8 @@
 	MC \
 	BitReader \
 	IR \
-	Support
+	Support \
+	Demangle
 
 LDADD+=	-lz
 DPADD+=	${LIBZ}
--- a/external/bsd/llvm/bin/llvm-objdump/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-objdump/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2016/02/27 21:47:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.13 2017/01/11 12:02:27 joerg Exp $
 
 PROG_CXX=	llvm-objdump
 NOMAN=		yes
@@ -10,7 +10,8 @@
 SRCS=	llvm-objdump.cpp \
 	COFFDump.cpp \
 	ELFDump.cpp \
-	MachODump.cpp
+	MachODump.cpp \
+	WasmDump.cpp
 
 LLVM_LIBS+= \
 	AArch64Disassembler \
@@ -49,12 +50,16 @@
 	CodeGen \
 	MCDisassembler \
 	DebugInfoDWARF \
+	DebugInfoSymbolize \
+	DebugInfoPDB \
+	DebugInfoPDBRaw \
 	Object \
 	BitReader \
 	MCParser \
 	MC \
 	IR \
-	Support
+	Support \
+	Demangle
 
 LDADD+=	-lz
 DPADD+=	${LIBZ}
--- a/external/bsd/llvm/bin/llvm-profdata/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-profdata/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2014/08/10 17:34:20 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2017/01/11 12:02:27 joerg Exp $
 
 PROG_CXX=	llvm-profdata
 NOMAN=		yes
@@ -12,8 +12,14 @@
 LLVM_LIBS+= \
 	ProfileData \
 	IR \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
+LDADD+=	-lz
+.if !defined(HOSTPROG)
+DPADD+=	${LIBZ}
+.endif
+
 .include <bsd.prog.mk>
--- a/external/bsd/llvm/bin/llvm-ranlib/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#	$NetBSD: Makefile,v 1.2 2013/01/23 15:02:56 joerg Exp $
-
-PROG_CXX=	llvm-ranlib
-NOMAN=		yes
-
-.include <bsd.init.mk>
-
-.PATH: ${LLVM_SRCDIR}/tools/llvm-ranlib
-
-SRCS=	llvm-ranlib.cpp
-
-LLVM_LIBS+= \
-	Archive \
-	BitReader \
-	IR \
-	Support
-
-.include "${.PARSEDIR}/../../link.mk"
-
-.include <bsd.prog.mk>
--- a/external/bsd/llvm/bin/llvm-readobj/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-readobj/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2016/02/27 21:47:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.10 2017/01/11 12:02:27 joerg Exp $
 
 PROG_CXX=	llvm-readobj
 NOMAN=		yes
@@ -16,7 +16,6 @@
 	Error.cpp \
 	MachODumper.cpp \
 	ObjDumper.cpp \
-	StreamWriter.cpp \
 	Win64EHDumper.cpp
 
 LLVM_LIBS+= \
@@ -26,12 +25,15 @@
 	PowerPCTargetInfo \
 	SparcTargetInfo \
 	X86TargetInfo \
+	DebugInfoCodeView \
+	DebugInfoMSF \
 	Object \
 	MC \
 	MCParser \
 	BitReader \
 	IR \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/bin/llvm-size/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-size/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2014/08/10 17:34:20 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2017/01/11 12:02:27 joerg Exp $
 
 PROG_CXX=	llvm-size
 NOMAN=		yes
@@ -15,7 +15,8 @@
 	MC \
 	BitReader \
 	IR \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/bin/llvm-strings/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -0,0 +1,18 @@
+#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:27 joerg Exp $
+
+PROG_CXX=	llvm-strings
+NOMAN=		yes
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/tools/llvm-strings
+
+SRCS=	llvm-strings.cpp
+
+LLVM_LIBS+= \
+	Support \
+	Demangle
+
+.include "${.PARSEDIR}/../../link.mk"
+
+.include <bsd.prog.mk>
--- a/external/bsd/llvm/bin/llvm-symbolizer/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/llvm-symbolizer/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2016/02/27 21:47:31 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:27 joerg Exp $
 
 PROG_CXX=	llvm-symbolizer
 NOMAN=		yes
@@ -13,12 +13,14 @@
 	DebugInfoSymbolize \
 	DebugInfoDWARF \
 	DebugInfoPDB \
+	DebugInfoPDBRaw \
 	Object \
 	MCParser \
 	MC \
 	BitReader \
 	IR \
-	Support
+	Support \
+	Demangle
 
 LDADD+=	-lz
 DPADD+=	${LIBZ}
--- a/external/bsd/llvm/bin/opt/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/opt/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2016/02/27 21:47:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.17 2017/01/11 12:02:27 joerg Exp $
 
 PROG_CXX=	opt
 NOMAN=		yes
@@ -27,32 +27,42 @@
 	BitWriter \
 	AArch64CodeGen \
 	AArch64TargetInfo \
+	AArch64AsmParser \
 	AArch64MCTargetDesc \
 	AArch64AsmPrinter \
 	AArch64Utils \
 	ARMCodeGen \
 	ARMTargetInfo \
+	ARMAsmParser \
 	ARMMCTargetDesc \
 	ARMAsmPrinter \
 	MipsCodeGen \
 	MipsTargetInfo \
+	MipsAsmParser \
 	MipsMCTargetDesc \
 	MipsAsmPrinter \
 	PowerPCCodeGen \
 	PowerPCTargetInfo \
+	PowerPCAsmParser \
 	PowerPCMCTargetDesc \
 	PowerPCAsmPrinter \
 	SparcCodeGen \
 	SparcTargetInfo \
+	SparcAsmParser \
 	SparcMCTargetDesc \
 	SparcAsmPrinter \
 	X86CodeGen \
+	X86AsmParser \
 	X86MCTargetDesc \
 	X86TargetInfo \
 	X86Utils \
 	X86AsmPrinter \
+	GlobalISel \
+	TransformsCoroutines \
 	MCDisassembler \
 	AsmPrinter \
+	DebugInfoCodeView \
+	DebugInfoMSF \
 	Object \
 	MCParser \
 	SelectionDAG \
@@ -67,7 +77,8 @@
 	TransformsUtils \
 	Analysis \
 	IR \
-	Support
+	Support \
+	Demangle
 
 LDADD+=	-lz
 DPADD+=	${LIBZ}
--- a/external/bsd/llvm/bin/sancov/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/sancov/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2016/02/27 21:47:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:27 joerg Exp $
 
 PROG_CXX=	sancov
 NOMAN=		yes
@@ -41,12 +41,14 @@
 	DebugInfoSymbolize \
 	DebugInfoDWARF \
 	DebugInfoPDB \
+	DebugInfoPDBRaw \
 	Object \
 	BitReader \
 	IR \
 	MCParser \
 	MC \
-	Support
+	Support \
+	Demangle
 
 LDADD+=	-lz
 DPADD+=	${LIBZ}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/bin/sanstats/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -0,0 +1,32 @@
+#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:27 joerg Exp $
+
+PROG_CXX=	sanstats
+NOMAN=		yes
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/tools/sanstats
+
+SRCS=	sanstats.cc
+
+LLVM_LIBS+= \
+	DebugInfoSymbolize \
+	DebugInfoDWARF \
+	DebugInfoPDB \
+	DebugInfoPDBRaw \
+	Object \
+	MCParser \
+	MC \
+	BitReader \
+	IR \
+	Support \
+	Demangle
+
+.include "${.PARSEDIR}/../../link.mk"
+
+LDADD+=	-lz
+.if !defined(HOSTPROG)
+DPADD+=	${LIBZ}
+.endif
+
+.include <bsd.prog.mk>
--- a/external/bsd/llvm/bin/tblgen/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/bin/tblgen/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20 2016/02/27 21:47:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.21 2017/01/11 12:02:28 joerg Exp $
 
 PROG_CXX=	llvm-tblgen
 NOMAN=		yes
@@ -29,20 +29,25 @@
 	DisassemblerEmitter.cpp \
 	FastISelEmitter.cpp \
 	FixedLenDecoderEmitter.cpp \
+	GlobalISelEmitter.cpp \
 	InstrInfoEmitter.cpp \
 	IntrinsicEmitter.cpp \
 	OptParserEmitter.cpp \
 	PseudoLoweringEmitter.cpp \
 	RegisterInfoEmitter.cpp \
+	SearchableTableEmitter.cpp \
 	SubtargetEmitter.cpp \
+	SubtargetFeatureInfo.cpp \
 	TableGen.cpp \
+	Types.cpp \
 	X86DisassemblerTables.cpp \
 	X86ModRMFilters.cpp \
 	X86RecognizableInstr.cpp
 
 LLVM_LIBS+= \
 	TableGen \
-	Support
+	Support \
+	Demangle
 
 .include "${.PARSEDIR}/../../link.mk"
 
--- a/external/bsd/llvm/config/clang/Config/config.h	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/config/clang/Config/config.h	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-/* tools/clang/include/clang/Config/config.h.  Generated from config.h.in by configure.  */
+/* include/clang/Config/config.h.  Generated from config.h.in by configure.  */
 /* This generated file is for internal use. Do not include it from headers. */
 
 #ifdef CLANG_CONFIG_H
@@ -9,6 +9,16 @@
 /* Bug report URL. */
 #define BUG_REPORT_URL "http://llvm.org/bugs/"
 
+/* Default C++ stdlib to use. */
+#define CLANG_DEFAULT_CXX_STDLIB ""
+
+/* Default runtime library to use. */
+#define CLANG_DEFAULT_RTLIB ""
+
+/* Default linker to use (linker name or absolute path, empty for platform
+   default) */
+#define CLANG_DEFAULT_LINKER ""
+
 /* Default OpenMP runtime used by -fopenmp. */
 #define CLANG_DEFAULT_OPENMP_RUNTIME "libomp"
 
@@ -19,7 +29,7 @@
 #define CLANG_RESOURCE_DIR ""
 
 /* Directories clang will search for headers */
-#define C_INCLUDE_DIRS "/usr/include/clang-3.8:/usr/include"
+#define C_INCLUDE_DIRS "/usr/include/clang-4.0:/usr/include"
 
 /* Default <path> to all compiler invocations for --sysroot=<path>. */
 #define DEFAULT_SYSROOT ""
@@ -30,7 +40,7 @@
 /* Define if we have libxml2 */
 /* #undef CLANG_HAVE_LIBXML */
 
-#define PACKAGE_STRING "LLVM 3.8.0"
+#define PACKAGE_STRING "LLVM 4.0.0svn"
 
 /* The LLVM product name and version */
 #define BACKEND_PACKAGE_STRING PACKAGE_STRING
@@ -38,4 +48,7 @@
 /* Linker version detected at compile time. */
 #define HOST_LINK_VERSION "1"
 
+/* enable x86 relax relocations by default */
+#define ENABLE_X86_RELAX_RELOCATIONS 0
+
 #endif
--- a/external/bsd/llvm/config/llvm/Config/AsmParsers.def	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/config/llvm/Config/AsmParsers.def	Wed Jan 11 12:02:24 2017 +0000
@@ -24,6 +24,12 @@
 #  error Please define the macro LLVM_ASM_PARSER(TargetName)
 #endif
 
-LLVM_ASM_PARSER(X86) LLVM_ASM_PARSER(PowerPC) LLVM_ASM_PARSER(Sparc) LLVM_ASM_PARSER(AArch64) LLVM_ASM_PARSER(ARM) LLVM_ASM_PARSER(Mips) 
+LLVM_ASM_PARSER(Mips)
+LLVM_ASM_PARSER(ARM)
+LLVM_ASM_PARSER(AArch64)
+LLVM_ASM_PARSER(Sparc)
+LLVM_ASM_PARSER(PowerPC)
+LLVM_ASM_PARSER(X86)
+
 
 #undef LLVM_ASM_PARSER
--- a/external/bsd/llvm/config/llvm/Config/AsmPrinters.def	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/config/llvm/Config/AsmPrinters.def	Wed Jan 11 12:02:24 2017 +0000
@@ -24,6 +24,12 @@
 #  error Please define the macro LLVM_ASM_PRINTER(TargetName)
 #endif
 
-LLVM_ASM_PRINTER(X86) LLVM_ASM_PRINTER(PowerPC) LLVM_ASM_PRINTER(Sparc) LLVM_ASM_PRINTER(AArch64) LLVM_ASM_PRINTER(ARM) LLVM_ASM_PRINTER(Mips) 
+LLVM_ASM_PRINTER(Mips)
+LLVM_ASM_PRINTER(ARM)
+LLVM_ASM_PRINTER(AArch64)
+LLVM_ASM_PRINTER(Sparc)
+LLVM_ASM_PRINTER(PowerPC)
+LLVM_ASM_PRINTER(X86)
+
 
 #undef LLVM_ASM_PRINTER
--- a/external/bsd/llvm/config/llvm/Config/Disassemblers.def	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/config/llvm/Config/Disassemblers.def	Wed Jan 11 12:02:24 2017 +0000
@@ -24,6 +24,12 @@
 #  error Please define the macro LLVM_DISASSEMBLER(TargetName)
 #endif
 
-LLVM_DISASSEMBLER(X86) LLVM_DISASSEMBLER(PowerPC) LLVM_DISASSEMBLER(Sparc) LLVM_DISASSEMBLER(AArch64) LLVM_DISASSEMBLER(ARM) LLVM_DISASSEMBLER(Mips) 
+LLVM_DISASSEMBLER(Mips)
+LLVM_DISASSEMBLER(ARM)
+LLVM_DISASSEMBLER(AArch64)
+LLVM_DISASSEMBLER(Sparc)
+LLVM_DISASSEMBLER(PowerPC)
+LLVM_DISASSEMBLER(X86)
+
 
 #undef LLVM_DISASSEMBLER
--- a/external/bsd/llvm/config/llvm/Config/Targets.def	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/config/llvm/Config/Targets.def	Wed Jan 11 12:02:24 2017 +0000
@@ -23,6 +23,12 @@
 #  error Please define the macro LLVM_TARGET(TargetName)
 #endif
 
-LLVM_TARGET(X86) LLVM_TARGET(PowerPC) LLVM_TARGET(Sparc) LLVM_TARGET(AArch64) LLVM_TARGET(ARM) LLVM_TARGET(Mips) 
+LLVM_TARGET(Mips)
+LLVM_TARGET(ARM)
+LLVM_TARGET(AArch64)
+LLVM_TARGET(Sparc)
+LLVM_TARGET(PowerPC)
+LLVM_TARGET(X86)
+
 
 #undef LLVM_TARGET
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/config/llvm/Config/abi-breaking.h	Wed Jan 11 12:02:24 2017 +0000
@@ -0,0 +1,42 @@
+/* include/llvm/Config/abi-breaking.h.  Generated from abi-breaking.h.in by configure.  */
+/*===------- llvm/Config/abi-breaking.h - llvm configuration -------*- C -*-===*/
+/*                                                                            */
+/*                     The LLVM Compiler Infrastructure                       */
+/*                                                                            */
+/* This file is distributed under the University of Illinois Open Source      */
+/* License. See LICENSE.TXT for details.                                      */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+/* This file controls the C++ ABI break introduced in LLVM public header. */
+
+#ifndef LLVM_ABI_BREAKING_CHECKS_H
+#define LLVM_ABI_BREAKING_CHECKS_H
+
+/* Define to enable checks that alter the LLVM C++ ABI */
+#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
+
+// ABI_BREAKING_CHECKS protection: provides link-time failure when clients build
+// mismatch with LLVM
+#if defined(_MSC_VER)
+// Use pragma with MSVC
+#define LLVM_XSTR(s) LLVM_STR(s)
+#define LLVM_STR(s) #s
+#pragma detect_mismatch("LLVM_ENABLE_ABI_BREAKING_CHECKS", LLVM_XSTR(LLVM_ENABLE_ABI_BREAKING_CHECKS))
+/* #undef LLVM_XSTR */
+/* #undef LLVM_STR */
+#elif defined(_WIN32) || defined(__CYGWIN__) // Win32 w/o #pragma detect_mismatch
+// FIXME: Implement checks without weak.
+#elif defined(__cplusplus)
+namespace llvm {
+#if LLVM_ENABLE_ABI_BREAKING_CHECKS
+extern int EnableABIBreakingChecks;
+__attribute__((weak, visibility ("hidden"))) int *VerifyEnableABIBreakingChecks = &EnableABIBreakingChecks;
+#else
+extern int DisableABIBreakingChecks;
+__attribute__((weak, visibility ("hidden"))) int *VerifyDisableABIBreakingChecks = &DisableABIBreakingChecks;
+#endif
+}
+#endif // _MSC_VER
+
+#endif
--- a/external/bsd/llvm/config/llvm/Config/config.h.in	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/config/llvm/Config/config.h.in	Wed Jan 11 12:02:24 2017 +0000
@@ -10,11 +10,18 @@
 /* Bug report URL. */
 #define BUG_REPORT_URL "http://llvm.org/bugs/"
 
+/* Default C++ stdlib to use. */
+#define CLANG_DEFAULT_CXX_STDLIB ""
+
+/* Default linker to use (linker name or absolute path, empty for platform
+   default) */
+#define CLANG_DEFAULT_LINKER ""
+
 /* Default OpenMP runtime used by -fopenmp. */
 #define CLANG_DEFAULT_OPENMP_RUNTIME "libomp"
 
-/* Define if we have libxml2 */
-/* #undef CLANG_HAVE_LIBXML */
+/* Default runtime library to use. */
+#define CLANG_DEFAULT_RTLIB ""
 
 /* Multilib suffix for libdir. */
 #define CLANG_LIBDIR_SUFFIX ""
@@ -23,22 +30,19 @@
 #define CLANG_RESOURCE_DIR ""
 
 /* Directories clang will search for headers */
-#define C_INCLUDE_DIRS "/usr/include/clang-3.8:/usr/include"
+#define C_INCLUDE_DIRS "/usr/include/clang-4.0:/usr/include"
 
 /* Default <path> to all compiler invocations for --sysroot=<path>. */
 #define DEFAULT_SYSROOT ""
 
-/* Define if you want backtraces on crash */
+/* Define to 1 to enable backtraces, and to 0 otherwise. */
 #define ENABLE_BACKTRACES 1
 
-/* Define to enable crash handling overrides */
+/* Define to 1 to enable crash overrides, and to 0 otherwise. */
 #define ENABLE_CRASH_OVERRIDES 1
 
-/* Define if position independent code is enabled */
-#define ENABLE_PIC 1
-
-/* Define if timestamp information (e.g., __DATE__) is allowed */
-#define ENABLE_TIMESTAMPS 0
+/* enable x86 relax relocations by default */
+#define ENABLE_X86_RELAX_RELOCATIONS 0
 
 /* Directory where gcc is installed. */
 #define GCC_INSTALL_PREFIX ""
@@ -52,9 +56,6 @@
 /* can use __crashreporter_info__ */
 #define HAVE_CRASHREPORTER_INFO 0
 
-/* Define to 1 if you have the <cxxabi.h> header file. */
-#define HAVE_CXXABI_H 1
-
 /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
    don't. */
 #define HAVE_DECL_ARC4RANDOM 1
@@ -71,6 +72,9 @@
    don't. */
 #define HAVE_DECL_STRERROR_S 0
 
+/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */
+#define HAVE_DIA_SDK 0
+
 /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
    */
 #define HAVE_DIRENT_H 1
@@ -81,9 +85,6 @@
 /* Define if dlopen() is available on this platform. */
 #define HAVE_DLOPEN 1
 
-/* Define if the dot program is available */
-/* #undef HAVE_DOT */
-
 /* Define to 1 if you have the <errno.h> header file. */
 #define HAVE_ERRNO_H 1
 
@@ -135,15 +136,9 @@
 /* Define to 1 if you have the `isatty' function. */
 #define HAVE_ISATTY 1
 
-/* Define if libedit is available on this platform. */
+/* Define to 1 if you have the `edit' library (-ledit). */
 #define HAVE_LIBEDIT 1
 
-/* Define to 1 if you have the `m' library (-lm). */
-#define HAVE_LIBM 1
-
-/* Define to 1 if you have the `ole32' library (-lole32). */
-/* #undef HAVE_LIBOLE32 */
-
 /* Define to 1 if you have the `psapi' library (-lpsapi). */
 /* #undef HAVE_LIBPSAPI */
 
@@ -153,29 +148,19 @@
 /* Define to 1 if you have the `shell32' library (-lshell32). */
 /* #undef HAVE_LIBSHELL32 */
 
-/* Define to 1 if you have the `uuid' library (-luuid). */
-/* #undef HAVE_LIBUUID */
-
 /* Define to 1 if you have the `z' library (-lz). */
 #define HAVE_LIBZ 1
 
-/* Define if you can use -rdynamic. */
-#define HAVE_LINK_EXPORT_DYNAMIC 1
-
 /* Define to 1 if you have the <link.h> header file. */
 #define HAVE_LINK_H 1
 
-/* Define if you can use -Wl,-R. to pass -R. to the linker, in order to add
-   the current directory to the dynamic linker search path. */
-#define HAVE_LINK_R 1
-
-/* Define to 1 if you have the `longjmp' function. */
-/* #undef HAVE_LONGJMP */
-
 /* Define to 1 if you have the <mach/mach.h> header file. */
 /* #undef HAVE_MACH_MACH_H */
 
-/* Define if mallinfo() is available on this platform. */
+/* Define to 1 if you have the `mallctl' function. */
+/* #undef HAVE_MALLCTL */
+
+/* Define to 1 if you have the `mallinfo' function. */
 /* #undef HAVE_MALLINFO */
 
 /* Define to 1 if you have the <malloc.h> header file. */
@@ -199,28 +184,18 @@
 /* Define to 1 if you have the `mktemp' function. */
 #define HAVE_MKTEMP 1
 
-/* Define to 1 if you have a working `mmap' system call. */
-#define HAVE_MMAP 1
-
-/* Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine if
-   it uses MAP_ANON */
-#define HAVE_MMAP_ANONYMOUS 1
-
-/* Define if mmap() can map files into memory */
-#define HAVE_MMAP_FILE 
-
 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
 /* #undef HAVE_NDIR_H */
 
+/* Define to 1 if you have the `posix_fallocate' function. */
+#define HAVE_POSIX_FALLOCATE 1
+
 /* Define to 1 if you have the `posix_spawn' function. */
 #define HAVE_POSIX_SPAWN 1
 
 /* Define to 1 if you have the `pread' function. */
 #define HAVE_PREAD 1
 
-/* Define to have the %a format string */
-#define HAVE_PRINTF_A 1
-
 /* Have pthread_getspecific */
 #define HAVE_PTHREAD_GETSPECIFIC 1
 
@@ -242,15 +217,12 @@
 /* Define to 1 if you have the `setenv' function. */
 #define HAVE_SETENV 1
 
-/* Define to 1 if you have the `setjmp' function. */
-/* #undef HAVE_SETJMP */
-
-/* Define to 1 if you have the <setjmp.h> header file. */
-#define HAVE_SETJMP_H 1
-
 /* Define to 1 if you have the `setrlimit' function. */
 #define HAVE_SETRLIMIT 1
 
+/* Define to 1 if you have the `sigaltstack' function. */
+#define HAVE_SIGALTSTACK 1
+
 /* Define to 1 if you have the <signal.h> header file. */
 #define HAVE_SIGNAL_H 1
 
@@ -275,9 +247,6 @@
 /* Define to 1 if you have the `strtoll' function. */
 #define HAVE_STRTOLL 1
 
-/* Define to 1 if you have the `strtoq' function. */
-#define HAVE_STRTOQ 1
-
 /* Define to 1 if you have the `sysconf' function. */
 #define HAVE_SYSCONF 1
 
@@ -340,6 +309,12 @@
 /* Have host's _alloca */
 /* #undef HAVE__ALLOCA */
 
+/* Define to 1 if you have the `_chsize_s' function. */
+/* #undef HAVE__CHSIZE_S */
+
+/* Define to 1 if you have the `_Unwind_Backtrace' function. */
+#define HAVE__UNWIND_BACKTRACE 1
+
 /* Have host's __alloca */
 /* #undef HAVE___ALLOCA */
 
@@ -361,9 +336,6 @@
 /* Have host's __divdi3 */
 /* #undef HAVE___DIVDI3 */
 
-/* Define to 1 if you have the `__dso_handle' function. */
-#define HAVE___DSO_HANDLE 1
-
 /* Have host's __fixdfdi */
 /* #undef HAVE___FIXDFDI */
 
@@ -397,48 +369,27 @@
 /* Linker version detected at compile time. */
 #define HOST_LINK_VERSION "1"
 
-/* Installation directory for binary executables */
-#define LLVM_BINDIR "/usr/bin"
-
-/* Time at which LLVM was configured */
-#define LLVM_CONFIGTIME "(timestamp not enabled)"
-
-/* Installation directory for data files */
-#define LLVM_DATADIR "/usr/share/llvm"
+/* Define if we link Polly to the tools */
+/* #undef LINK_POLLY_INTO_TOOLS */
 
 /* Target triple LLVM will generate code for by default */
 #define LLVM_DEFAULT_TARGET_TRIPLE "x86_64--netbsd"
 
-/* Installation directory for documentation */
-#define LLVM_DOCSDIR "/usr/share/doc/llvm"
-
-/* Define to enable checks that alter the LLVM C++ ABI */
-#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
+/* Define to 1 to checks for ABI changes, and to 0 otherwise. */
+#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
 
 /* Define if threads enabled */
 #define LLVM_ENABLE_THREADS 1
 
-/* Define if zlib is enabled */
+/* Define if zlib compression is available */
 #define LLVM_ENABLE_ZLIB 1
 
-/* Installation directory for config files */
-#define LLVM_ETCDIR "/usr/etc/llvm"
-
 /* Has gcc/MSVC atomic intrinsics */
 #define LLVM_HAS_ATOMICS 1
 
 /* Host triple LLVM will be executed on */
 #define LLVM_HOST_TRIPLE "x86_64--netbsd"
 
-/* Installation directory for include files */
-#define LLVM_INCLUDEDIR "/usr/include"
-
-/* Installation directory for .info files */
-#define LLVM_INFODIR "/usr/info"
-
-/* Installation directory for man pages */
-#define LLVM_MANDIR "/usr/man"
-
 /* LLVM architecture name for the native architecture, if available */
 #define LLVM_NATIVE_ARCH X86
 
@@ -466,9 +417,6 @@
 /* Define if this is Win32ish platform */
 /* #undef LLVM_ON_WIN32 */
 
-/* Define to path to dot program if found or 'echo dot' otherwise */
-/* #undef LLVM_PATH_DOT */
-
 /* Installation prefix directory */
 #define LLVM_PREFIX "/usr"
 
@@ -478,25 +426,24 @@
 /* Define if we have the oprofile JIT-support library */
 #define LLVM_USE_OPROFILE 0
 
+/* LLVM version information */
+/* #undef LLVM_VERSION_INFO */
+
 /* Major version of the LLVM API */
-#define LLVM_VERSION_MAJOR 3
+#define LLVM_VERSION_MAJOR 4
 
 /* Minor version of the LLVM API */
-#define LLVM_VERSION_MINOR 8
+#define LLVM_VERSION_MINOR 0
 
 /* Patch version of the LLVM API */
 #define LLVM_VERSION_PATCH 0
 
 /* LLVM version string */
-#define LLVM_VERSION_STRING "3.8.0"
+#define LLVM_VERSION_STRING "4.0.0svn"
 
-/* The shared library extension */
+/* Define to the extension used for shared libraries, say, ".so". */
 #define LTDL_SHLIB_EXT ".so"
 
-/* Define if /dev/zero should be used when mapping RWX memory, or undefine if
-   its not necessary */
-/* #undef NEED_DEV_ZERO_FOR_MMAP */
-
 /* Define to the address where bug reports for this package should be sent. */
 #define PACKAGE_BUGREPORT "http://llvm.org/bugs/"
 
@@ -504,13 +451,16 @@
 #define PACKAGE_NAME "LLVM"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "LLVM 3.8.0"
+#define PACKAGE_STRING "LLVM 4.0.0svn"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "llvm"
 
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "3.8.0"
+#define PACKAGE_VERSION "4.0.0svn"
 
 /* Define as the return type of signal handlers (`int' or `void'). */
 #define RETSIGTYPE void
@@ -527,9 +477,6 @@
 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
 /* #undef TM_IN_SYS_TIME */
 
-/* Type of 1st arg on ELM Callback */
-/* #undef WIN32_ELMCB_PCSTR */
-
 /* Define to `int' if <sys/types.h> does not define. */
 /* #undef pid_t */
 
--- a/external/bsd/llvm/config/llvm/Config/llvm-config.h.in	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/config/llvm/Config/llvm-config.h.in	Wed Jan 11 12:02:24 2017 +0000
@@ -15,45 +15,24 @@
 #ifndef LLVM_CONFIG_H
 #define LLVM_CONFIG_H
 
-/* Installation directory for binary executables */
-#define LLVM_BINDIR "/usr/bin"
-
-/* Time at which LLVM was configured */
-#define LLVM_CONFIGTIME "(timestamp not enabled)"
-
-/* Installation directory for data files */
-#define LLVM_DATADIR "/usr/share/llvm"
+/* Define if we link Polly to the tools */
+/* #undef LINK_POLLY_INTO_TOOLS */
 
 /* Target triple LLVM will generate code for by default */
 #define LLVM_DEFAULT_TARGET_TRIPLE "x86_64--netbsd"
 
-/* Installation directory for documentation */
-#define LLVM_DOCSDIR "/usr/share/doc/llvm"
-
 /* Define to enable checks that alter the LLVM C++ ABI */
-#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
+#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
 
 /* Define if threads enabled */
 #define LLVM_ENABLE_THREADS 1
 
-/* Installation directory for config files */
-#define LLVM_ETCDIR "/usr/etc/llvm"
-
 /* Has gcc/MSVC atomic intrinsics */
 #define LLVM_HAS_ATOMICS 1
 
 /* Host triple LLVM will be executed on */
 #define LLVM_HOST_TRIPLE "x86_64--netbsd"
 
-/* Installation directory for include files */
-#define LLVM_INCLUDEDIR "/usr/include"
-
-/* Installation directory for .info files */
-#define LLVM_INFODIR "/usr/info"
-
-/* Installation directory for man pages */
-#define LLVM_MANDIR "/usr/man"
-
 /* LLVM architecture name for the native architecture, if available */
 #define LLVM_NATIVE_ARCH X86
 
@@ -91,15 +70,15 @@
 #define LLVM_USE_OPROFILE 0
 
 /* Major version of the LLVM API */
-#define LLVM_VERSION_MAJOR 3
+#define LLVM_VERSION_MAJOR 4
 
 /* Minor version of the LLVM API */
-#define LLVM_VERSION_MINOR 8
+#define LLVM_VERSION_MINOR 0
 
 /* Patch version of the LLVM API */
 #define LLVM_VERSION_PATCH 0
 
 /* LLVM version string */
-#define LLVM_VERSION_STRING "3.8.0"
+#define LLVM_VERSION_STRING "4.0.0svn"
 
 #endif
--- a/external/bsd/llvm/config/llvm/Support/DataTypes.h	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/config/llvm/Support/DataTypes.h	Wed Jan 11 12:02:24 2017 +0000
@@ -102,6 +102,13 @@
 #define PRIu64 "I64u"
 #define PRIx64 "I64x"
 #define PRIX64 "I64X"
+
+#define PRId32 "d"
+#define PRIi32 "i"
+#define PRIo32 "o"
+#define PRIu32 "u"
+#define PRIx32 "x"
+#define PRIX32 "X"
 #endif /* HAVE_INTTYPES_H */
 
 #endif /* _MSC_VER */
--- a/external/bsd/llvm/include/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/include/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.39 2016/02/27 21:47:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.40 2017/01/11 12:02:28 joerg Exp $
 
 .include <bsd.init.mk>
 
@@ -15,12 +15,19 @@
 	avx512dqintrin.h \
 	avx512fintrin.h \
 	avx512erintrin.h \
+	avx512ifmaintrin.h \
+	avx512ifmavlintrin.h \
+	avx512pfintrin.h \
+	avx512vbmiintrin.h \
+	avx512vbmivlintrin.h \
 	avx512vlbwintrin.h \
+	avx512vlcdintrin.h \
 	avx512vldqintrin.h \
 	avx512vlintrin.h \
 	avxintrin.h \
 	bmi2intrin.h \
 	bmiintrin.h \
+	clflushoptintrin.h \
 	cpuid.h \
 	emmintrin.h \
 	f16cintrin.h \
@@ -33,6 +40,7 @@
 	mm3dnow.h \
 	mmintrin.h \
 	mm_malloc.h \
+	mwaitxintrin.h \
 	nmmintrin.h \
 	pkuintrin.h \
 	pmmintrin.h \
@@ -61,6 +69,8 @@
 .elif ${MACHINE_CPU} == "arm"
 INCS=	arm_acle.h \
 	arm_neon.h
+.elif ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "mips64"
+INCS=	msa.h
 .endif
 INCS+=	stdalign.h stdatomic.h stdnoreturn.h
 INCSDIR=	/usr/include/clang-${CLANG_VERSION:R}
@@ -68,19 +78,20 @@
 .PATH:	${LLVM_SRCDIR}/include/llvm/IR \
 	${CLANG_SRCDIR}/include/clang/AST \
 	${CLANG_SRCDIR}/include/clang/Basic \
-	${CLANG_SRCDIR}/include/clang/Driver
+	${CLANG_SRCDIR}/include/clang/Driver \
+	${CLANG_SRCDIR}/include/clang/StaticAnalyzer/Checkers
 
 TABLEGEN_SRC=	Attributes.td Intrinsics.td Options.td
 
 TABLEGEN_OUTPUT.Attributes.td= \
-	llvm/IR/Attributes.inc|-gen-attrs
+	llvm/IR/Attributes.gen|-gen-attrs
 
 TABLEGEN_OUTPUT.Intrinsics.td= \
 	llvm/IR/Intrinsics.gen|-gen-intrinsic
 
 CLANG_TABLEGEN_SRC=	Attr.td CommentCommands.td CommentHTMLTags.td \
 	CommentNodes.td CommentHTMLNamedCharacterReferences.td DeclNodes.td \
-	StmtNodes.td Diagnostic.td arm_neon.td
+	StmtNodes.td Diagnostic.td arm_neon.td Checkers.td
 
 CLANG_TABLEGEN_INCLUDES.Attr.td=	-I${CLANG_SRCDIR}/include
 CLANG_TABLEGEN_OUTPUT.Attr.td= \
@@ -138,6 +149,10 @@
 	clang/Basic/arm_neon.inc|-gen-arm-neon-sema \
 	arm_neon.h|-gen-arm-neon
 
+CLANG_TABLEGEN_INCLUDES.Checkers.td=	-I${CLANG_SRCDIR}/include
+CLANG_TABLEGEN_OUTPUT.Checkers.td= \
+	clang/StaticAnalyzer/Checkers/Checkers.inc|-gen-clang-sa-checkers
+
 TABLEGEN_INCLUDES.Options.td=	-I${CLANG_SRCDIR}/include/clang/Driver
 TABLEGEN_OUTPUT.Options.td= \
 	clang/Driver/Options.inc|-gen-opt-parser-defs
@@ -150,8 +165,10 @@
 clang/Basic/Version.inc: ${LLVM_TOPLEVEL}/Makefile.inc
 	mkdir -p ${.TARGET:H}
 	printf '#define CLANG_VERSION ${CLANG_VERSION}\n' > ${.TARGET}.tmp
+	printf '#define CLANG_VERSION_STRING "${CLANG_VERSION}"\n' >> ${.TARGET}.tmp
 	printf '#define CLANG_VERSION_MAJOR ${CLANG_VERSION:R:R}\n' >> ${.TARGET}.tmp
 	printf '#define CLANG_VERSION_MINOR ${CLANG_VERSION:R:E}\n' >> ${.TARGET}.tmp
+	printf '#define CLANG_VERSION_PATCHLEVEL ${CLANG_VERSION:R:R}\n' >> ${.TARGET}.tmp
 	mv ${.TARGET}.tmp ${.TARGET}
 
 lld/Config/Version.inc: ${LLVM_TOPLEVEL}/Makefile.inc
@@ -187,6 +204,7 @@
 	printf '#define PACKAGE_VERSION "${LLVM_VERSION} (trunk ${LLVM_REVISION})"\n' >> ${.TARGET}.tmp
 	printf '#define LLVM_VERSION_MAJOR ${LLVM_VERSION:R:R}\n' >> ${.TARGET}.tmp
 	printf '#define LLVM_VERSION_MINOR ${LLVM_VERSION:R:E}\n' >> ${.TARGET}.tmp
+	printf '#define LLVM_VERSION_PATCH ${LLVM_VERSION:E}\n' >> ${.TARGET}.tmp
 	printf '#define LLVM_VERSION_STRING "${LLVM_VERSION}"\n' >> ${.TARGET}.tmp
 	printf '#endif\n' >> ${.TARGET}.tmp
 	mv ${.TARGET}.tmp ${.TARGET}
@@ -200,6 +218,7 @@
 	printf '#define LLVM_DEFAULT_TARGET_TRIPLE "${MACHINE_GNU_PLATFORM}"\n' >> ${.TARGET}.tmp
 	printf '#define LLVM_VERSION_MAJOR ${LLVM_VERSION:R:R}\n' >> ${.TARGET}.tmp
 	printf '#define LLVM_VERSION_MINOR ${LLVM_VERSION:R:E}\n' >> ${.TARGET}.tmp
+	printf '#define LLVM_VERSION_PATCH ${LLVM_VERSION:E}\n' >> ${.TARGET}.tmp
 	printf '#define LLVM_VERSION_STRING "${LLVM_VERSION}"\n' >> ${.TARGET}.tmp
 	printf '#endif\n' >> ${.TARGET}.tmp
 	mv ${.TARGET}.tmp ${.TARGET}
@@ -207,14 +226,14 @@
 run-configure:
 	[ ! -d tmp ] || rm -r tmp
 	mkdir -p tmp
-	cd tmp && ${LLVM_SRCDIR}/configure ${LLVM_CONFIGURE_ARGS} \
+	cd tmp && CONFIG_SITE= ${CONFIG_DIR}/configure ${LLVM_CONFIGURE_ARGS} \
 	    CC=${CC:Q} CFLAGS=${CFLAGS:N-Werror:Q} CXX=${CXX:Q} CXXFLAGS=${CXXFLAGS:N-Werror:Q} \
 	    CPPFLAGS=${CPPFLAGS:N-std=c++11:Q} LDFLAGS=${LDFLAGS:Q} LD=${LD:Q} LIBS=${NATIVE_LIBS:Q} \
-	    ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_mmap_file=yes llvm_cv_c_printf_a=yes
+	    BUILD_CC=${CC:Q} BUILD_CXX=${CXX:Q}
 	cp -r tmp/include/llvm/* ${LLVM_INCLUDE_CONFIG}/llvm/
 	mv ${LLVM_INCLUDE_CONFIG}/llvm/Config/llvm-config.h \
 	   ${LLVM_INCLUDE_CONFIG}/llvm/Config/llvm-config.h.in
-	cp -r tmp/tools/clang/include/clang/* ${CLANG_INCLUDE_CONFIG}/clang/
+	cp -r tmp/include/clang/* ${CLANG_INCLUDE_CONFIG}/clang/
 	rm -r tmp
 	mv ${LLVM_INCLUDE_CONFIG}/llvm/Config/config.h \
 	    ${LLVM_INCLUDE_CONFIG}/llvm/Config/config.h.in
--- a/external/bsd/llvm/lib/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.43 2016/02/27 21:47:32 joerg Exp $
+# $NetBSD: Makefile,v 1.44 2017/01/11 12:02:28 joerg Exp $
 
 .include <bsd.own.mk>
 
@@ -9,11 +9,16 @@
 	libLLVMBitReader \
 	libLLVMBitWriter \
 	libLLVMCodeGen \
+	libLLVMDebugInfoCodeView \
+	libLLVMDebugInfoMSF \
+	libLLVMDemangle \
+	libLLVMGlobalISel \
 	libLLVMIR \
 	libLLVMIRReader \
 	libLLVMInstCombine \
 	libLLVMInstrumentation \
 	libLLVMipo \
+	libLLVMLTO \
 	libLLVMLinker \
 	libLLVMMC \
 	libLLVMMCDisassembler \
@@ -21,12 +26,15 @@
 	libLLVMObjCARC \
 	libLLVMObject \
 	libLLVMOption \
+	libLLVMPasses \
 	libLLVMProfileData \
+	libLLVMProfileDataCoverage \
 	libLLVMScalarOpts \
 	libLLVMSelectionDAG \
 	libLLVMSupport \
 	libLLVMTableGen \
 	libLLVMTarget \
+	libLLVMTransformsCoroutines \
 	libLLVMTransformsUtils \
 	libLLVMVectorize \
 	libLLVMAArch64CodeGen \
@@ -87,34 +95,32 @@
 	libLLVMExecutionEngine \
 	libLLVMMCJIT \
 	libLLVMMIRParser \
-	libLLVMPasses \
 	libLLVMOrc \
 	libLLVMRuntimeDyld
 .endif
 
 .if (${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes") || ${MKLLD} == "yes"
 SUBDIR+= \
-	libLLVMDebugInfoCodeView \
 	libLLVMDebugInfoDWARF \
 	libLLVMDebugInfoPDB \
+	libLLVMDebugInfoPDBRaw \
 	libLLVMDebugInfoSymbolize
 .endif
 
 .if ${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes"
 SUBDIR+= \
-	libLLVMCppBackend \
-	libLLVMCppBackendInfo \
 	libLLVMHello \
 	libLLVMInterpreter \
-	libLLVMLTO \
 	libLLVMLibDriver \
-	libLLVMLineEditor
+	libLLVMLineEditor \
+	libLLVMObjectYAML
 .endif
 
 SUBDIR+= \
 	libclangAnalysis \
 	libclangARCMigrate \
 	libclangAST \
+	libclangASTMatchers \
 	libclangBasic \
 	libclangCodeGen \
 	libclangDriver \
@@ -134,7 +140,6 @@
 
 .if ${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes"
 SUBDIR+= \
-	libclangASTMatchers \
 	libclangASTMatchersDynamic \
 	libclangFormat \
 	libclangIndex \
--- a/external/bsd/llvm/lib/libLLVMAArch64CodeGen/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMAArch64CodeGen/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2015/01/29 20:41:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2017/01/11 12:02:28 joerg Exp $
 
 LIB=	LLVMAArch64CodeGen
 
@@ -8,12 +8,17 @@
 
 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 \
-	AArch64BranchRelaxation.cpp \
 	AArch64CleanupLocalDynamicTLSPass.cpp \
 	AArch64CollectLOH.cpp \
 	AArch64ConditionOptimizer.cpp \
@@ -29,13 +34,15 @@
 	AArch64MCInstLower.cpp \
 	AArch64PBQPRegAlloc.cpp \
 	AArch64PromoteConstant.cpp \
+	AArch64RedundantCopyElimination.cpp \
 	AArch64RegisterInfo.cpp \
 	AArch64SelectionDAGInfo.cpp \
 	AArch64StorePairSuppress.cpp \
 	AArch64Subtarget.cpp \
 	AArch64TargetMachine.cpp \
 	AArch64TargetObjectFile.cpp \
-	AArch64TargetTransformInfo.cpp
+	AArch64TargetTransformInfo.cpp \
+	AArch64VectorByElementOpt.cpp
 
 TABLEGEN_SRC=		AArch64.td
 TABLEGEN_INCLUDES=	-I${LLVM_SRCDIR}/lib/Target/AArch64
@@ -51,7 +58,8 @@
 	AArch64GenMCCodeEmitter.inc|-gen-emitter \
 	AArch64GenMCPseudoLowering.inc|-gen-pseudo-lowering \
 	AArch64GenRegisterInfo.inc|-gen-register-info \
-	AArch64GenSubtargetInfo.inc|-gen-subtarget
+	AArch64GenSubtargetInfo.inc|-gen-subtarget \
+	AArch64GenSystemOperands.inc|-gen-searchable-tables
 
 .include "${.PARSEDIR}/../../tablegen.mk"
 
--- a/external/bsd/llvm/lib/libLLVMARMCodeGen/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMARMCodeGen/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2016/02/27 21:47:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.16 2017/01/11 12:02:28 joerg Exp $
 
 LIB=	LLVMARMCodeGen
 
@@ -6,9 +6,16 @@
 
 .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 \
+	ARMComputeBlockSize.cpp \
 	ARMConstantIslandPass.cpp \
 	ARMConstantPoolValue.cpp \
 	ARMExpandPseudoInsts.cpp \
--- a/external/bsd/llvm/lib/libLLVMAnalysis/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMAnalysis/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21 2016/02/27 21:47:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.22 2017/01/11 12:02:28 joerg Exp $
 
 LIB=	LLVMAnalysis
 
@@ -8,6 +8,7 @@
 
 SRCS+=	AliasAnalysis.cpp \
 	AliasAnalysisEvaluator.cpp \
+	AliasAnalysisSummary.cpp \
 	AliasSetTracker.cpp \
 	Analysis.cpp \
 	AssumptionCache.cpp \
@@ -17,7 +18,8 @@
 	BranchProbabilityInfo.cpp \
 	CFG.cpp \
 	CFGPrinter.cpp \
-	CFLAliasAnalysis.cpp \
+	CFLAndersAliasAnalysis.cpp \
+	CFLSteensAliasAnalysis.cpp \
 	CGSCCPassManager.cpp \
 	CallGraphSCCPass.cpp \
 	CallGraph.cpp \
@@ -35,12 +37,15 @@
 	EHPersonalities.cpp \
 	GlobalsModRef.cpp \
 	IVUsers.cpp \
+	IndirectCallPromotionAnalysis.cpp \
 	InlineCost.cpp \
 	InstCount.cpp \
 	InstructionSimplify.cpp \
 	Interval.cpp \
 	IntervalPartition.cpp \
 	IteratedDominanceFrontier.cpp \
+	LazyBlockFrequencyInfo.cpp \
+	LazyBranchProbabilityInfo.cpp \
 	LazyCallGraph.cpp \
 	LazyValueInfo.cpp \
 	Lint.cpp \
@@ -48,18 +53,23 @@
 	LoopAccessAnalysis.cpp \
 	LoopInfo.cpp \
 	LoopPass.cpp \
+	LoopPassManager.cpp \
+	LoopUnrollAnalyzer.cpp \
 	MemDepPrinter.cpp \
 	MemDerefPrinter.cpp \
 	MemoryBuiltins.cpp \
 	MemoryDependenceAnalysis.cpp \
 	MemoryLocation.cpp \
 	ModuleDebugInfoPrinter.cpp \
+	ModuleSummaryAnalysis.cpp \
 	ObjCARCAliasAnalysis.cpp \
 	ObjCARCAnalysisUtils.cpp \
 	ObjCARCInstKind.cpp \
+	OptimizationDiagnosticInfo.cpp \
 	OrderedBasicBlock.cpp \
 	PHITransAddr.cpp \
 	PostDominators.cpp \
+	ProfileSummaryInfo.cpp \
 	PtrUseVisitor.cpp \
 	RegionInfo.cpp \
 	RegionPass.cpp \
@@ -74,6 +84,7 @@
 	TargetTransformInfo.cpp \
 	Trace.cpp \
 	TypeBasedAliasAnalysis.cpp \
+	TypeMetadataUtils.cpp \
 	ValueTracking.cpp \
 	VectorUtils.cpp
 
--- a/external/bsd/llvm/lib/libLLVMAsmPrinter/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMAsmPrinter/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2016/02/27 21:47:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.15 2017/01/11 12:02:28 joerg Exp $
 
 LIB=	LLVMAsmPrinter
 
@@ -11,9 +11,11 @@
 	AsmPrinter.cpp \
 	AsmPrinterDwarf.cpp \
 	AsmPrinterInlineAsm.cpp \
+	CodeViewDebug.cpp \
 	DIE.cpp \
 	DIEHash.cpp \
 	DbgValueHistoryCalculator.cpp \
+	DebugHandlerBase.cpp \
 	DebugLocStream.cpp \
 	DwarfAccelTable.cpp \
 	DwarfCFIException.cpp \
@@ -26,8 +28,7 @@
 	EHStreamer.cpp \
 	ErlangGCPrinter.cpp \
 	OcamlGCPrinter.cpp \
-	WinException.cpp \
-	WinCodeViewLineTables.cpp
+	WinException.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMBitReader/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMBitReader/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2013/02/04 15:00:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2017/01/11 12:02:28 joerg Exp $
 
 LIB=	LLVMBitReader
 
@@ -8,7 +8,9 @@
 
 SRCS+=	BitReader.cpp \
 	BitcodeReader.cpp \
-	BitstreamReader.cpp
+	BitstreamReader.cpp \
+	MetadataLoader.cpp \
+	ValueList.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMCodeGen/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMCodeGen/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.31 2016/02/27 21:47:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.32 2017/01/11 12:02:29 joerg Exp $
 
 LIB=	LLVMCodeGen
 
@@ -12,18 +12,20 @@
 	AtomicExpandPass.cpp \
 	BasicTargetTransformInfo.cpp \
 	BranchFolding.cpp \
+	BranchRelaxation.cpp \
+	BuiltinGCs.cpp \
 	CalcSpillWeights.cpp \
 	CallingConvLower.cpp \
 	CodeGen.cpp \
 	CodeGenPrepare.cpp \
-	CoreCLRGC.cpp \
+	CountingFunctionInserter.cpp \
 	CriticalAntiDepBreaker.cpp \
 	DFAPacketizer.cpp \
 	DeadMachineInstructionElim.cpp \
+	DetectDeadLanes.cpp \
 	DwarfEHPrepare.cpp \
 	EarlyIfConversion.cpp \
 	EdgeBundles.cpp \
-	ErlangGC.cpp \
 	ExecutionDepsFix.cpp \
 	ExpandISelPseudos.cpp \
 	ExpandPostRAPseudos.cpp \
@@ -55,6 +57,8 @@
 	LiveStackAnalysis.cpp \
 	LiveVariables.cpp \
 	LocalStackSlotAllocation.cpp \
+	LowLevelType.cpp \
+	LowerEmuTLS.cpp \
 	MIRPrinter.cpp \
 	MIRPrintingPass.cpp \
 	MachineBasicBlock.cpp \
@@ -67,7 +71,6 @@
 	MachineDominanceFrontier.cpp \
 	MachineDominators.cpp \
 	MachineFunction.cpp \
-	MachineFunctionAnalysis.cpp \
 	MachineFunctionPass.cpp \
 	MachineFunctionPrinterPass.cpp \
 	MachineInstr.cpp \
@@ -77,6 +80,7 @@
 	MachineModuleInfo.cpp \
 	MachineModuleInfoImpls.cpp \
 	MachinePassRegistry.cpp \
+	MachinePipeliner.cpp \
 	MachinePostDominators.cpp \
 	MachineRegionInfo.cpp \
 	MachineRegisterInfo.cpp \
@@ -85,15 +89,16 @@
 	MachineSink.cpp \
 	MachineTraceMetrics.cpp \
 	MachineVerifier.cpp \
-	OcamlGC.cpp \
 	OptimizePHIs.cpp \
 	PHIElimination.cpp \
 	PHIEliminationUtils.cpp \
 	ParallelCG.cpp \
-	Passes.cpp \
+	PatchableFunction.cpp \
 	PeepholeOptimizer.cpp \
 	ScoreboardHazardRecognizer.cpp \
+	PostRAHazardRecognizer.cpp \
 	PostRASchedulerList.cpp \
+	PreISelIntrinsicLowering.cpp \
 	ProcessImplicitDefs.cpp \
 	PrologEpilogInserter.cpp \
 	PseudoSourceValue.cpp \
@@ -102,14 +107,21 @@
 	RegAllocFast.cpp \
 	RegAllocGreedy.cpp \
 	RegAllocPBQP.cpp \
+	RegUsageInfoCollector.cpp \
+	RegUsageInfoPropagate.cpp \
 	RegisterClassInfo.cpp \
 	RegisterCoalescer.cpp \
 	RegisterPressure.cpp \
 	RegisterScavenging.cpp \
+	RegisterUsageInfo.cpp \
+	RenameIndependentSubregs.cpp \
+	ResetMachineFunctionPass.cpp \
+	SafeStack.cpp \
+	SafeStackColoring.cpp \
+	SafeStackLayout.cpp \
 	ScheduleDAG.cpp \
 	ScheduleDAGInstrs.cpp \
 	ScheduleDAGPrinter.cpp \
-	ShadowStackGC.cpp \
 	ShadowStackGCLowering.cpp \
 	ShrinkWrap.cpp \
 	SjLjEHPrepare.cpp \
@@ -121,19 +133,22 @@
 	StackMaps.cpp \
 	StackProtector.cpp \
 	StackSlotColoring.cpp \
-	StatepointExampleGC.cpp \
 	TailDuplication.cpp \
+	TailDuplicator.cpp \
 	TargetFrameLoweringImpl.cpp \
 	TargetInstrInfo.cpp \
 	TargetLoweringBase.cpp \
 	TargetLoweringObjectFileImpl.cpp \
 	TargetOptionsImpl.cpp \
+	TargetPassConfig.cpp \
 	TargetRegisterInfo.cpp \
 	TargetSchedule.cpp \
+	TargetSubtargetInfo.cpp \
 	TwoAddressInstructionPass.cpp \
 	UnreachableBlockElim.cpp \
 	VirtRegMap.cpp \
-	WinEHPrepare.cpp
+	WinEHPrepare.cpp \
+	XRayInstrumentation.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMCppBackend/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-#	$NetBSD: Makefile,v 1.1 2011/02/06 01:13:56 joerg Exp $
-
-LIB=	LLVMCppBackend
-
-.include <bsd.init.mk>
-
-.PATH: ${LLVM_SRCDIR}/lib/Target/CppBackend
-
-SRCS+=	CPPBackend.cpp
-
-.include <bsd.lib.mk>
--- a/external/bsd/llvm/lib/libLLVMCppBackendInfo/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-#	$NetBSD: Makefile,v 1.1 2011/02/06 01:13:56 joerg Exp $
-
-LIB=	LLVMCppBackendInfo
-
-CPPFLAGS+=	-I${LLVM_SRCDIR}/lib/Target/CppBackend
-
-.include <bsd.init.mk>
-
-.PATH: ${LLVM_SRCDIR}/lib/Target/CppBackend/TargetInfo
-
-SRCS+=	CppBackendTargetInfo.cpp
-
-.include <bsd.lib.mk>
--- a/external/bsd/llvm/lib/libLLVMDebugInfoCodeView/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMDebugInfoCodeView/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2016/02/27 21:47:33 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:29 joerg Exp $
 
 LIB=	LLVMDebugInfoCodeView
 
@@ -6,13 +6,22 @@
 
 .PATH: ${LLVM_SRCDIR}/lib/DebugInfo/CodeView
 
-SRCS+=	FieldListRecordBuilder.cpp \
+SRCS+=	CVSymbolVisitor.cpp \
+	CVTypeVisitor.cpp \
+	CodeViewError.cpp \
+	CodeViewRecordIO.cpp \
+	EnumTables.cpp \
 	Line.cpp \
-	MemoryTypeTableBuilder.cpp \
-	MethodListRecordBuilder.cpp \
-	ListRecordBuilder.cpp \
-	TypeRecordBuilder.cpp \
-	TypeTableBuilder.cpp
+	ModuleSubstream.cpp \
+	ModuleSubstreamVisitor.cpp \
+	RecordSerialization.cpp \
+	SymbolDumper.cpp \
+	SymbolRecordMapping.cpp \
+	TypeDumper.cpp \
+	TypeRecord.cpp \
+	TypeRecordMapping.cpp \
+	TypeSerializer.cpp \
+	TypeStreamMerger.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMDebugInfoDWARF/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMDebugInfoDWARF/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2016/02/27 21:47:33 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:29 joerg Exp $
 
 LIB=	LLVMDebugInfoDWARF
 
@@ -18,8 +18,11 @@
 	DWARFDebugLine.cpp \
 	DWARFDebugLoc.cpp \
 	DWARFDebugMacro.cpp \
+	DWARFDebugPubTable.cpp \
 	DWARFDebugRangeList.cpp \
+	DWARFDie.cpp \
 	DWARFFormValue.cpp \
+	DWARFGdbIndex.cpp \
 	DWARFTypeUnit.cpp \
 	DWARFUnit.cpp \
 	DWARFUnitIndex.cpp \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/lib/libLLVMDebugInfoMSF/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -0,0 +1,20 @@
+#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:29 joerg Exp $
+
+LIB=	LLVMDebugInfoMSF
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/lib/DebugInfo/MSF
+
+SRCS+=	MappedBlockStream.cpp \
+	MSFBuilder.cpp \
+	MSFCommon.cpp \
+	MSFError.cpp \
+	StreamReader.cpp \
+	StreamWriter.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
--- a/external/bsd/llvm/lib/libLLVMDebugInfoPDB/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMDebugInfoPDB/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2016/02/27 21:47:33 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:29 joerg Exp $
 
 LIB=	LLVMDebugInfoPDB
 
@@ -6,7 +6,8 @@
 
 .PATH: ${LLVM_SRCDIR}/lib/DebugInfo/PDB
 
-SRCS+=	IPDBSourceFile.cpp \
+SRCS+=	GenericError.cpp \
+	IPDBSourceFile.cpp \
 	PDB.cpp \
 	PDBContext.cpp \
 	PDBExtras.cpp \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/lib/libLLVMDebugInfoPDBRaw/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -0,0 +1,36 @@
+#	$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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/lib/libLLVMDemangle/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -0,0 +1,15 @@
+#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:29 joerg Exp $
+
+LIB=	LLVMDemangle
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/lib/Demangle
+
+SRCS+=	ItaniumDemangle.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/external/bsd/llvm/lib/libLLVMGlobalISel/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -0,0 +1,27 @@
+#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:29 joerg Exp $
+
+LIB=	LLVMGlobalISel
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/lib/CodeGen/GlobalISel
+
+SRCS+=	CallLowering.cpp \
+	GlobalISel.cpp \
+	InstructionSelect.cpp \
+	InstructionSelector.cpp \
+	IRTranslator.cpp \
+	MachineIRBuilder.cpp \
+	Legalizer.cpp \
+	LegalizerHelper.cpp \
+	LegalizerInfo.cpp \
+	RegBankSelect.cpp \
+	RegisterBank.cpp \
+	RegisterBankInfo.cpp \
+	Utils.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
--- a/external/bsd/llvm/lib/libLLVMIR/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMIR/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2016/02/27 21:47:33 joerg Exp $
+#	$NetBSD: Makefile,v 1.11 2017/01/11 12:02:29 joerg Exp $
 
 LIB=	LLVMIR
 
@@ -28,7 +28,6 @@
 	DiagnosticPrinter.cpp \
 	Dominators.cpp \
 	Function.cpp \
-	FunctionInfo.cpp \
 	GCOV.cpp \
 	GVMaterializer.cpp \
 	Globals.cpp \
@@ -45,10 +44,13 @@
 	Mangler.cpp \
 	Metadata.cpp \
 	Module.cpp \
+	ModuleSummaryIndex.cpp \
 	Operator.cpp \
+	OptBisect.cpp \
 	Pass.cpp \
 	PassManager.cpp \
 	PassRegistry.cpp \
+	ProfileSummary.cpp \
 	Statepoint.cpp \
 	Type.cpp \
 	TypeFinder.cpp \
--- a/external/bsd/llvm/lib/libLLVMInstrumentation/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMInstrumentation/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2016/02/27 21:47:33 joerg Exp $
+#	$NetBSD: Makefile,v 1.15 2017/01/11 12:02:29 joerg Exp $
 
 LIB=	LLVMInstrumentation
 
@@ -9,12 +9,13 @@
 SRCS+=	AddressSanitizer.cpp \
 	BoundsChecking.cpp \
 	DataFlowSanitizer.cpp \
+	EfficiencySanitizer.cpp \
 	GCOVProfiling.cpp \
+	IndirectCallPromotion.cpp \
 	InstrProfiling.cpp \
 	Instrumentation.cpp \
 	MemorySanitizer.cpp \
 	PGOInstrumentation.cpp \
-	SafeStack.cpp \
 	SanitizerCoverage.cpp \
 	ThreadSanitizer.cpp
 
--- a/external/bsd/llvm/lib/libLLVMLTO/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMLTO/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2013/09/29 12:12:00 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:30 joerg Exp $
 
 LIB=	LLVMLTO
 
@@ -6,8 +6,13 @@
 
 .PATH: ${LLVM_SRCDIR}/lib/LTO
 
-SRCS+=	LTOCodeGenerator.cpp \
-	LTOModule.cpp
+SRCS+=	Caching.cpp \
+	LTO.cpp \
+	LTOBackend.cpp \
+	LTOCodeGenerator.cpp \
+	LTOModule.cpp \
+	ThinLTOCodeGenerator.cpp \
+	UpdateCompilerUsed.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMMC/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMMC/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.18 2016/02/27 21:47:33 joerg Exp $
+#	$NetBSD: Makefile,v 1.19 2017/01/11 12:02:30 joerg Exp $
 
 LIB=	LLVMMC
 
@@ -15,8 +15,8 @@
 	MCAsmInfoELF.cpp \
 	MCAsmStreamer.cpp \
 	MCAssembler.cpp \
-	MCCodeGenInfo.cpp \
 	MCCodeEmitter.cpp \
+	MCCodeView.cpp \
 	MCContext.cpp \
 	MCDwarf.cpp \
 	MCELFObjectTargetWriter.cpp \
@@ -43,7 +43,6 @@
 	MCSectionMachO.cpp \
 	MCStreamer.cpp \
 	MCSubtargetInfo.cpp \
-	MCSymbolizer.cpp \
 	MCSymbol.cpp \
 	MCSymbolELF.cpp \
 	MCTargetOptions.cpp \
@@ -54,8 +53,7 @@
 	WinCOFFStreamer.cpp \
 	WinCOFFObjectWriter.cpp \
 	StringTableBuilder.cpp \
-	SubtargetFeature.cpp \
-	YAML.cpp
+	SubtargetFeature.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMMCDisassembler/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMMCDisassembler/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2014/08/10 17:34:21 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:30 joerg Exp $
 
 LIB=	LLVMMCDisassembler
 
@@ -10,6 +10,7 @@
 	MCDisassembler.cpp \
 	MCExternalSymbolizer.cpp \
 	MCRelocationInfo.cpp \
+	MCSymbolizer.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMMipsCodeGen/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMMipsCodeGen/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.26 2016/02/27 21:47:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.27 2017/01/11 12:02:30 joerg Exp $
 
 LIB=	LLVMMipsCodeGen
 
@@ -20,6 +20,7 @@
 	MipsDelaySlotFiller.cpp \
 	MipsFastISel.cpp \
 	MipsFrameLowering.cpp \
+	MipsHazardSchedule.cpp \
 	MipsInstrInfo.cpp \
 	MipsISelDAGToDAG.cpp \
 	MipsISelLowering.cpp \
--- a/external/bsd/llvm/lib/libLLVMObject/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMObject/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2016/02/27 21:47:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.13 2017/01/11 12:02:30 joerg Exp $
 
 LIB=	LLVMObject
 
@@ -10,20 +10,20 @@
 	ArchiveWriter.cpp \
 	Binary.cpp \
 	COFFObjectFile.cpp \
-	COFFYAML.cpp \
 	ELF.cpp \
 	ELFObjectFile.cpp \
-	ELFYAML.cpp \
 	Error.cpp \
-	FunctionIndexObjectFile.cpp \
 	IRObjectFile.cpp \
 	MachOObjectFile.cpp \
 	MachOUniversal.cpp \
+	ModuleSummaryIndexObjectFile.cpp \
+	ModuleSymbolTable.cpp \
 	Object.cpp \
 	ObjectFile.cpp \
 	RecordStreamer.cpp \
 	SymbolSize.cpp \
-	SymbolicFile.cpp
+	SymbolicFile.cpp \
+	WasmObjectFile.cpp \
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/lib/libLLVMObjectYAML/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -0,0 +1,20 @@
+#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:30 joerg Exp $
+
+LIB=	LLVMObjectYAML
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/lib/ObjectYAML
+
+SRCS+=	COFFYAML.cpp \
+	DWARFYAML.cpp \
+	ELFYAML.cpp \
+	MachOYAML.cpp \
+	ObjectYAML.cpp \
+	YAML.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
--- a/external/bsd/llvm/lib/libLLVMOrc/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMOrc/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2016/02/27 21:47:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/01/11 12:02:30 joerg Exp $
 
 LIB=	LLVMOrc
 
@@ -9,11 +9,9 @@
 SRCS+=	ExecutionUtils.cpp \
 	IndirectionUtils.cpp \
 	NullResolver.cpp \
-	OrcArchitectureSupport.cpp \
+	OrcABISupport.cpp \
 	OrcCBindings.cpp \
-	OrcCBindingsStack.cpp \
 	OrcError.cpp \
-	OrcMCJITReplacement.cpp \
-	OrcRemoteTargetRPCAPI.cpp
+	OrcMCJITReplacement.cpp
 
 .include <bsd.lib.mk>
--- a/external/bsd/llvm/lib/libLLVMPowerPCCodeGen/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMPowerPCCodeGen/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2016/02/27 21:47:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.12 2017/01/11 12:02:30 joerg Exp $
 
 LIB=	LLVMPowerPCCodeGen
 
@@ -9,6 +9,7 @@
 SRCS+=	PPCAsmPrinter.cpp \
 	PPCBoolRetToInt.cpp \
 	PPCBranchSelector.cpp \
+	PPCCCState.cpp \
 	PPCCTRLoops.cpp \
 	PPCEarlyReturn.cpp \
 	PPCHazardRecognizers.cpp \
@@ -17,11 +18,11 @@
 	PPCISelLowering.cpp \
 	PPCFastISel.cpp \
 	PPCFrameLowering.cpp \
-	PPCLoopDataPrefetch.cpp \
 	PPCLoopPreIncPrep.cpp \
 	PPCMachineFunctionInfo.cpp \
 	PPCMCInstLower.cpp \
 	PPCMIPeephole.cpp \
+	PPCQPXLoadSplat.cpp \
 	PPCRegisterInfo.cpp \
 	PPCSubtarget.cpp \
 	PPCTLSDynamicCall.cpp \
--- a/external/bsd/llvm/lib/libLLVMProfileData/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMProfileData/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2015/01/29 20:41:36 joerg Exp $
+#	$NetBSD: Makefile,v 1.4 2017/01/11 12:02:30 joerg Exp $
 
 LIB=	LLVMProfileData
 
@@ -6,12 +6,10 @@
 
 .PATH: ${LLVM_SRCDIR}/lib/ProfileData
 
-SRCS+=	CoverageMapping.cpp \
-	CoverageMappingReader.cpp \
-	CoverageMappingWriter.cpp \
-	InstrProf.cpp \
+SRCS+=	InstrProf.cpp \
 	InstrProfReader.cpp \
 	InstrProfWriter.cpp \
+	ProfileSummaryBuilder.cpp \
 	SampleProf.cpp \
 	SampleProfReader.cpp \
 	SampleProfWriter.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/lib/libLLVMProfileDataCoverage/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -0,0 +1,17 @@
+#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:30 joerg Exp $
+
+LIB=	LLVMProfileDataCoverage
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/lib/ProfileData/Coverage
+
+SRCS+=	CoverageMapping.cpp \
+	CoverageMappingReader.cpp \
+	CoverageMappingWriter.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
--- a/external/bsd/llvm/lib/libLLVMRuntimeDyld/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMRuntimeDyld/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,16 +1,20 @@
-#	$NetBSD: Makefile,v 1.8 2016/02/27 21:47:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.9 2017/01/11 12:02:30 joerg Exp $
 
 LIB=	LLVMRuntimeDyld
 
 .include <bsd.init.mk>
 
 .PATH: ${LLVM_SRCDIR}/lib/ExecutionEngine/RuntimeDyld
+.PATH: ${LLVM_SRCDIR}/lib/ExecutionEngine/RuntimeDyld/Targets
 
-SRCS+=	RTDyldMemoryManager.cpp \
+SRCS+=	JITSymbol.cpp \
+	RTDyldMemoryManager.cpp \
 	RuntimeDyld.cpp \
 	RuntimeDyldCOFF.cpp \
 	RuntimeDyldChecker.cpp \
 	RuntimeDyldELF.cpp \
 	RuntimeDyldMachO.cpp
 
+SRCS+=	RuntimeDyldELFMips.cpp
+
 .include <bsd.lib.mk>
--- a/external/bsd/llvm/lib/libLLVMScalarOpts/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMScalarOpts/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20 2016/02/27 21:47:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.21 2017/01/11 12:02:31 joerg Exp $
 
 LIB=	LLVMScalarOpts
 
@@ -18,11 +18,14 @@
 	FlattenCFGPass.cpp \
 	Float2Int.cpp \
 	GVN.cpp \
+	GVNHoist.cpp \
+	GuardWidening.cpp \
 	IndVarSimplify.cpp \
 	InductiveRangeCheckElimination.cpp \
 	JumpThreading.cpp \
 	LICM.cpp \
 	LoadCombine.cpp \
+	LoopDataPrefetch.cpp \
 	LoopDistribute.cpp \
 	LoopDeletion.cpp \
 	LoopIdiomRecognize.cpp \
@@ -31,14 +34,19 @@
 	LoopLoadElimination.cpp \
 	LoopRerollPass.cpp \
 	LoopRotation.cpp \
+	LoopSimplifyCFG.cpp \
+	LoopSink.cpp \
 	LoopStrengthReduce.cpp \
 	LoopUnrollPass.cpp \
 	LoopUnswitch.cpp \
+	LoopVersioningLICM.cpp \
 	LowerAtomic.cpp \
 	LowerExpectIntrinsic.cpp \
+	LowerGuardIntrinsic.cpp \
 	MemCpyOptimizer.cpp \
 	MergedLoadStoreMotion.cpp \
 	NaryReassociate.cpp \
+	NewGVN.cpp \
 	PartiallyInlineLibCalls.cpp \
 	PlaceSafepoints.cpp \
 	Reassociate.cpp \
@@ -47,7 +55,6 @@
 	SCCP.cpp \
 	SROA.cpp \
 	Scalar.cpp \
-	ScalarReplAggregates.cpp \
 	Scalarizer.cpp \
 	SeparateConstOffsetFromGEP.cpp \
 	SimplifyCFGPass.cpp \
--- a/external/bsd/llvm/lib/libLLVMSelectionDAG/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMSelectionDAG/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2015/01/29 20:41:36 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:31 joerg Exp $
 
 LIB=	LLVMSelectionDAG
 
@@ -27,9 +27,9 @@
 	SelectionDAGDumper.cpp \
 	SelectionDAGISel.cpp \
 	SelectionDAGPrinter.cpp \
+	SelectionDAGTargetInfo.cpp \
 	StatepointLowering.cpp \
-	TargetLowering.cpp \
-	TargetSelectionDAGInfo.cpp
+	TargetLowering.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libLLVMSparcCodeGen/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMSparcCodeGen/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2016/02/27 21:47:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.11 2017/01/11 12:02:31 joerg Exp $
 
 LIB=	LLVMSparcCodeGen
 
@@ -7,6 +7,7 @@
 .PATH: ${LLVM_SRCDIR}/lib/Target/Sparc
 
 SRCS+=	DelaySlotFiller.cpp \
+	LeonPasses.cpp \
 	SparcAsmPrinter.cpp \
 	SparcInstrInfo.cpp \
 	SparcISelDAGToDAG.cpp \
--- a/external/bsd/llvm/lib/libLLVMSupport/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMSupport/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.32 2016/02/27 21:47:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.33 2017/01/11 12:02:31 joerg Exp $
 
 LIB=	LLVMSupport
 
@@ -14,29 +14,30 @@
 	Allocator.cpp \
 	BlockFrequency.cpp \
 	BranchProbability.cpp \
-	circular_raw_ostream.cpp \
 	COM.cpp \
+	CachePruning.cpp \
+	Chrono.cpp \
 	CommandLine.cpp \
 	Compression.cpp \
-	ConvertUTF.c \
+	ConvertUTF.cpp \
 	ConvertUTFWrapper.cpp \
 	CrashRecoveryContext.cpp \
 	DataExtractor.cpp \
-	DataStream.cpp \
 	Debug.cpp \
 	DeltaAlgorithm.cpp \
 	DAGDeltaAlgorithm.cpp \
 	Dwarf.cpp \
+	Error.cpp \
 	ErrorHandling.cpp \
 	FileOutputBuffer.cpp \
 	FileUtilities.cpp \
 	FoldingSet.cpp \
 	FormattedStream.cpp \
+	GlobPattern.cpp \
 	GraphWriter.cpp \
 	Hashing.cpp \
 	IntEqClasses.cpp \
 	IntervalMap.cpp \
-	IntrusiveRefCntPtr.cpp \
 	JamCRC.cpp \
 	LEB128.cpp \
 	LineIterator.cpp \
@@ -46,25 +47,28 @@
 	ManagedStatic.cpp \
 	MathExtras.cpp \
 	MemoryBuffer.cpp \
-	MemoryObject.cpp \
+	NativeFormatting.cpp \
 	Options.cpp \
 	PluginLoader.cpp \
 	PrettyStackTrace.cpp \
 	Regex.cpp \
+	SHA1.cpp \
+	ScopedPrinter.cpp \
 	SmallPtrSet.cpp \
 	SmallVector.cpp \
 	SourceMgr.cpp \
 	SpecialCaseList.cpp \
 	Statistic.cpp \
-	StreamingMemoryObject.cpp \
 	StringExtras.cpp \
 	StringMap.cpp \
 	StringPool.cpp \
 	StringRef.cpp \
 	StringSaver.cpp \
 	SystemUtils.cpp \
+	TarWriter.cpp \
 	TargetParser.cpp \
 	TargetRegistry.cpp \
+	TrigramIndex.cpp \
 	Timer.cpp \
 	ToolOutputFile.cpp \
 	Triple.cpp \
@@ -73,17 +77,20 @@
 	Watchdog.cpp \
 	YAMLParser.cpp \
 	YAMLTraits.cpp \
+	circular_raw_ostream.cpp \
 	raw_os_ostream.cpp \
 	raw_ostream.cpp \
 	regcomp.c \
 	regerror.c \
 	regexec.c \
 	regfree.c \
-	regstrlcpy.c
+	regstrlcpy.c \
+	xxhash.cpp
 
 SRCS+=	Atomic.cpp \
 	DynamicLibrary.cpp \
 	Errno.cpp \
+	FormatVariadic.cpp \
 	Host.cpp \
 	Memory.cpp \
 	Mutex.cpp \
@@ -98,7 +105,6 @@
 	ThreadLocal.cpp \
 	ThreadPool.cpp \
 	Threading.cpp \
-	TimeValue.cpp \
 	Valgrind.cpp
 
 .PATH: ${LLVM_SRCDIR}/lib/Support/Unix
@@ -112,17 +118,12 @@
 	RWMutex.inc \
 	Signals.inc \
 	Watchdog.inc \
-	ThreadLocal.inc \
-	TimeValue.inc
+	ThreadLocal.inc
 
 .for src in ${SRCS:M*.c}
 CPPFLAGS.${src}+=	-std=gnu99
 .endfor
 
-.if !defined(HOSTLIB) && ${MACHINE_ARCH} == "sparc"
-COPTS.Atomic.cpp+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus :}
-.endif
-
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
 .else
--- a/external/bsd/llvm/lib/libLLVMTarget/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMTarget/Makefile	Wed Jan 11 12:02:24 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/01/11 12:02:31 joerg Exp $
 
 LIB=	LLVMTarget
 
@@ -10,9 +10,7 @@
 	TargetIntrinsicInfo.cpp \
 	TargetLoweringObjectFile.cpp \
 	TargetMachine.cpp \
-	TargetMachineC.cpp \
-	TargetRecip.cpp \
-	TargetSubtargetInfo.cpp
+	TargetMachineC.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/lib/libLLVMTransformsCoroutines/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -0,0 +1,20 @@
+#	$NetBSD: Makefile,v 1.1 2017/01/11 12:02:31 joerg Exp $
+
+LIB=	LLVMTransformsCoroutines
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/lib/Transforms/Coroutines
+
+SRCS+=	CoroCleanup.cpp \
+	CoroEarly.cpp \
+	CoroElide.cpp \
+	CoroFrame.cpp \
+	CoroSplit.cpp \
+	Coroutines.cpp
+
+.if defined(HOSTLIB)
+.include <bsd.hostlib.mk>
+.else
+.include <bsd.lib.mk>
+.endif
--- a/external/bsd/llvm/lib/libLLVMTransformsUtils/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMTransformsUtils/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.18 2016/02/27 21:47:35 joerg Exp $
+#	$NetBSD: Makefile,v 1.19 2017/01/11 12:02:31 joerg Exp $
 
 LIB=	LLVMTransformsUtils
 
@@ -18,30 +18,42 @@
 	CodeExtractor.cpp \
 	CtorUtils.cpp \
 	DemoteRegToStack.cpp \
+	Evaluator.cpp \
+	EscapeEnumerator.cpp \
 	FlattenCFG.cpp \
+	FunctionComparator.cpp \
+	FunctionImportUtils.cpp \
 	GlobalStatus.cpp \
+	ImportedFunctionsInliningStatistics.cpp \
 	InlineFunction.cpp \
 	InstructionNamer.cpp \
 	IntegerDivision.cpp \
 	LCSSA.cpp \
+	LibCallsShrinkWrap.cpp \
 	Local.cpp \
 	LoopSimplify.cpp \
 	LoopUnroll.cpp \
+	LoopUnrollPeel.cpp \
 	LoopUnrollRuntime.cpp \
 	LoopUtils.cpp \
 	LoopVersioning.cpp \
 	LowerInvoke.cpp \
 	LowerSwitch.cpp \
 	Mem2Reg.cpp \
+	MemorySSA.cpp \
 	MetaRenamer.cpp \
 	ModuleUtils.cpp \
+	NameAnonGlobals.cpp \
 	PromoteMemoryToRegister.cpp \
 	SSAUpdater.cpp \
+	SanitizerStats.cpp \
 	SimplifyCFG.cpp \
 	SimplifyIndVar.cpp \
 	SimplifyInstructions.cpp \
 	SimplifyLibCalls.cpp \
 	SplitModule.cpp \
+	StripGCRelocates.cpp \
+	StripNonLineTableDebugInfo.cpp \
 	SymbolRewriter.cpp \
 	UnifyFunctionExitNodes.cpp \
 	Utils.cpp \
--- a/external/bsd/llvm/lib/libLLVMVectorize/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMVectorize/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2013/07/07 21:36:44 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:31 joerg Exp $
 
 LIB=	LLVMVectorize
 
@@ -7,6 +7,7 @@
 .PATH: ${LLVM_SRCDIR}/lib/Transforms/Vectorize
 
 SRCS+=	BBVectorize.cpp \
+	LoadStoreVectorizer.cpp \
 	LoopVectorize.cpp \
 	SLPVectorizer.cpp \
 	Vectorize.cpp
--- a/external/bsd/llvm/lib/libLLVMX86CodeGen/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMX86CodeGen/Makefile	Wed Jan 11 12:02:24 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/01/11 12:02:31 joerg Exp $
 
 LIB=	LLVMX86CodeGen
 
@@ -6,16 +6,25 @@
 
 .PATH: ${LLVM_SRCDIR}/lib/Target/X86
 
+# Used only with GlobalISel:
+#	X86CallLowering.cpp
+
 SRCS+=	X86AsmPrinter.cpp \
 	X86CallFrameOptimization.cpp \
+	X86CallingConv.cpp \
+	X86EvexToVex.cpp\
 	X86ExpandPseudo.cpp \
 	X86FastISel.cpp \
+	X86FixupBWInsts.cpp \
 	X86FixupLEAs.cpp \
+	X86FixupSetCC.cpp \
 	X86FloatingPoint.cpp \
 	X86FrameLowering.cpp \
 	X86ISelDAGToDAG.cpp \
 	X86ISelLowering.cpp \
+	X86InstrFMA3Info.cpp \
 	X86InstrInfo.cpp \
+	X86InterleavedAccess.cpp \
 	X86MachineFunctionInfo.cpp \
 	X86MCInstLower.cpp \
 	X86OptimizeLEAs.cpp \
@@ -28,6 +37,7 @@
 	X86TargetObjectFile.cpp \
 	X86TargetTransformInfo.cpp \
 	X86VZeroUpper.cpp \
+	X86WinAllocaExpander.cpp \
 	X86WinEHState.cpp
 
 TABLEGEN_SRC=		X86.td
--- a/external/bsd/llvm/lib/libLLVMX86Disassembler/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMX86Disassembler/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.4 2014/05/30 18:28:15 joerg Exp $
+#	$NetBSD: Makefile,v 1.5 2017/01/11 12:02:31 joerg Exp $
 
 LIB=	LLVMX86Disassembler
 
 .include <bsd.init.mk>
 
 X86_OBJDIR!=	cd ${.CURDIR}/../libLLVMX86CodeGen && ${PRINTOBJDIR}
-CPPFLAGS+=	-I${X86_OBJDIR}
+CPPFLAGS+=	-I${X86_OBJDIR} -I${LLVM_SRCDIR}/lib/Target/X86
 
 .PATH: ${LLVM_SRCDIR}/lib/Target/X86/Disassembler
 
--- a/external/bsd/llvm/lib/libLLVMX86MCTargetDesc/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMX86MCTargetDesc/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2014/05/30 18:28:15 joerg Exp $
+#	$NetBSD: Makefile,v 1.8 2017/01/11 12:02:31 joerg Exp $
 
 LIB=	LLVMX86MCTargetDesc
 
@@ -14,9 +14,7 @@
 	X86MCAsmInfo.cpp \
 	X86MCCodeEmitter.cpp \
 	X86MCTargetDesc.cpp \
-	X86MachORelocationInfo.cpp \
 	X86MachObjectWriter.cpp \
-	X86ELFRelocationInfo.cpp \
 	X86WinCOFFObjectWriter.cpp \
 	X86WinCOFFStreamer.cpp
 
--- a/external/bsd/llvm/lib/libLLVMipo/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libLLVMipo/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2016/02/27 21:47:35 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2017/01/11 12:02:32 joerg Exp $
 
 LIB=	LLVMipo
 
@@ -6,7 +6,8 @@
 
 .PATH: ${LLVM_SRCDIR}/lib/Transforms/IPO
 
-SRCS+=	ArgumentPromotion.cpp \
+SRCS+=	AlwaysInliner.cpp \
+	ArgumentPromotion.cpp \
 	BarrierNoopPass.cpp \
 	ConstantMerge.cpp \
 	CrossDSOCFI.cpp \
@@ -18,22 +19,24 @@
 	FunctionImport.cpp \
 	GlobalDCE.cpp \
 	GlobalOpt.cpp \
+	GlobalSplit.cpp \
 	IPConstantPropagation.cpp \
 	IPO.cpp \
 	InferFunctionAttrs.cpp \
-	InlineAlways.cpp \
 	InlineSimple.cpp \
 	Inliner.cpp \
 	Internalize.cpp \
 	LoopExtractor.cpp \
-	LowerBitSets.cpp \
+	LowerTypeTests.cpp \
 	MergeFunctions.cpp \
 	PartialInlining.cpp \
 	PassManagerBuilder.cpp \
 	PruneEH.cpp \
 	SampleProfile.cpp \
 	StripDeadPrototypes.cpp \
-	StripSymbols.cpp
+	StripSymbols.cpp \
+	ThinLTOBitcodeWriter.cpp \
+	WholeProgramDevirt.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libclangAnalysis/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libclangAnalysis/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2015/01/29 20:41:36 joerg Exp $
+#	$NetBSD: Makefile,v 1.14 2017/01/11 12:02:32 joerg Exp $
 
 LIB=	clangAnalysis
 
@@ -12,12 +12,14 @@
 	CFGReachabilityAnalysis.cpp \
 	CFGStmtMap.cpp \
 	CallGraph.cpp \
+	CloneDetection.cpp \
 	CocoaConventions.cpp \
 	CodeInjector.cpp \
 	Consumed.cpp \
 	Dominators.cpp \
 	FormatString.cpp \
 	LiveVariables.cpp \
+	OSLog.cpp \
 	ObjCNoReturn.cpp \
 	PostOrderCFGView.cpp \
 	ProgramPoint.cpp \
--- a/external/bsd/llvm/lib/libclangBasic/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libclangBasic/Makefile	Wed Jan 11 12:02:24 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/01/11 12:02:32 joerg Exp $
 
 LIB=	clangBasic
 
@@ -9,6 +9,7 @@
 SRCS+=	Attributes.cpp \
 	Builtins.cpp \
 	CharInfo.cpp \
+	Cuda.cpp \
 	Diagnostic.cpp \
 	DiagnosticIDs.cpp \
 	DiagnosticOptions.cpp \
--- a/external/bsd/llvm/lib/libclangCodeGen/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libclangCodeGen/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2016/02/27 21:47:35 joerg Exp $
+#	$NetBSD: Makefile,v 1.14 2017/01/11 12:02:32 joerg Exp $
 
 LIB=	clangCodeGen
 
@@ -10,13 +10,15 @@
 	CGAtomic.cpp \
 	CGBlocks.cpp \
 	CGBuiltin.cpp \
+	CGCUDABuiltin.cpp \
 	CGCUDANV.cpp \
 	CGCUDARuntime.cpp \
+	CGCXX.cpp \
+	CGCXXABI.cpp \
 	CGCall.cpp \
 	CGClass.cpp \
 	CGCleanup.cpp \
-	CGCXX.cpp \
-	CGCXXABI.cpp \
+	CGCoroutine.cpp \
 	CGDebugInfo.cpp \
 	CGDecl.cpp \
 	CGDeclCXX.cpp \
@@ -34,6 +36,7 @@
 	CGObjCRuntime.cpp \
 	CGOpenCLRuntime.cpp \
 	CGOpenMPRuntime.cpp \
+	CGOpenMPRuntimeNVPTX.cpp \
 	CGRecordLayoutBuilder.cpp \
 	CGStmt.cpp \
 	CGStmtOpenMP.cpp \
@@ -52,7 +55,9 @@
 	ModuleBuilder.cpp \
 	ObjectFilePCHContainerOperations.cpp \
 	SanitizerMetadata.cpp \
-	TargetInfo.cpp
+	SwiftCallingConv.cpp \
+	TargetInfo.cpp \
+	VarBypassDetector.cpp
 
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
--- a/external/bsd/llvm/lib/libclangDriver/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libclangDriver/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2016/02/27 21:47:35 joerg Exp $
+#	$NetBSD: Makefile,v 1.11 2017/01/11 12:02:32 joerg Exp $
 
 LIB=	clangDriver
 
@@ -9,6 +9,7 @@
 SRCS+=	Action.cpp \
 	Compilation.cpp \
 	CrossWindowsToolChain.cpp \
+	Distro.cpp \
 	Driver.cpp \
 	DriverOptions.cpp \
 	Job.cpp \
--- a/external/bsd/llvm/lib/libclangFormat/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libclangFormat/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2015/01/29 20:41:37 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:32 joerg Exp $
 
 LIB=	clangFormat
 
@@ -6,10 +6,15 @@
 
 .PATH: ${CLANG_SRCDIR}/lib/Format
 
-SRCS+=	BreakableToken.cpp \
+SRCS+=	AffectedRangeManager.cpp \
+	BreakableToken.cpp \
+	Comments.cpp \
 	ContinuationIndenter.cpp \
 	Format.cpp \
 	FormatToken.cpp \
+	FormatTokenLexer.cpp \
+	SortJavaScriptImports.cpp \
+	TokenAnalyzer.cpp \
 	TokenAnnotator.cpp \
 	UnwrappedLineFormatter.cpp \
 	UnwrappedLineParser.cpp \
--- a/external/bsd/llvm/lib/libclangIndex/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libclangIndex/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2013/11/28 14:19:59 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2017/01/11 12:02:32 joerg Exp $
 
 LIB=	clangIndex
 
@@ -6,7 +6,14 @@
 
 .PATH: ${CLANG_SRCDIR}/lib/Index
 
-SRCS+=	CommentToXML.cpp \
+SRCS+=	CodegenNameGenerator.cpp \
+	CommentToXML.cpp \
+	IndexBody.cpp \
+	IndexDecl.cpp \
+	IndexingAction.cpp \
+	IndexingContext.cpp \
+	IndexSymbol.cpp \
+	IndexTypeSourceInfo.cpp \
 	USRGeneration.cpp
 
 .if defined(HOSTLIB)
--- a/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,18 +1,22 @@
-#	$NetBSD: Makefile,v 1.25 2016/02/27 21:47:36 joerg Exp $
+#	$NetBSD: Makefile,v 1.26 2017/01/11 12:02:32 joerg Exp $
 
 LIB=	clangStaticAnalyzerCheckers
 
 .include <bsd.init.mk>
 
 .PATH: ${CLANG_SRCDIR}/lib/StaticAnalyzer/Checkers
+.PATH: ${CLANG_SRCDIR}/lib/StaticAnalyzer/Checkers/MPI-Checker
 
 SRCS+=	AllocationDiagnostics.cpp \
+	AnalysisOrderChecker.cpp \
 	AnalyzerStatsChecker.cpp \
 	ArrayBoundChecker.cpp \
 	ArrayBoundCheckerV2.cpp \
 	BasicObjCFoundationChecks.cpp \
+	BlockInCriticalSectionChecker.cpp \
 	BoolAssignmentChecker.cpp \
 	BuiltinFunctionChecker.cpp \
+	CXXSelfAssignmentChecker.cpp \
 	ClangCheckers.cpp \
 	CStringChecker.cpp \
 	CStringSyntaxChecker.cpp \
@@ -25,6 +29,8 @@
 	CheckSizeofPointer.cpp \
 	CheckerDocumentation.cpp \
 	ChrootChecker.cpp \
+	CloneChecker.cpp \
+	ConversionChecker.cpp \
 	DeadStoresChecker.cpp \
 	DebugCheckers.cpp \
 	DereferenceChecker.cpp \
@@ -34,11 +40,16 @@
 	DynamicTypePropagation.cpp \
 	ExprInspectionChecker.cpp \
 	FixedAddressChecker.cpp \
+	GTestChecker.cpp \
 	GenericTaintChecker.cpp \
 	IdenticalExprChecker.cpp \
+	IteratorPastEndChecker.cpp \
 	IvarInvalidationChecker.cpp \
 	LLVMConventionsChecker.cpp \
 	LocalizationChecker.cpp \
+	MPIBugReporter.cpp \
+	MPIChecker.cpp \
+	MPIFunctionClassifier.cpp \
 	MacOSKeychainAPIChecker.cpp \
 	MacOSXAPIChecker.cpp \
 	MallocChecker.cpp \
@@ -49,11 +60,14 @@
 	NoReturnFunctionChecker.cpp \
 	NonNullParamChecker.cpp \
 	NullabilityChecker.cpp \
+	NumberObjectConversionChecker.cpp \
 	ObjCAtSyncChecker.cpp \
 	ObjCContainersASTChecker.cpp \
 	ObjCContainersChecker.cpp \
 	ObjCMissingSuperCallChecker.cpp \
+	ObjCPropertyChecker.cpp \
 	ObjCSelfInitChecker.cpp \
+	ObjCSuperDeallocChecker.cpp \
 	ObjCUnusedIVarsChecker.cpp \
 	PaddingChecker.cpp \
 	PointerArithChecker.cpp \
@@ -64,6 +78,7 @@
 	ReturnUndefChecker.cpp \
 	SimpleStreamChecker.cpp \
 	StackAddrEscapeChecker.cpp \
+	StdLibraryFunctionsChecker.cpp \
 	StreamChecker.cpp \
 	TaintTesterChecker.cpp \
 	TestAfterDivZeroChecker.cpp \
@@ -76,13 +91,10 @@
 	UnixAPIChecker.cpp \
 	UnreachableCodeChecker.cpp \
 	VLASizeChecker.cpp \
+	ValistChecker.cpp \
 	VforkChecker.cpp \
 	VirtualCallChecker.cpp
 
-CLANG_TABLEGEN_SRC=		Checkers.td
-CLANG_TABLEGEN_INCLUDES=	-I${CLANG_SRCDIR}/include
-CLANG_TABLEGEN_OUTPUT=	Checkers.inc|-gen-clang-sa-checkers
-
 .include "${.PARSEDIR}/../../tablegen.mk"
 
 .if defined(HOSTLIB)
--- a/external/bsd/llvm/lib/libclangTooling/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libclangTooling/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2012/10/28 17:07:47 joerg Exp $
+#	$NetBSD: Makefile,v 1.9 2017/01/11 12:02:32 joerg Exp $
 
 LIB=	clangTooling
 
@@ -10,6 +10,7 @@
 	CommonOptionsParser.cpp \
 	CompilationDatabase.cpp \
 	FileMatchTrie.cpp \
+	FixIt.cpp \
 	JSONCompilationDatabase.cpp \
 	Refactoring.cpp \
 	RefactoringCallbacks.cpp \
--- a/external/bsd/llvm/lib/libclangToolingCore/Makefile	Wed Jan 11 11:53:07 2017 +0000
+++ b/external/bsd/llvm/lib/libclangToolingCore/Makefile	Wed Jan 11 12:02:24 2017 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2016/02/27 21:47:36 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2017/01/11 12:02:32 joerg Exp $
 
 LIB=	clangToolingCore
 
@@ -6,7 +6,9 @@
 
 .PATH: ${CLANG_SRCDIR}/lib/Tooling/Core
 
-SRCS+=	Lookup.cpp \
+SRCS+=	Diagnostic.cpp \
+	Lookup.cpp \
+	QualTypeNames.cpp \
 	Replacement.cpp
 
 .if defined(HOSTLIB)