Update LLVM/Clang snapshot to r191105. This brings in a better detection trunk
authorjoerg <joerg@NetBSD.org>
Sat, 21 Sep 2013 22:28:12 +0000
branchtrunk
changeset 221253 7fff99e5ad0c
parent 221252 c27add2f1f4f
child 221254 6f499744ad34
Update LLVM/Clang snapshot to r191105. This brings in a better detection of unused static variables and functions. Disable this for some external code and for ioconf.c in the kernel.
distrib/sets/lists/comp/md.amd64
distrib/sets/lists/comp/md.i386
external/bsd/dhcp/Makefile.inc
external/bsd/ipf/Makefile.inc
external/bsd/libevent/lib/Makefile.inc
external/bsd/llvm/Makefile.inc
external/bsd/llvm/include/Makefile
external/bsd/llvm/lib/libLLVMScalarOpts/Makefile
external/bsd/llvm/lib/libLLVMSupport/Makefile
external/bsd/llvm/lib/liblldDriver/Makefile
external/bsd/ntp/Makefile.inc
external/bsd/tcpdump/bin/Makefile
lib/libm/Makefile
sys/conf/Makefile.kern.inc
usr.bin/nvi/Makefile.inc
--- a/distrib/sets/lists/comp/md.amd64	Sat Sep 21 19:51:33 2013 +0000
+++ b/distrib/sets/lists/comp/md.amd64	Sat Sep 21 22:28:12 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.198 2013/08/11 22:29:02 joerg Exp $
+# $NetBSD: md.amd64,v 1.199 2013/09/21 22:28:12 joerg Exp $
 ./usr/include/amd64				comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
 ./usr/include/amd64/aout_machdep.h		comp-c-include
@@ -163,6 +163,7 @@
 ./usr/include/clang-3.4/prfchwintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.4/rdseedintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.4/rtmintrin.h		comp-c-include		llvm
+./usr/include/clang-3.4/shaintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.4/smmintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.4/tmmintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.4/wmmintrin.h		comp-c-include		llvm
--- a/distrib/sets/lists/comp/md.i386	Sat Sep 21 19:51:33 2013 +0000
+++ b/distrib/sets/lists/comp/md.i386	Sat Sep 21 22:28:12 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.136 2013/08/11 22:29:02 joerg Exp $
+# $NetBSD: md.i386,v 1.137 2013/09/21 22:28:12 joerg Exp $
 ./usr/include/clang-3.0/avx2intrin.h		comp-obsolete		obsolete
 ./usr/include/clang-3.0/avxintrin.h		comp-obsolete		obsolete
 ./usr/include/clang-3.0/bmi2intrin.h		comp-obsolete		obsolete
@@ -94,6 +94,7 @@
 ./usr/include/clang-3.4/prfchwintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.4/rdseedintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.4/rtmintrin.h		comp-c-include		llvm
+./usr/include/clang-3.4/shaintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.4/smmintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.4/tmmintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.4/wmmintrin.h		comp-c-include		llvm
--- a/external/bsd/dhcp/Makefile.inc	Sat Sep 21 19:51:33 2013 +0000
+++ b/external/bsd/dhcp/Makefile.inc	Sat Sep 21 22:28:12 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.7 2013/08/11 14:42:04 tsutsui Exp $
+# $NetBSD: Makefile.inc,v 1.8 2013/09/21 22:28:12 joerg Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -7,7 +7,7 @@
 USE_FORT?= yes	# network client/server
 CWARNFLAGS.clang+=	-Wno-tautological-compare \
 			-Wno-conversion -Wno-constant-logical-operand \
-			-Wno-format-security
+			-Wno-format-security -Wno-error=unused-const-variable
 
 DIST:=	${.PARSEDIR}/dist
 BIND:=	${.PARSEDIR}/../bind/dist
--- a/external/bsd/ipf/Makefile.inc	Sat Sep 21 19:51:33 2013 +0000
+++ b/external/bsd/ipf/Makefile.inc	Sat Sep 21 22:28:12 2013 +0000
@@ -1,8 +1,9 @@
-#	$NetBSD: Makefile.inc,v 1.1 2012/03/23 21:29:44 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2013/09/21 22:28:12 joerg Exp $
 
 WARNS?=	1	# XXX -Wcast-qual -Wshadow
 CWARNFLAGS.clang+=	-Wno-format -Wno-tautological-compare \
-			-Wno-self-assign -Wno-array-bounds
+			-Wno-self-assign -Wno-array-bounds \
+			-Wno-error=unused-const-variable
 
 .include <bsd.own.mk>
 
--- a/external/bsd/libevent/lib/Makefile.inc	Sat Sep 21 19:51:33 2013 +0000
+++ b/external/bsd/libevent/lib/Makefile.inc	Sat Sep 21 22:28:12 2013 +0000
@@ -1,2 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.1 2013/04/11 16:59:16 christos Exp $
+# $NetBSD: Makefile.inc,v 1.2 2013/09/21 22:28:12 joerg Exp $
 .include "../Makefile.inc"
+
+CWARNFLAGS.clang+=	-Wno-error=unused-function
--- a/external/bsd/llvm/Makefile.inc	Sat Sep 21 19:51:33 2013 +0000
+++ b/external/bsd/llvm/Makefile.inc	Sat Sep 21 22:28:12 2013 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.54 2013/09/02 14:34:55 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.55 2013/09/21 22:28:12 joerg Exp $
 
 .if !defined(LLVM_TOPLEVEL_MK)
 LLVM_TOPLEVEL_MK=
@@ -7,7 +7,7 @@
 
 SVN_ROOT=		http://llvm.org/svn/llvm-project
 
-COMMON_REVISION=	189662
+COMMON_REVISION=	191105
 CLANG_REVISION=		${COMMON_REVISION}
 COMPILER_RT_REVISION=	${COMMON_REVISION}
 LLD_REVISION=		${COMMON_REVISION}
--- a/external/bsd/llvm/include/Makefile	Sat Sep 21 19:51:33 2013 +0000
+++ b/external/bsd/llvm/include/Makefile	Sat Sep 21 22:28:12 2013 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20 2013/07/07 21:36:43 joerg Exp $
+#	$NetBSD: Makefile,v 1.21 2013/09/21 22:28:12 joerg Exp $
 
 .include <bsd.init.mk>
 
@@ -27,6 +27,7 @@
 	prfchwintrin.h \
 	rdseedintrin.h \
 	rtmintrin.h \
+	shaintrin.h \
 	smmintrin.h \
 	tmmintrin.h \
 	wmmintrin.h \
@@ -71,10 +72,11 @@
 	clang/Lex/AttrSpellings.inc|-gen-clang-attr-spelling-list \
 	clang/Parse/AttrExprArgs.inc|-gen-clang-attr-expr-args-list \
 	clang/Parse/AttrLateParsed.inc|-gen-clang-attr-late-parsed-list \
-	clang/Sema/AttrTemplateInstantiate.inc|-gen-clang-attr-template-instantiate \
+	clang/Sema/AttrParsedAttrImpl.inc|-gen-clang-attr-parsed-attr-impl \
 	clang/Sema/AttrParsedAttrKinds.inc|-gen-clang-attr-parsed-attr-kinds \
 	clang/Sema/AttrParsedAttrList.inc|-gen-clang-attr-parsed-attr-list \
 	clang/Sema/AttrSpellingListIndex.inc|-gen-clang-attr-spelling-index \
+	clang/Sema/AttrTemplateInstantiate.inc|-gen-clang-attr-template-instantiate \
 	clang/Serialization/AttrPCHRead.inc|-gen-clang-attr-pch-read \
 	clang/Serialization/AttrPCHWrite.inc|-gen-clang-attr-pch-write
 
--- a/external/bsd/llvm/lib/libLLVMScalarOpts/Makefile	Sat Sep 21 19:51:33 2013 +0000
+++ b/external/bsd/llvm/lib/libLLVMScalarOpts/Makefile	Sat Sep 21 22:28:12 2013 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2013/09/02 14:34:56 joerg Exp $
+#	$NetBSD: Makefile,v 1.12 2013/09/21 22:28:12 joerg Exp $
 
 LIB=	LLVMScalarOpts
 
@@ -7,7 +7,6 @@
 .PATH: ${LLVM_SRCDIR}/lib/Transforms/Scalar
 
 SRCS+=	ADCE.cpp \
-	BasicBlockPlacement.cpp \
 	CodeGenPrepare.cpp \
 	ConstantProp.cpp \
 	CorrelatedValuePropagation.cpp \
--- a/external/bsd/llvm/lib/libLLVMSupport/Makefile	Sat Sep 21 19:51:33 2013 +0000
+++ b/external/bsd/llvm/lib/libLLVMSupport/Makefile	Sat Sep 21 22:28:12 2013 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21 2013/09/03 14:54:00 joerg Exp $
+#	$NetBSD: Makefile,v 1.22 2013/09/21 22:28:12 joerg Exp $
 
 LIB=	LLVMSupport
 
@@ -64,6 +64,7 @@
 	ToolOutputFile.cpp \
 	Triple.cpp \
 	Twine.cpp \
+	Unicode.cpp \
 	Watchdog.cpp \
 	YAMLParser.cpp \
 	YAMLTraits.cpp \
--- a/external/bsd/llvm/lib/liblldDriver/Makefile	Sat Sep 21 19:51:33 2013 +0000
+++ b/external/bsd/llvm/lib/liblldDriver/Makefile	Sat Sep 21 22:28:12 2013 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2013/09/02 14:34:57 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2013/09/21 22:28:12 joerg Exp $
 
 LIB=	lldDriver
 
@@ -14,14 +14,14 @@
 	UniversalDriver.cpp \
 	WinLinkDriver.cpp
 
-TABLEGEN_SRC=	CoreOptions.td DarwinOptions.td LDOptions.td WinLinkOptions.td
+TABLEGEN_SRC=	CoreOptions.td DarwinLdOptions.td GnuLdOptions.td WinLinkOptions.td
 
 TABLEGEN_OUTPUT.CoreOptions.td= \
 	CoreOptions.inc|-gen-opt-parser-defs
-TABLEGEN_OUTPUT.DarwinOptions.td= \
-	DarwinOptions.inc|-gen-opt-parser-defs
-TABLEGEN_OUTPUT.LDOptions.td= \
-	LDOptions.inc|-gen-opt-parser-defs
+TABLEGEN_OUTPUT.DarwinLdOptions.td= \
+	DarwinLdOptions.inc|-gen-opt-parser-defs
+TABLEGEN_OUTPUT.GnuLdOptions.td= \
+	GnuLdOptions.inc|-gen-opt-parser-defs
 TABLEGEN_OUTPUT.WinLinkOptions.td= \
 	WinLinkOptions.inc|-gen-opt-parser-defs
 
--- a/external/bsd/ntp/Makefile.inc	Sat Sep 21 19:51:33 2013 +0000
+++ b/external/bsd/ntp/Makefile.inc	Sat Sep 21 22:28:12 2013 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.11 2012/02/01 20:48:01 kardel Exp $
+#	$NetBSD: Makefile.inc,v 1.12 2013/09/21 22:28:12 joerg Exp $
 
 .if !defined(NTP_MAKEFILE_INC)
 NTP_MAKEFILE_INC=yes
@@ -8,7 +8,8 @@
 CWARNFLAGS+=	-Wno-missing-noreturn
 CWARNFLAGS.clang+=	-Wno-unneeded-internal-declaration \
 			-Wno-format-security \
-			-Wno-parentheses -Wno-constant-logical-operand
+			-Wno-parentheses -Wno-constant-logical-operand \
+			-Wno-error=unused-const-variable
 
 WARNS?=	4
 
--- a/external/bsd/tcpdump/bin/Makefile	Sat Sep 21 19:51:33 2013 +0000
+++ b/external/bsd/tcpdump/bin/Makefile	Sat Sep 21 22:28:12 2013 +0000
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.8 2013/04/06 19:33:07 christos Exp $	
+#	$NetBSD: Makefile,v 1.9 2013/09/21 22:28:12 joerg Exp $	
 
 WARNS?=	1	# XXX: need to cleanup later
 
-CWARNFLAGS.clang+=	-Wno-constant-logical-operand
+CWARNFLAGS.clang+=	-Wno-constant-logical-operand -Wno-error=unused-function
 
 .include <bsd.own.mk>
 
--- a/lib/libm/Makefile	Sat Sep 21 19:51:33 2013 +0000
+++ b/lib/libm/Makefile	Sat Sep 21 22:28:12 2013 +0000
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.141 2013/08/22 08:24:30 martin Exp $
+#  $NetBSD: Makefile,v 1.142 2013/09/21 22:28:12 joerg Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -320,6 +320,9 @@
 .include "${.CURDIR}/complex/Makefile.inc"
 .endif
 
+COPTS.compat_cabs.c+=	${${ACTIVE_CC} == "clang":? -Wno-incompatible-library-redeclaration :}
+COPTS.compat_cabsf.c+=	${${ACTIVE_CC} == "clang":? -Wno-incompatible-library-redeclaration :}
+
 .include "${.CURDIR}/gen/Makefile.inc"
 .include <bsd.lib.mk>
 .include <bsd.subdir.mk>
--- a/sys/conf/Makefile.kern.inc	Sat Sep 21 19:51:33 2013 +0000
+++ b/sys/conf/Makefile.kern.inc	Sat Sep 21 22:28:12 2013 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.161 2013/08/09 09:08:47 skrll Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.162 2013/09/21 22:28:12 joerg Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -89,6 +89,8 @@
 CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == "clang":? \
     -Wno-shift-count-negative -Wno-shift-count-overflow:}
 
+CWARNFLAGS.ioconf.c= ${${ACTIVE_CC} == "clang":? -Wno-unused-const-variable :}
+
 CFLAGS+=	-ffreestanding -fno-zero-initialized-in-bss
 CFLAGS+=	${DEBUG} ${COPTS}
 AFLAGS+=	-D_LOCORE -Wa,--fatal-warnings
--- a/usr.bin/nvi/Makefile.inc	Sat Sep 21 19:51:33 2013 +0000
+++ b/usr.bin/nvi/Makefile.inc	Sat Sep 21 22:28:12 2013 +0000
@@ -1,6 +1,8 @@
-#	$NetBSD: Makefile.inc,v 1.2 2008/07/13 03:44:41 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.3 2013/09/21 22:28:12 joerg Exp $
 
 .include <bsd.own.mk>
 
 DIST= ${NETBSDSRCDIR}/dist/nvi
 .PATH: ${DIST}
+
+CWARNFLAGS.clang+=	-Wno-error=unused-const-variable