From owner-svn-src-vendor@FreeBSD.ORG Thu May 3 09:57:53 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEBF61065672; Thu, 3 May 2012 09:57:53 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B53428FC16; Thu, 3 May 2012 09:57:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q439vrlV031209; Thu, 3 May 2012 09:57:53 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q439vrC0031204; Thu, 3 May 2012 09:57:53 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201205030957.q439vrC0031204@svn.freebsd.org> From: Baptiste Daroussin Date: Thu, 3 May 2012 09:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234949 - in vendor/byacc: . byacc-20120115 byacc-20120115/package byacc-20120115/package/debian byacc-20120115/package/debian/source byacc-20120115/package/pkgsrc byacc-20120115/test d... X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 09:57:53 -0000 Author: bapt Date: Thu May 3 09:57:52 2012 New Revision: 234949 URL: http://svn.freebsd.org/changeset/base/234949 Log: Import byacc 20120115 Approved by: des (mentor) Added: vendor/byacc/ vendor/byacc/byacc-20120115/ vendor/byacc/byacc-20120115/ACKNOWLEDGEMENTS vendor/byacc/byacc-20120115/AUTHORS vendor/byacc/byacc-20120115/CHANGES vendor/byacc/byacc-20120115/Makefile.old (contents, props changed) vendor/byacc/byacc-20120115/NEW_FEATURES vendor/byacc/byacc-20120115/NOTES vendor/byacc/byacc-20120115/NO_WARRANTY vendor/byacc/byacc-20120115/README vendor/byacc/byacc-20120115/VERSION vendor/byacc/byacc-20120115/aclocal.m4 vendor/byacc/byacc-20120115/closure.c (contents, props changed) vendor/byacc/byacc-20120115/config.guess (contents, props changed) vendor/byacc/byacc-20120115/config.sub (contents, props changed) vendor/byacc/byacc-20120115/config_h.in (contents, props changed) vendor/byacc/byacc-20120115/configure (contents, props changed) vendor/byacc/byacc-20120115/configure.in (contents, props changed) vendor/byacc/byacc-20120115/defs.h (contents, props changed) vendor/byacc/byacc-20120115/descrip.mms vendor/byacc/byacc-20120115/error.c (contents, props changed) vendor/byacc/byacc-20120115/graph.c (contents, props changed) vendor/byacc/byacc-20120115/install-sh (contents, props changed) vendor/byacc/byacc-20120115/lalr.c (contents, props changed) vendor/byacc/byacc-20120115/lr0.c (contents, props changed) vendor/byacc/byacc-20120115/main.c (contents, props changed) vendor/byacc/byacc-20120115/makefile.in (contents, props changed) vendor/byacc/byacc-20120115/mkpar.c (contents, props changed) vendor/byacc/byacc-20120115/output.c (contents, props changed) vendor/byacc/byacc-20120115/package/ vendor/byacc/byacc-20120115/package/byacc.spec vendor/byacc/byacc-20120115/package/debian/ vendor/byacc/byacc-20120115/package/debian/changelog vendor/byacc/byacc-20120115/package/debian/compat vendor/byacc/byacc-20120115/package/debian/control vendor/byacc/byacc-20120115/package/debian/copyright vendor/byacc/byacc-20120115/package/debian/docs vendor/byacc/byacc-20120115/package/debian/postinst vendor/byacc/byacc-20120115/package/debian/prerm vendor/byacc/byacc-20120115/package/debian/rules (contents, props changed) vendor/byacc/byacc-20120115/package/debian/source/ vendor/byacc/byacc-20120115/package/debian/source/format vendor/byacc/byacc-20120115/package/debian/watch vendor/byacc/byacc-20120115/package/pkgsrc/ vendor/byacc/byacc-20120115/package/pkgsrc/DESCR vendor/byacc/byacc-20120115/package/pkgsrc/Makefile (contents, props changed) vendor/byacc/byacc-20120115/package/pkgsrc/PLIST vendor/byacc/byacc-20120115/package/pkgsrc/distinfo vendor/byacc/byacc-20120115/reader.c (contents, props changed) vendor/byacc/byacc-20120115/skeleton.c (contents, props changed) vendor/byacc/byacc-20120115/symtab.c (contents, props changed) vendor/byacc/byacc-20120115/test/ vendor/byacc/byacc-20120115/test/README vendor/byacc/byacc-20120115/test/calc.output vendor/byacc/byacc-20120115/test/calc.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/calc.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/calc.y (contents, props changed) vendor/byacc/byacc-20120115/test/calc1.output vendor/byacc/byacc-20120115/test/calc1.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/calc1.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/calc1.y (contents, props changed) vendor/byacc/byacc-20120115/test/calc2.output vendor/byacc/byacc-20120115/test/calc2.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/calc2.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/calc2.y (contents, props changed) vendor/byacc/byacc-20120115/test/calc3.output vendor/byacc/byacc-20120115/test/calc3.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/calc3.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/calc3.y (contents, props changed) vendor/byacc/byacc-20120115/test/code_calc.code.c (contents, props changed) vendor/byacc/byacc-20120115/test/code_calc.output vendor/byacc/byacc-20120115/test/code_calc.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/code_calc.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/code_calc.y (contents, props changed) vendor/byacc/byacc-20120115/test/code_error.code.c (contents, props changed) vendor/byacc/byacc-20120115/test/code_error.output vendor/byacc/byacc-20120115/test/code_error.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/code_error.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/code_error.y (contents, props changed) vendor/byacc/byacc-20120115/test/error.output vendor/byacc/byacc-20120115/test/error.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/error.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/error.y (contents, props changed) vendor/byacc/byacc-20120115/test/ftp.output vendor/byacc/byacc-20120115/test/ftp.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/ftp.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/ftp.y (contents, props changed) vendor/byacc/byacc-20120115/test/grammar.output vendor/byacc/byacc-20120115/test/grammar.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/grammar.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/grammar.y (contents, props changed) vendor/byacc/byacc-20120115/test/pure_calc.output vendor/byacc/byacc-20120115/test/pure_calc.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/pure_calc.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/pure_calc.y (contents, props changed) vendor/byacc/byacc-20120115/test/pure_error.output vendor/byacc/byacc-20120115/test/pure_error.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/pure_error.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/pure_error.y (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc-s.output vendor/byacc/byacc-20120115/test/quote_calc-s.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc-s.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc.output vendor/byacc/byacc-20120115/test/quote_calc.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc.y (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc2-s.output vendor/byacc/byacc-20120115/test/quote_calc2-s.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc2-s.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc2.output vendor/byacc/byacc-20120115/test/quote_calc2.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc2.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc2.y (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc3-s.output vendor/byacc/byacc-20120115/test/quote_calc3-s.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc3-s.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc3.output vendor/byacc/byacc-20120115/test/quote_calc3.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc3.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc3.y (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc4-s.output vendor/byacc/byacc-20120115/test/quote_calc4-s.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc4-s.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc4.output vendor/byacc/byacc-20120115/test/quote_calc4.tab.c (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc4.tab.h (contents, props changed) vendor/byacc/byacc-20120115/test/quote_calc4.y (contents, props changed) vendor/byacc/byacc-20120115/test/run_lint.sh (contents, props changed) vendor/byacc/byacc-20120115/test/run_make.sh (contents, props changed) vendor/byacc/byacc-20120115/test/run_test.sh (contents, props changed) vendor/byacc/byacc-20120115/verbose.c (contents, props changed) vendor/byacc/byacc-20120115/vmsbuild.com vendor/byacc/byacc-20120115/warshall.c (contents, props changed) vendor/byacc/byacc-20120115/yacc.1 (contents, props changed) vendor/byacc/dist/ vendor/byacc/dist/ACKNOWLEDGEMENTS vendor/byacc/dist/AUTHORS vendor/byacc/dist/CHANGES vendor/byacc/dist/Makefile.old (contents, props changed) vendor/byacc/dist/NEW_FEATURES vendor/byacc/dist/NOTES vendor/byacc/dist/NO_WARRANTY vendor/byacc/dist/README vendor/byacc/dist/VERSION vendor/byacc/dist/aclocal.m4 vendor/byacc/dist/closure.c (contents, props changed) vendor/byacc/dist/config.guess (contents, props changed) vendor/byacc/dist/config.sub (contents, props changed) vendor/byacc/dist/config_h.in (contents, props changed) vendor/byacc/dist/configure (contents, props changed) vendor/byacc/dist/configure.in (contents, props changed) vendor/byacc/dist/defs.h (contents, props changed) vendor/byacc/dist/descrip.mms vendor/byacc/dist/error.c (contents, props changed) vendor/byacc/dist/graph.c (contents, props changed) vendor/byacc/dist/install-sh (contents, props changed) vendor/byacc/dist/lalr.c (contents, props changed) vendor/byacc/dist/lr0.c (contents, props changed) vendor/byacc/dist/main.c (contents, props changed) vendor/byacc/dist/makefile.in (contents, props changed) vendor/byacc/dist/mkpar.c (contents, props changed) vendor/byacc/dist/output.c (contents, props changed) vendor/byacc/dist/package/ vendor/byacc/dist/package/byacc.spec vendor/byacc/dist/package/debian/ vendor/byacc/dist/package/debian/changelog vendor/byacc/dist/package/debian/compat vendor/byacc/dist/package/debian/control vendor/byacc/dist/package/debian/copyright vendor/byacc/dist/package/debian/docs vendor/byacc/dist/package/debian/postinst vendor/byacc/dist/package/debian/prerm vendor/byacc/dist/package/debian/rules (contents, props changed) vendor/byacc/dist/package/debian/source/ vendor/byacc/dist/package/debian/source/format vendor/byacc/dist/package/debian/watch vendor/byacc/dist/package/pkgsrc/ vendor/byacc/dist/package/pkgsrc/DESCR vendor/byacc/dist/package/pkgsrc/Makefile (contents, props changed) vendor/byacc/dist/package/pkgsrc/PLIST vendor/byacc/dist/package/pkgsrc/distinfo vendor/byacc/dist/reader.c (contents, props changed) vendor/byacc/dist/skeleton.c (contents, props changed) vendor/byacc/dist/symtab.c (contents, props changed) vendor/byacc/dist/test/ vendor/byacc/dist/test/README vendor/byacc/dist/test/calc.output vendor/byacc/dist/test/calc.tab.c (contents, props changed) vendor/byacc/dist/test/calc.tab.h (contents, props changed) vendor/byacc/dist/test/calc.y (contents, props changed) vendor/byacc/dist/test/calc1.output vendor/byacc/dist/test/calc1.tab.c (contents, props changed) vendor/byacc/dist/test/calc1.tab.h (contents, props changed) vendor/byacc/dist/test/calc1.y (contents, props changed) vendor/byacc/dist/test/calc2.output vendor/byacc/dist/test/calc2.tab.c (contents, props changed) vendor/byacc/dist/test/calc2.tab.h (contents, props changed) vendor/byacc/dist/test/calc2.y (contents, props changed) vendor/byacc/dist/test/calc3.output vendor/byacc/dist/test/calc3.tab.c (contents, props changed) vendor/byacc/dist/test/calc3.tab.h (contents, props changed) vendor/byacc/dist/test/calc3.y (contents, props changed) vendor/byacc/dist/test/code_calc.code.c (contents, props changed) vendor/byacc/dist/test/code_calc.output vendor/byacc/dist/test/code_calc.tab.c (contents, props changed) vendor/byacc/dist/test/code_calc.tab.h (contents, props changed) vendor/byacc/dist/test/code_calc.y (contents, props changed) vendor/byacc/dist/test/code_error.code.c (contents, props changed) vendor/byacc/dist/test/code_error.output vendor/byacc/dist/test/code_error.tab.c (contents, props changed) vendor/byacc/dist/test/code_error.tab.h (contents, props changed) vendor/byacc/dist/test/code_error.y (contents, props changed) vendor/byacc/dist/test/error.output vendor/byacc/dist/test/error.tab.c (contents, props changed) vendor/byacc/dist/test/error.tab.h (contents, props changed) vendor/byacc/dist/test/error.y (contents, props changed) vendor/byacc/dist/test/ftp.output vendor/byacc/dist/test/ftp.tab.c (contents, props changed) vendor/byacc/dist/test/ftp.tab.h (contents, props changed) vendor/byacc/dist/test/ftp.y (contents, props changed) vendor/byacc/dist/test/grammar.output vendor/byacc/dist/test/grammar.tab.c (contents, props changed) vendor/byacc/dist/test/grammar.tab.h (contents, props changed) vendor/byacc/dist/test/grammar.y (contents, props changed) vendor/byacc/dist/test/pure_calc.output vendor/byacc/dist/test/pure_calc.tab.c (contents, props changed) vendor/byacc/dist/test/pure_calc.tab.h (contents, props changed) vendor/byacc/dist/test/pure_calc.y (contents, props changed) vendor/byacc/dist/test/pure_error.output vendor/byacc/dist/test/pure_error.tab.c (contents, props changed) vendor/byacc/dist/test/pure_error.tab.h (contents, props changed) vendor/byacc/dist/test/pure_error.y (contents, props changed) vendor/byacc/dist/test/quote_calc-s.output vendor/byacc/dist/test/quote_calc-s.tab.c (contents, props changed) vendor/byacc/dist/test/quote_calc-s.tab.h (contents, props changed) vendor/byacc/dist/test/quote_calc.output vendor/byacc/dist/test/quote_calc.tab.c (contents, props changed) vendor/byacc/dist/test/quote_calc.tab.h (contents, props changed) vendor/byacc/dist/test/quote_calc.y (contents, props changed) vendor/byacc/dist/test/quote_calc2-s.output vendor/byacc/dist/test/quote_calc2-s.tab.c (contents, props changed) vendor/byacc/dist/test/quote_calc2-s.tab.h (contents, props changed) vendor/byacc/dist/test/quote_calc2.output vendor/byacc/dist/test/quote_calc2.tab.c (contents, props changed) vendor/byacc/dist/test/quote_calc2.tab.h (contents, props changed) vendor/byacc/dist/test/quote_calc2.y (contents, props changed) vendor/byacc/dist/test/quote_calc3-s.output vendor/byacc/dist/test/quote_calc3-s.tab.c (contents, props changed) vendor/byacc/dist/test/quote_calc3-s.tab.h (contents, props changed) vendor/byacc/dist/test/quote_calc3.output vendor/byacc/dist/test/quote_calc3.tab.c (contents, props changed) vendor/byacc/dist/test/quote_calc3.tab.h (contents, props changed) vendor/byacc/dist/test/quote_calc3.y (contents, props changed) vendor/byacc/dist/test/quote_calc4-s.output vendor/byacc/dist/test/quote_calc4-s.tab.c (contents, props changed) vendor/byacc/dist/test/quote_calc4-s.tab.h (contents, props changed) vendor/byacc/dist/test/quote_calc4.output vendor/byacc/dist/test/quote_calc4.tab.c (contents, props changed) vendor/byacc/dist/test/quote_calc4.tab.h (contents, props changed) vendor/byacc/dist/test/quote_calc4.y (contents, props changed) vendor/byacc/dist/test/run_lint.sh (contents, props changed) vendor/byacc/dist/test/run_make.sh (contents, props changed) vendor/byacc/dist/test/run_test.sh (contents, props changed) vendor/byacc/dist/verbose.c (contents, props changed) vendor/byacc/dist/vmsbuild.com vendor/byacc/dist/warshall.c (contents, props changed) vendor/byacc/dist/yacc.1 (contents, props changed) Added: vendor/byacc/byacc-20120115/ACKNOWLEDGEMENTS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/byacc/byacc-20120115/ACKNOWLEDGEMENTS Thu May 3 09:57:52 2012 (r234949) @@ -0,0 +1,25 @@ + Berkeley Yacc owes much to the unflagging efforts of Keith Bostic. +His badgering kept me working on it long after I was ready to quit. + + Berkeley Yacc is based on the excellent algorithm for computing LALR(1) +lookaheads developed by Tom Pennello and Frank DeRemer. The algorithm is +described in their almost impenetrable article in TOPLAS 4,4. + + Finally, much of the credit for the latest version must go to those +who pointed out deficiencies of my earlier releases. Among the most +prolific contributors were + + Benson I. Margulies + Dave Gentzel + Antoine Verheijen + Peter S. Housel + Dale Smith + Ozan Yigit + John Campbell + Bill Sommerfeld + Paul Hilfinger + Gary Bridgewater + Dave Bakken + Dan Lanciani + Richard Sargent + Parag Patel Added: vendor/byacc/byacc-20120115/AUTHORS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/byacc/byacc-20120115/AUTHORS Thu May 3 09:57:52 2012 (r234949) @@ -0,0 +1,7 @@ +-- $Id: AUTHORS,v 1.1 2010/06/06 20:31:51 tom Exp $ +-- vile:txtmode +-- This file is used by a script that collects contributor information and +-- resolves nicknames vs fullnames. +dickey Thomas Dickey +schmitz Sylvain Schmitz +unknown Robert Corbett Added: vendor/byacc/byacc-20120115/CHANGES ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/byacc/byacc-20120115/CHANGES Thu May 3 09:57:52 2012 (r234949) @@ -0,0 +1,1156 @@ +2012-01-15 Thomas E. Dickey + + * package/debian/copyright: bump + + * test/run_make.sh: workaround for breakage due to GNU make 3.82 + + * test/run_make.sh: + tested with Solaris 10 (bison 1.875) and added scripting to exercise + the /usr/ccs/bin/yacc executable + + * test/grammar.tab.c: regen + + * test/grammar.y: modify to also build with Solaris yacc + + * VERSION, package/debian/changelog, package/byacc.spec: bump + + * test/calc1.output, test/calc1.tab.c: regen + + * test/calc1.y: + undo the change made to appease bison, since it was only a warning. + + * test/pure_calc.tab.c, test/pure_error.tab.c: regen + + * test/run_make.sh: another fix for running from top-level directory + + * makefile.in: + ensure that check_make rule depends on having byacc built. + + * test/run_make.sh: fixes for building from parent directory + + * test/pure_error.y, test/pure_calc.y: bison-fixes + + * test/calc2.tab.c, test/calc3.tab.c, test/code_error.code.c, test/ftp.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c: + regen + + * test/calc2.y, test/calc3.y, test/code_error.y, test/ftp.y: + byacc already declares yyerror + + * test/pure_error.y, test/pure_calc.y: + modified to help make the files build with bison + + * test/run_make.sh: + supply a "%pure-parser" directive when bison needs it. + + * test/code_calc.code.c: regen + + * test/code_calc.y: modified to help make the files build with bison + + * yacc.1: + in testing, found that %expect did not work as documented for bison. + do not recommend it for portable code. + + * test/run_make.sh: workaround breakage in bison's %expect directive + + * test/grammar.y: modified to help make the files build with bison + + * test/calc1.output, test/calc1.tab.c, test/grammar.tab.c: regen + + * test/calc1.y: quiet a spurious warning from bison 2.3 + + * test/calc1.tab.c: regen + + * test/calc1.y: modified to help make the files build with bison + + * yacc.1: comment on "-y" and "-P" options. + + * yacc.1: comment on portability + + * test/ftp.tab.c, test/quote_calc-s.tab.c, test/quote_calc.tab.c, test/quote_calc2-s.tab.c, test/quote_calc3-s.tab.c: + regen + + * test/ftp.y: modified to help make the files build with bison + (bison's "-y" option is of no use in providing "yacc" compatibility) + + * test/quote_calc2.tab.c, test/quote_calc3.tab.c, test/quote_calc4-s.tab.c, test/quote_calc4.tab.c: + regen + + * test/code_calc.y, test/quote_calc2.y, test/quote_calc.y, test/quote_calc4.y, test/quote_calc3.y: + modified to help make the files build with bison + + * test/calc.tab.c: regen + + * test/calc.y: modified to help make the files build with bison + + * test/error.tab.c: regen + + * test/error.y: modified to help make the files build with bison + + * test/calc2.tab.c, test/calc3.tab.c, test/code_error.code.c: regen + + * test/run_make.sh: + check for older bisons which (2.3 for instance) do not support pure parsers + + * test/code_error.y, test/calc3.y, test/calc2.y: + modified to help make the files build with bison + + * test/run_test.sh: use $opt2 in filenames of the generated files + + * test/quote_calc2-s.tab.c, test/quote_calc3-s.tab.c, test/quote_calc4-s.tab.c, test/quote_calc-s.tab.c, test/quote_calc.tab.c, test/quote_calc2.tab.c, test/quote_calc3.tab.c, test/quote_calc4.tab.c: + regen + +2012-01-14 Thomas E. Dickey + + * test/calc2.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c, test/calc1.tab.c: + regen + + * output.c: Several changes: + a) add YYLEX_PARAM_TYPE, like YYPARSE_PARAM_TYPE, but for yylex. + b) modify definitions for YYLEX_DECL to be more like YYPARSE_DECL, + using YYLEX_PARAM_TYPE and YYLEX_PARAM. + c) add ifdef's around #define's for YYERROR_DECL and YYERROR_CALL, + to help with redefinitions. + + * test/pure_calc.tab.c: + modified to help make the files build with bison + + * test/run_make.sh: + start work on followup, to check if the generated files build with bison. + + * test/pure_calc.y, test/pure_error.tab.c: + modified to help make the files build with bison + + * test/calc3.tab.c: regen + + * test/quote_calc-s.output, test/quote_calc-s.tab.c, test/quote_calc-s.tab.h, test/quote_calc2-s.output, test/quote_calc2-s.tab.c, test/quote_calc2-s.tab.h, test/quote_calc3-s.output, test/quote_calc3-s.tab.c, test/quote_calc3-s.tab.h, test/quote_calc4-s.output, test/quote_calc4-s.tab.c, test/quote_calc4-s.tab.h: + RCS_BASE + + * test/run_test.sh: generate/test with "-s" option applied. + +2012-01-13 Thomas E. Dickey + + * package/debian/changelog, package/byacc.spec, VERSION: bump + + * yacc.1: improve documentation of -s option + + * yacc.1: note that yacc ignores -y + + * main.c: add -s option to usage message. + + * test/quote_calc3.output, test/quote_calc3.tab.c, test/quote_calc4.output, test/quote_calc4.tab.c, test/quote_calc4.tab.h, test/quote_calc3.y, test/quote_calc.tab.h, test/quote_calc.output, test/quote_calc.tab.c, test/quote_calc2.output, test/quote_calc2.tab.c, test/quote_calc2.tab.h, test/quote_calc3.tab.h, test/quote_calc4.y, test/quote_calc.y, test/quote_calc2.y: + RCS_BASE + + * configure: regen + + * aclocal.m4: resync with my-autoconf, i.e., fixes for CF_XOPEN_SOURCE + +2011-12-19 Thomas E. Dickey + + * package/debian/changelog, package/byacc.spec, VERSION: bump + + * yacc.1, output.c, main.c, defs.h: + add "-s" option to suppress generating #define's based on string contents + in a %token statement. For instance + %token EQLS "Equals" + would generate + #define EQLS 256 + #define Equals 257 + Simply suppressing the second #define makes the behavior closer to yacc. + (report by Paulo Andrade). + +2011-09-08 Thomas E. Dickey + + * package/debian/changelog, package/byacc.spec, VERSION: bump + + * output.c: + fix some more interaction between -i and -d flags to ensure YYERRCODE + and YYSTYPE are declared, tested with cproto. + +2011-09-07 Thomas E. Dickey + + * yacc.1: document "-i" option. + + * package/debian/changelog, package/byacc.spec, VERSION: bump + + * output.c: fix an interaction between -i and -d + + * test/code_error.code.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c, test/calc.tab.c, test/calc1.tab.c, test/calc2.tab.c, test/calc3.tab.c, test/code_calc.code.c: + regen - changes for "-i" option move the global/impure variables near the + macros that may add a prefix, etc. + + * skeleton.c, output.c, defs.h: changes to support "-i" option. + +2011-09-06 Thomas E. Dickey + + * reader.c: pass explicit file-pointer to write_section() + + * main.c: + add "-i" option, to generate interface-file (suggested by Denis M. Wilson) + +2011-09-05 Thomas E. Dickey + + * configure: regen + + * aclocal.m4: + resync with my-autoconf: CF_ANSI_CC_CHECK (check for $CFLAGS in $CC) + and CF_XOPEN_SOURCE (update aix, cygwin and netbsd checks) + + * defs.h, error.c, reader.c: + add check for missing "}" on %parse-param and %lex-param lines (report by Denis M Wilson) + +2011-04-01 Thomas E. Dickey + + * config.sub: 2011-04-01 + +2011-02-02 Thomas E. Dickey + + * config.guess: 2011-01-01 + +2010-12-29 Thomas E. Dickey + + * defs.h, skeleton.c: + add const qualifier to skeleton data, per NetBSD changes (report by Christos Zoulas) + + * defs.h: + mark all of the error-functions as non-returning (report by Christos Zoulas) + + * test/grammar.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c, test/calc.tab.c, test/calc1.tab.c, test/calc2.tab.c, test/calc3.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c, test/ftp.tab.c: + regen + + * skeleton.c: + use only realloc() rather than realloc+malloc, agree that systems needing this + are very rare (prompted by NetBSD change). + + * test/ftp.tab.c: regen + +2010-12-29 Christos.Zoulas + + * test/ftp.y: + improve example, which was stuck in 19XX and assumed file sizes were longs. + +2010-12-29 Thomas E. Dickey + + * test/ftp.tab.c, test/grammar.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c, test/calc.tab.c, test/calc1.tab.c, test/calc2.tab.c, test/calc3.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c: + regen + + * test/pure_error.y, test/pure_calc.y, test/ftp.y, test/error.y, test/code_error.y, test/code_calc.y, test/calc.y, test/calc3.y, test/calc2.y, test/calc1.y: + use byacc's YYLEX_DECL/YYERROR_DECL symbols to prototype yylex/yyerror + + * skeleton.c: + remove explicit prototype for yylex() via YYLEX_DECL() macro, since that + would prevent declaring yylex() static (request by Christos Zoulas). + + * test/calc2.tab.c, test/calc3.tab.c: regen + +2010-12-29 Christos.Zoulas + + * output.c: correct definition for YYERROR_DECL() + +2010-12-29 Thomas E. Dickey + + * package/debian/changelog, package/byacc.spec, VERSION: bump + +2010-12-26 Thomas E. Dickey + + * defs.h, main.c: + change return-type of allocate() to avoid warnings of alignment problems + + * main.c: Solaris declares chmod() in + + * configure: regen + + * main.c: ifdef'd use of fcntl.h + + * configure.in: add configure checks for fcntl.h, atexit and mkstemp + + * main.c: for cases where mkstemp() is not available, use tempnam/open + + * aclocal.m4: add CF_MKSTEMP + + * aclocal.m4: + improve quoting, deprecate ${name-value} in favor of standard ${name:-value} + +2010-12-25 Thomas E. Dickey + + * main.c: + start revising use of tmpfile(), to make this work with MinGW. Start by + implementing a mkstemp() alternative - noting that mkstemp() also is broken + for MinGW. + + * package/debian/changelog, package/byacc.spec, VERSION: bump + +2010-11-27 Thomas E. Dickey + + * package/byacc.spec, package/debian/changelog, VERSION: bump + + * test/calc2.tab.c, test/calc3.tab.c: regen + + * output.c: + corrected use of %parse-param value in yyerror(); it doesn't use &yylval + (report by Clifford Yapp) + +2010-11-26 Thomas E. Dickey + + * skeleton.c: typo + + * output.c: + correct line-numbering when "-r" option is used; the 'outline' variable + should only be incremented when writing to the code-file. + + * test/code_calc.code.c, test/code_error.code.c: regen + + * yacc.1: bump date + + * yacc.1: comment on -b option vs -r + + * test/calc2.tab.c, test/calc2.y, test/calc3.tab.c, test/calc3.y, test/ftp.tab.c, test/grammar.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c, test/calc.tab.c, test/calc1.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c: + regen + + * output.c: + improve on YYERROR_DECL(), adding dummy params which can be used for the + actual function declaration. Also add YYERROR_CALL(). The two macros + simplify maintaining sets of grammars which may/may not be pure. + + * test/calc1.y, test/ftp.tab.c, test/grammar.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c, test/calc.tab.c, test/calc1.tab.c, test/calc2.tab.c, test/calc3.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c: + regen + + * output.c: generate yyerror() calls in output.c + This is for compatibility with bison, which passes the yylval to yyerror + when the %parse-param feature is used. + + * skeleton.c, defs.h: generate yyerror() calls in output.c + + * output.c: simplified a little, using putc_code() and putl_code() + + * test/calc1.tab.h: regen + + * reader.c: + improve ifdef for YYSTYPE union declaration (report by Clifford Yapp) + + * reader.c: + accept underscore as a replacement for dash in command names, e.g., + "%pure_parser" vs "%pure-parser". + + * test/calc1.tab.c: regen + + * output.c, reader.c: + also ifdef YYSTYPE declaration in the generated code (report by Clifford Yapp) + + * package/debian/changelog, package/byacc.spec, VERSION: bump + +2010-11-24 Thomas E. Dickey + + * main.c, defs.h, symtab.c, error.c: reduce global variables + + * package/debian/changelog, package/byacc.spec, VERSION: bump + + * reader.c: + amend fix for Redhat #112617 to still call default_action_warning() for + empty rules (report by Bruce Cran). + +2010-11-22 Thomas E. Dickey + + * output.c: + add ifdef to guard against redefinition of YYSTYPE union (request by Clifford Yapp). + + * test/calc1.tab.c: regen + + * test/calc1.y: cleanup compiler warnings + + * test/grammar.y: add "%expect" + + * test/calc1.tab.h: regen + + * test/calc1.output, test/calc1.tab.c, test/calc1.tab.h: RCS_BASE + + * test/calc2.tab.c, test/calc3.tab.c: regen + + * test/calc1.y: + advanced example from Steve Johnson's paper, uses unions + + * test/calc3.y, test/calc2.y: init 'base', so examples can run + + * test/ftp.tab.c, test/ftp.y: tweaks to compile with g++ + + * output.c: compensate for fix in reader.c + + * reader.c: + add/use putc_both() and puts_both(), incidentally fixing a place where + a union copied to the union_file may be missing the end of the last line. + + * package/debian/changelog, package/byacc.spec, VERSION: bump + +2010-09-28 Thomas E. Dickey + + * config.guess: 2010-09-24 + +2010-09-10 Thomas E. Dickey + + * config.sub: 2010-09-11 + +2010-06-10 Thomas E. Dickey + + * yacc.1, package/debian/changelog, package/byacc.spec, VERSION: + bump to 2010/06/10 + +2010-06-09 Thomas E. Dickey + + * reader.c: free declarations in leak-testing code. + + * main.c: close code_file if -r option used, for leak-testing + + * defs.h, reader.c: + improve %lex-param / %parse-param implementation by allowing for arrays to + be passed as parameters, e.g., "int regs[26]". + + * test/calc3.tab.c, test/calc3.y, test/calc3.output, test/calc3.tab.h, test/calc2.tab.c, test/calc2.y, test/calc2.tab.h, test/calc2.output: + RCS_BASE + + * output.c: + improve %lex-param / %parse-param implementation by allowing for arrays to + be passed as parameters, e.g., "int regs[26]". + + * test/calc.tab.c, test/calc.y: + test-cases and reference files for %lex-param / %parse-param + + * makefile.in: add docs-rule, for html/pdf/txt form of manpage + + * configure: regen + + * aclocal.m4: add CF_XOPEN_SOURCE, etc. + + * configure.in: + use CF_XOPEN_SOURCE check to ensure that strdup is in scope, e.g., for c89 + + * test/ftp.tab.c, test/ftp.y, reader.c, symtab.c, verbose.c, lr0.c, main.c, mkpar.c, output.c, defs.h, closure.c: + fix warnings from clang --analyze + +2010-06-08 Thomas E. Dickey + + * output.c: fix to build with c89, etc. + + * reader.c: gcc warning + + * test/ftp.tab.c, test/ftp.y, test/calc.tab.c, test/code_calc.code.c, test/code_error.code.c, test/code_error.y, test/code_calc.y, test/calc.y, test/pure_error.tab.c, test/error.tab.c, test/error.y, test/pure_error.y, test/pure_calc.tab.c, test/pure_calc.y: + modified test-cases to allow them to compile, to validate pure-parser changes. + updated reference files to match. + + * output.c: + move call for output_stype() earlier since it is used in pure-parser declarations + + * test/grammar.tab.c, test/grammar.y: + modified test-cases to allow them to compile, to validate pure-parser changes. + updated reference files to match. + + * test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c: + regen + + * yacc.1: document %lex-param and %parse-param + + * test/run_lint.sh, test/run_make.sh: RCS_BASE + + * test/run_test.sh: + further modify to allow build-directory to be in a different location by + passing this directory's location as a parameter to the script. + + * makefile.in: + add check_make and check_lint rules to help validate the generated files + in the test-directory + +2010-06-07 Thomas E. Dickey + + * test/pure_calc.tab.c, test/pure_error.tab.c: RCS_BASE + + * test/run_test.sh: + provide for testing -r and -P options by checking if the ".y" filename + begins with "code_" or "pure_", respectively. + + * test/code_error.code.c, test/code_error.tab.c, test/code_error.tab.h, test/code_calc.code.c, test/code_calc.tab.c, test/code_calc.tab.h, test/pure_calc.output, test/pure_calc.tab.h, test/pure_error.output, test/pure_error.tab.h, test/code_calc.output, test/code_error.output: + RCS_BASE + + * test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c: regen + + * test/run_test.sh: + changes to support running "make check" in a separate build-tree + + * main.c: add "-P" to usage message + + * reader.c: use UCH() macro to hide casts. + +2010-06-07 Andres.Mejia + + * main.c, output.c, reader.c, defs.h, skeleton.c: + Fix the output order of the generated parse code file. This allows for + the use of YYPARSE_PARAM, by having the output that checks for + YYPARSE_PARAM to be defined come after the C code block in the + definitions section of a yacc file. + + Implement support for YYLEX_PARAM, similar to bison. This is useful for + support for building reentrant lexers with flex. + + Fix a compatibility issue with bison's pure-parser option. Bison + defines yylex as sending at least one parameter, &yylval, as the first + parameter and doesn't seem to have an easy way to remove that parameter. + This on the other hand is rather convenient to support saving to yylval + from flex when building reentrant lexers and parsers. + + Add support for the %parse-param and %lex-param directives used in + bison. This change bears some similarity to NetBSD's changes to byacc + at http://www.mail-archive.com/source-changes-full@netbsd.org/msg08143.html + + Bison allows for POSIX yacc emulation via a yacc directive in the yacc + file, and also via a command line switch. Implement this feature as a + no-op for byacc, since byacc is designed to be POSIX yacc compatible + anyway. This allows for better compatibility with yacc sources written + for bison. + +2010-06-07 Thomas E. Dickey + + * VERSION: bump to 2010/06/07 + +2010-06-06 Thomas E. Dickey + + * test/calc.tab.c, configure: regen + + * skeleton.c: + move #include's down into the generated code, to allow user-defined code + to override feature definitions, particularly with stdlib.h (request by + Marcus Kool). + + * lr0.c, error.c, reader.c, defs.h: + strict gcc 3.4.6 warnings on 64-bit platform + + * aclocal.m4, configure.in: add check for lint + + * makefile.in: add lint rule + + * defs.h, closure.c, lr0.c, warshall.c, main.c: + fix gcc warnings, mostly for 64-bit platform + + * aclocal.m4: + add macros for checking ctags/etags, e.g., to work with NetBSD pkgsrc + + * makefile.in: add etags/TAGS if available + + * configure.in: add configure check for actual ctags and etags programs + + * package/debian/copyright: add copyright notices for non-PD files + + * package/debian/changelog: + incorporated scripts in upstream to use for test-builds + + * makefile.in: drop mkdirs.sh, just use "mkdir -p" + + * AUTHORS: nicknames for some contributors (see CHANGES for details) + + * package/byacc.spec: RPM file for byacc + + * VERSION: bump to 2010/06/06 + + * aclocal.m4: add copyright notice, from "my-autoconf" macros + http://invisible-island.net/autoconf/autoconf.html + + * package/RCS, package/debian/RCS, package/debian/source/RCS, package/pkgsrc/RCS: + PERMIT FILE + + * aclocal.m4: resync with my-autoconf. summary of changes: + a) CF_ADD_CFLAGS, etc., improve quoting of ifelse() parameter + b) CF_DISABLE_ECHO, change indent-convention for substituted makefile + c) CF_GCC_VERSION, ignore stderr + d) CF_GCC_WARNINGS, adjust options to work with c89 wrapper of gcc + +2010-04-20 Thomas E. Dickey + + * package/debian/changelog, package/debian/compat, package/debian/control, package/debian/copyright, package/debian/docs, package/debian/postinst, package/debian/prerm, package/debian/rules, package/debian/watch: + scripts from Debian package + +2010-02-16 Thomas E. Dickey + + * yacc.1: document -P and bison-extensions + + * test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c, test/error.tab.c: + regen + + * output.c: implement %pure-parser + + * skeleton.c: + implement %pure-parser, like bison. To help with this, changed the stack + variables, putting them into a struct. + + * reader.c: implement %pure-parser + + * defs.h: modified skeleton to support %pure-parser feature + + * main.c: add -P option to set %pure-parser + + * output.c: + make -r and -p options work together. The -r option splits the generated + parser into code/table files; for this case we cannot use static data. + Also, we have to repeat the #define's used for prefix (-p) as well as the + redeclaration of yyparse(). Finally, allow any of the prefixed names to + be overridden, e.g., by passing a -D option to the compiler. Make that + a little more readable by putting a blank line before each chunk. + + * defs.h: add definitions for %pure-parser + + * skeleton.c: + put blank line before/after the redeclaration of yyparse() + + * output.c: allow for other program redefining yylex() + + * skeleton.c: + split-off xdecls[] array, to move declaration of yyparse() after #define's + + * defs.h: split-out xdecls[] + + * VERSION: bump + + * configure: regen + + * aclocal.m4: add CF_REMOVE_DEFINE, needed by CF_ADD_CFLAGS + + * aclocal.m4: + resync with my-autoconf CF_ADD_CFLAGS and CF_DISABLE_ECHO changes. + +2010-02-16 Ostap.Cherkashi + + * skeleton.c: fix a memory leak in the generated skeleton + +2010-01-01 Thomas E. Dickey + + * package/debian/source/format: scripts from Debian package + +2009-12-31 Thomas E. Dickey + + * config.guess: 2009-12-30 + + * config.sub: 2009-12-31 + +2009-10-27 Thomas E. Dickey + + * VERSION: 20091027 + + * output.c, mkpar.c, defs.h, lalr.c, closure.c, graph.c, lr0.c, verbose.c, main.c, reader.c: + strict compiler warnings + +2009-10-26 Thomas E. Dickey + + * test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c, test/error.tab.c: + resync + + * main.c, defs.h: introduce some typedefs for portability, etc. + + * makefile.in: + don't remove "*.log" in mostlyclean rule since it interferes with regression + script. + + * configure: regen + + * aclocal.m4: resync with my-autoconf + +2009-08-25 Thomas E. Dickey + + * config.guess, config.sub: 2009-08-19 + +2009-02-21 Thomas E. Dickey + + * VERSION: bump + + * output.c: restore "yylval" symbol, omitted in cleanup on 2008/8/25 + +2008-12-26 Thomas E. Dickey + + * configure: regen with autoconf-2.52 (patched) + +2008-12-25 Thomas E. Dickey + + * test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c: + regenerated + +2008-12-24 Thomas E. Dickey + + * VERSION: bump + + * skeleton.c: + remove ifdef-lint from goto yyerrlab, to quiet gcc warning + +2008-11-26 Thomas E. Dickey + + * verbose.c, main.c, defs.h, mkpar.c, reader.c: + completed implementation of "%expect" (report by Perry E. Metzger). + add "%expect-rr", which is (unlike bison) allowable in LALR parsers. + +2008-11-24 Thomas E. Dickey + + * closure.c, defs.h, error.c, graph.c, lalr.c, lr0.c, main.c, mkpar.c, output.c, reader.c, skeleton.c, symtab.c, verbose.c, warshall.c: + change indent-style (request by Perry E. Metzger) + +2008-08-27 Thomas E. Dickey + + * test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c: + better implementation of YYPARSE_PARAM, using YYPARSE_DECL() macro + + * VERSION: bump + + * skeleton.c: + better implementation of YYPARSE_PARAM, using YYPARSE_DECL() macro + + * test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, skeleton.c: + change YYRECOVERING to YYRECOVERING(), for compatibility with other yacc's. + + * configure: regen'd + + * configure.in: add -Wwrite-strings to warnings + + * test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c, test/error.tab.c: + add YYPARSE_PARAM and YYPARSE_PARAM_TYPE + + * skeleton.c: + add YYPARSE_PARAM (bison) and YYPARSE_PARAM_TYPE (FreeBSD) features. + + * main.c, defs.h, output.c, skeleton.c, symtab.c, error.c, reader.c: + fixes for gcc -Wwrite-strings + + * test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c: + generate the tables as static-const (this is an interface change) + + * output.c: realign columns in start_table() + + * output.c: + generate the tables as static-const (this is an interface change) + + * output.c: reorder functions to eliminate forward-references + + * test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c: + remove 'register' keywords + +2008-08-26 Thomas E. Dickey + + * warshall.c, verbose.c, symtab.c, skeleton.c, reader.c, output.c, mkpar.c, main.c, lr0.c, lalr.c, graph.c, error.c, closure.c: + remove 'register' keywords + +2008-08-25 Thomas E. Dickey + + * test/ftp.tab.c: regen'd + + * reader.c: + improve the left-curly fix by testing after blanks, to avoid having a + " {" at the beginning of a line. + + * test/error.tab.c, test/grammar.tab.c: regen'd + + * output.c: + move the remaining newline-counting into write_XXX functions. + + * test/calc.tab.c: regen'd + + * output.c: + simplify part of the output_file formatting using new functions, e.g., + start_int_table(), output_newline(). + + * reader.c: + modify copy_action() to indent the first character, it if is is left-curly + brace. That makes the output look more like the original, as well as makes + it simpler to edit (not confuse editors which look for a left-curly in the + first column as if it were the beginning of a function). + + * skeleton.c: minor fixes to avoid gcc -Wconversion warnings + + * output.c: align the #define's produced for "-p" option + + * test/run_test.sh: use the "-p" option for better coverage. + + * output.c: simplify output_prefix() with new define_prefixed() + + * skeleton.c: include string.h, for memset() + change stack size to unsigned to fix gcc -Wconversion warnings. + + * VERSION: bump to 2008/8/25 + + * makefile.in: add dependency on VERSION file. + +2008-08-24 Thomas E. Dickey + + * VERSION: bump + + * lalr.c: improved memory-leak checking by freeing data in includes[] + + * test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c: + update to match skeleton-change + + * configure: regen'd + + * skeleton.c: Add fix for stack discussed + http://undeadly.org/cgi?action=article&sid=20080708155228 + and applied + http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/yacc/skeleton.c.diff?r1=1.28&r2=1.29 + + * aclocal.m4: resync with my-autoconf (no major changes) + +2008-07-24 Thomas E. Dickey + + * package/pkgsrc/Makefile, package/pkgsrc/distinfo: + scripts from NetBSD pkgsrc, for test-builds + +2008-03-14 Thomas E. Dickey + + * config.sub: update to 2008-03-08 + + * config.guess: update to 2008-03-12 + +2007-05-09 Thomas E. Dickey + + * main.c: close graph, verbose files if opened, on exit. + + * main.c: + audit memory leaks - valgrind reported some memory still in use on exit. + + * lalr.c, output.c, reader.c, mkpar.c, lr0.c: + add hook for auditing memory leaks + + * defs.h: add hooks for auditing memory leaks + + * configure: regen'd + + * configure.in: + use CF_DISABLE_LEAKS, which combines --disable-leaks, --with-valgrind, + --with-dbmalloc and --with-dmalloc + + * aclocal.m4: add CF_DISABLE_LEAKS and CF_WITH_VALGRIND + + * aclocal.m4: improve version-checking in CF_GCC_VERSION + rework dbmalloc/dmalloc options using CF_NO_LEAKS_OPTION macro + + * VERSION: 2007/5/9 + + * main.c: file_prefix did not always have a trailing null. + +2007-03-25 Thomas E. Dickey + + * mkdirs.sh: improved version for "make -j" + +2006-12-22 Thomas E. Dickey + + * config.guess: 2006/12/22 + +2006-12-08 Thomas E. Dickey + + * config.sub: 2006/12/08 + +2005-08-13 Thomas E. Dickey + + * main.c: add -V to usage message + + * makefile.in: remove -t option from ctags + + * VERSION: 2005/8/13 + +2005-08-13 schmitz + + * main.c: Sylvain Schmitz: + modify the '-o' option to work like bison's, which sets the file-prefix. + +2005-08-13 Matt.Kraai + + * output.c: + Debian #322858 (don't close union_file, which contained data). + This feature is used in groff. + +2005-08-13 Thomas E. Dickey + + * configure: regenerated + + * aclocal.m4: improve checks for Intel compiler warnings + +2005-06-25 Thomas E. Dickey + + * config.sub: 2005/6/2 + + * config.guess: 2005/5/27 + +2005-05-05 Thomas E. Dickey + + * defs.h: add a fallback for GCC_UNUSED + +2005-05-04 Thomas E. Dickey + + * makefile.in: add "." to include-path to pickup config.h + + * reader.c: + apply fix suggested by Steve Dum for end_rule() in Redhat Bugzilla #112617. + + * output.c: + correct a limit check in pack_vector() - report/analysis by William Evans + + * main.c: + exit after printing version. Otherwise "yacc -V" will exit with an erro + after printing the usage message. + + * test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c: + regenerated after skeleton-changes + + * skeleton.c: replace a few -1's with YYEMPTY + + * skeleton.c: + delete yynewerror (no one uses it any more, and it just makes compiler warnings) + + * skeleton.c: adapt yygrowstack() and related definitions from FreeBSD + + * test/run_test.sh: + filter out lines with YYPATCH, since that will change with each update + + * yacc.1: add -V option + + * main.c: add -V option to print the version. + simplify option-parsing by moving the duplicate logic for setting flags into + new function setflag(). + + * skeleton.c: + move the actual definition of YYMAJOR and YYMINOR to defs.h (as numbers). + add YYPATCH here so it can be tested by applications. + + * defs.h: + add macros to define VERSION in terms of the (numeric) YYMAJOR, YYMINOR and + YYPATCH symbols. + + * lalr.c, lr0.c, mkpar.c, defs.h, closure.c, warshall.c, output.c, verbose.c, graph.c, reader.c, main.c, symtab.c: + reduce externs by making static the procedures that are not referenced outside + the module in which they are defined. + + * makefile.in: + the VERSION file holds the patch-date. Define YYPATCH, so this will be + compiled into the skeleton. + + * VERSION: patch-level for byacc + + * main.c: + add "-o" to usage message. It is too long for a single line; rewrite usage() + to show one option per line. + +2005-05-03 Thomas E. Dickey + + * main.c: add -o option, to work with scripts that assume bison. + simplify create_file_names() with a macro. + simplify done() with a macro. + adapt fix from FreeBSD for signal race, e.g., if done() is interrupted by + onintr(), do not flush output via exit(), but use _exit() instead. + + * defs.h: remove unnecessary externs for main.c + + * yacc.1: add -o option + + * graph.c: remove unused parameter + + * mkpar.c, defs.h, reader.c: + add support for "%expect", a bison feature from FreeBSD sources + + * lr0.c, reader.c, main.c, skeleton.c, graph.c, symtab.c, closure.c, mkpar.c, lalr.c, error.c, warshall.c, verbose.c, output.c: + indent'd + + * configure: regenerated for 2005/5/5 + + * aclocal.m4: miscellaneous updates (adds CF_INTEL_COMPILER) + +2005-04-27 schmitz + + * defs.h, graph.c, lr0.c, main.c, makefile.in, reader.c, yacc.1: + Sylvain Schmitz : + add graphical output of the LALR(1) automaton for graphviz, + associated with command-line option `-g' *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Thu May 3 09:58:37 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FB231065675; Thu, 3 May 2012 09:58:37 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E54778FC14; Thu, 3 May 2012 09:58:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q439waVL031272; Thu, 3 May 2012 09:58:36 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q439waNU031271; Thu, 3 May 2012 09:58:36 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201205030958.q439waNU031271@svn.freebsd.org> From: Baptiste Daroussin Date: Thu, 3 May 2012 09:58:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234950 - vendor/byacc/20120115 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 09:58:37 -0000 Author: bapt Date: Thu May 3 09:58:36 2012 New Revision: 234950 URL: http://svn.freebsd.org/changeset/base/234950 Log: Tag byacc 20120115 Added: vendor/byacc/20120115/ - copied from r234949, vendor/byacc/dist/ From owner-svn-src-vendor@FreeBSD.ORG Thu May 3 16:04:02 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4A981065670; Thu, 3 May 2012 16:04:02 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AED888FC18; Thu, 3 May 2012 16:04:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q43G424F050460; Thu, 3 May 2012 16:04:02 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q43G42uD050454; Thu, 3 May 2012 16:04:02 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201205031604.q43G42uD050454@svn.freebsd.org> From: David Chisnall Date: Thu, 3 May 2012 16:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234959 - in vendor/libc++/dist: include src X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 16:04:02 -0000 Author: theraven Date: Thu May 3 16:04:02 2012 New Revision: 234959 URL: http://svn.freebsd.org/changeset/base/234959 Log: Import a new version of libc++ into the vendor branch. Modified: vendor/libc++/dist/include/__config vendor/libc++/dist/include/__tuple vendor/libc++/dist/include/algorithm vendor/libc++/dist/include/atomic vendor/libc++/dist/include/cmath vendor/libc++/dist/include/limits vendor/libc++/dist/include/memory vendor/libc++/dist/include/random vendor/libc++/dist/include/system_error vendor/libc++/dist/include/tuple vendor/libc++/dist/include/type_traits vendor/libc++/dist/include/utility vendor/libc++/dist/src/iostream.cpp vendor/libc++/dist/src/stdexcept.cpp vendor/libc++/dist/src/utility.cpp Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Thu May 3 15:54:06 2012 (r234958) +++ vendor/libc++/dist/include/__config Thu May 3 16:04:02 2012 (r234959) @@ -384,7 +384,9 @@ template struct __static_asse #endif #ifdef _LIBCPP_HAS_NO_CONSTEXPR -#define constexpr const +#define _LIBCPP_CONSTEXPR +#else +#define _LIBCPP_CONSTEXPR constexpr #endif #ifndef __has_feature Modified: vendor/libc++/dist/include/__tuple ============================================================================== --- vendor/libc++/dist/include/__tuple Thu May 3 15:54:06 2012 (r234958) +++ vendor/libc++/dist/include/__tuple Thu May 3 16:04:02 2012 (r234959) @@ -216,7 +216,7 @@ struct __tuple_convertible_imp : public template struct __tuple_convertible_imp, __tuple_types<_Up0, _Up...> > : public integral_constant::value && + is_convertible<_Tp0, _Up0>::value && __tuple_convertible_imp, __tuple_types<_Up...> >::value> {}; template <> @@ -235,6 +235,33 @@ struct __tuple_convertible<_Tp, _Up, tru typename __make_tuple_types<_Tp>::type, typename __make_tuple_types<_Up>::type> {}; +// __tuple_constructible + +template +struct __tuple_constructible_imp : public false_type {}; + +template +struct __tuple_constructible_imp, __tuple_types<_Up0, _Up...> > + : public integral_constant::value && + __tuple_constructible_imp, __tuple_types<_Up...> >::value> {}; + +template <> +struct __tuple_constructible_imp, __tuple_types<> > + : public true_type {}; + +template ::type>::value, + bool = __tuple_like<_Up>::value> +struct __tuple_constructible + : public false_type {}; + +template +struct __tuple_constructible<_Tp, _Up, true, true> + : public __tuple_constructible_imp::type>::value == + tuple_size<_Up>::value, + typename __make_tuple_types<_Tp>::type, typename __make_tuple_types<_Up>::type> +{}; + // __tuple_assignable template Modified: vendor/libc++/dist/include/algorithm ============================================================================== --- vendor/libc++/dist/include/algorithm Thu May 3 15:54:06 2012 (r234958) +++ vendor/libc++/dist/include/algorithm Thu May 3 16:04:02 2012 (r234959) @@ -2508,11 +2508,16 @@ private: _Engine_result_type __mask0_; _Engine_result_type __mask1_; +#ifdef _LIBCPP_HAS_NO_CONSTEXPR static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min - + _Working_result_type(1); - static const size_t __m = __log2<_Working_result_type, _Rp>::value; - static const size_t _WDt = numeric_limits<_Working_result_type>::digits; - static const size_t _EDt = numeric_limits<_Engine_result_type>::digits; + + _Working_result_type(1); +#else + static _LIBCPP_CONSTEXPR const _Working_result_type _Rp = _Engine::max() - _Engine::min() + + _Working_result_type(1); +#endif + static _LIBCPP_CONSTEXPR const size_t __m = __log2<_Working_result_type, _Rp>::value; + static _LIBCPP_CONSTEXPR const size_t _WDt = numeric_limits<_Working_result_type>::digits; + static _LIBCPP_CONSTEXPR const size_t _EDt = numeric_limits<_Engine_result_type>::digits; public: // constructors and seeding functions @@ -2712,8 +2717,8 @@ public: result_type operator()(); - static constexpr result_type min() {return _Min;} - static constexpr result_type max() {return _Max;} + static _LIBCPP_CONSTEXPR result_type min() {return _Min;} + static _LIBCPP_CONSTEXPR result_type max() {return _Max;} friend __rs_default __rs_get(); }; Modified: vendor/libc++/dist/include/atomic ============================================================================== --- vendor/libc++/dist/include/atomic Thu May 3 15:54:06 2012 (r234958) +++ vendor/libc++/dist/include/atomic Thu May 3 16:04:02 2012 (r234959) @@ -29,7 +29,7 @@ typedef enum memory_order memory_order_seq_cst // store-release load-acquire } memory_order; -template T kill_dependency(T y); +template T kill_dependency(T y) noexcept; // lock-free property @@ -46,40 +46,40 @@ template T kill_dependency(T y typedef struct atomic_flag { - bool test_and_set(memory_order m = memory_order_seq_cst) volatile; - bool test_and_set(memory_order m = memory_order_seq_cst); - void clear(memory_order m = memory_order_seq_cst) volatile; - void clear(memory_order m = memory_order_seq_cst); - atomic_flag() = default; + bool test_and_set(memory_order m = memory_order_seq_cst) volatile noexcept; + bool test_and_set(memory_order m = memory_order_seq_cst) noexcept; + void clear(memory_order m = memory_order_seq_cst) volatile noexcept; + void clear(memory_order m = memory_order_seq_cst) noexcept; + atomic_flag() noexcept = default; atomic_flag(const atomic_flag&) = delete; atomic_flag& operator=(const atomic_flag&) = delete; atomic_flag& operator=(const atomic_flag&) volatile = delete; } atomic_flag; bool - atomic_flag_test_and_set(volatile atomic_flag* obj); + atomic_flag_test_and_set(volatile atomic_flag* obj) noexcept; bool - atomic_flag_test_and_set(atomic_flag* obj); + atomic_flag_test_and_set(atomic_flag* obj) noexcept; bool atomic_flag_test_and_set_explicit(volatile atomic_flag* obj, - memory_order m); + memory_order m) noexcept; bool - atomic_flag_test_and_set_explicit(atomic_flag* obj, memory_order m); + atomic_flag_test_and_set_explicit(atomic_flag* obj, memory_order m) noexcept; void - atomic_flag_clear(volatile atomic_flag* obj); + atomic_flag_clear(volatile atomic_flag* obj) noexcept; void - atomic_flag_clear(atomic_flag* obj); + atomic_flag_clear(atomic_flag* obj) noexcept; void - atomic_flag_clear_explicit(volatile atomic_flag* obj, memory_order m); + atomic_flag_clear_explicit(volatile atomic_flag* obj, memory_order m) noexcept; void - atomic_flag_clear_explicit(atomic_flag* obj, memory_order m); + atomic_flag_clear_explicit(atomic_flag* obj, memory_order m) noexcept; #define ATOMIC_FLAG_INIT see below #define ATOMIC_VAR_INIT(value) see below @@ -87,388 +87,388 @@ void template struct atomic { - bool is_lock_free() const volatile; - bool is_lock_free() const; - void store(T desr, memory_order m = memory_order_seq_cst) volatile; - void store(T desr, memory_order m = memory_order_seq_cst); - T load(memory_order m = memory_order_seq_cst) const volatile; - T load(memory_order m = memory_order_seq_cst) const; - operator T() const volatile; - operator T() const; - T exchange(T desr, memory_order m = memory_order_seq_cst) volatile; - T exchange(T desr, memory_order m = memory_order_seq_cst); + bool is_lock_free() const volatile noexcept; + bool is_lock_free() const noexcept; + void store(T desr, memory_order m = memory_order_seq_cst) volatile noexcept; + void store(T desr, memory_order m = memory_order_seq_cst) noexcept; + T load(memory_order m = memory_order_seq_cst) const volatile noexcept; + T load(memory_order m = memory_order_seq_cst) const noexcept; + operator T() const volatile noexcept; + operator T() const noexcept; + T exchange(T desr, memory_order m = memory_order_seq_cst) volatile noexcept; + T exchange(T desr, memory_order m = memory_order_seq_cst) noexcept; bool compare_exchange_weak(T& expc, T desr, - memory_order s, memory_order f) volatile; - bool compare_exchange_weak(T& expc, T desr, memory_order s, memory_order f); + memory_order s, memory_order f) volatile noexcept; + bool compare_exchange_weak(T& expc, T desr, memory_order s, memory_order f) noexcept; bool compare_exchange_strong(T& expc, T desr, - memory_order s, memory_order f) volatile; + memory_order s, memory_order f) volatile noexcept; bool compare_exchange_strong(T& expc, T desr, - memory_order s, memory_order f); + memory_order s, memory_order f) noexcept; bool compare_exchange_weak(T& expc, T desr, - memory_order m = memory_order_seq_cst) volatile; + memory_order m = memory_order_seq_cst) volatile noexcept; bool compare_exchange_weak(T& expc, T desr, - memory_order m = memory_order_seq_cst); + memory_order m = memory_order_seq_cst) noexcept; bool compare_exchange_strong(T& expc, T desr, - memory_order m = memory_order_seq_cst) volatile; + memory_order m = memory_order_seq_cst) volatile noexcept; bool compare_exchange_strong(T& expc, T desr, - memory_order m = memory_order_seq_cst); + memory_order m = memory_order_seq_cst) noexcept; - atomic() = default; - constexpr atomic(T desr); + atomic() noexcept = default; + constexpr atomic(T desr) noexcept; atomic(const atomic&) = delete; atomic& operator=(const atomic&) = delete; atomic& operator=(const atomic&) volatile = delete; - T operator=(T) volatile; - T operator=(T); + T operator=(T) volatile noexcept; + T operator=(T) noexcept; }; template <> struct atomic { - bool is_lock_free() const volatile; - bool is_lock_free() const; - void store(integral desr, memory_order m = memory_order_seq_cst) volatile; - void store(integral desr, memory_order m = memory_order_seq_cst); - integral load(memory_order m = memory_order_seq_cst) const volatile; - integral load(memory_order m = memory_order_seq_cst) const; - operator integral() const volatile; - operator integral() const; + bool is_lock_free() const volatile noexcept; + bool is_lock_free() const noexcept; + void store(integral desr, memory_order m = memory_order_seq_cst) volatile noexcept; + void store(integral desr, memory_order m = memory_order_seq_cst) noexcept; + integral load(memory_order m = memory_order_seq_cst) const volatile noexcept; + integral load(memory_order m = memory_order_seq_cst) const noexcept; + operator integral() const volatile noexcept; + operator integral() const noexcept; integral exchange(integral desr, - memory_order m = memory_order_seq_cst) volatile; - integral exchange(integral desr, memory_order m = memory_order_seq_cst); + memory_order m = memory_order_seq_cst) volatile noexcept; + integral exchange(integral desr, memory_order m = memory_order_seq_cst) noexcept; bool compare_exchange_weak(integral& expc, integral desr, - memory_order s, memory_order f) volatile; + memory_order s, memory_order f) volatile noexcept; bool compare_exchange_weak(integral& expc, integral desr, - memory_order s, memory_order f); + memory_order s, memory_order f) noexcept; bool compare_exchange_strong(integral& expc, integral desr, - memory_order s, memory_order f) volatile; + memory_order s, memory_order f) volatile noexcept; bool compare_exchange_strong(integral& expc, integral desr, - memory_order s, memory_order f); + memory_order s, memory_order f) noexcept; bool compare_exchange_weak(integral& expc, integral desr, - memory_order m = memory_order_seq_cst) volatile; + memory_order m = memory_order_seq_cst) volatile noexcept; bool compare_exchange_weak(integral& expc, integral desr, - memory_order m = memory_order_seq_cst); + memory_order m = memory_order_seq_cst) noexcept; bool compare_exchange_strong(integral& expc, integral desr, - memory_order m = memory_order_seq_cst) volatile; + memory_order m = memory_order_seq_cst) volatile noexcept; bool compare_exchange_strong(integral& expc, integral desr, - memory_order m = memory_order_seq_cst); + memory_order m = memory_order_seq_cst) noexcept; integral - fetch_add(integral op, memory_order m = memory_order_seq_cst) volatile; - integral fetch_add(integral op, memory_order m = memory_order_seq_cst); + fetch_add(integral op, memory_order m = memory_order_seq_cst) volatile noexcept; + integral fetch_add(integral op, memory_order m = memory_order_seq_cst) noexcept; integral - fetch_sub(integral op, memory_order m = memory_order_seq_cst) volatile; - integral fetch_sub(integral op, memory_order m = memory_order_seq_cst); + fetch_sub(integral op, memory_order m = memory_order_seq_cst) volatile noexcept; + integral fetch_sub(integral op, memory_order m = memory_order_seq_cst) noexcept; integral - fetch_and(integral op, memory_order m = memory_order_seq_cst) volatile; - integral fetch_and(integral op, memory_order m = memory_order_seq_cst); + fetch_and(integral op, memory_order m = memory_order_seq_cst) volatile noexcept; + integral fetch_and(integral op, memory_order m = memory_order_seq_cst) noexcept; integral - fetch_or(integral op, memory_order m = memory_order_seq_cst) volatile; - integral fetch_or(integral op, memory_order m = memory_order_seq_cst); + fetch_or(integral op, memory_order m = memory_order_seq_cst) volatile noexcept; + integral fetch_or(integral op, memory_order m = memory_order_seq_cst) noexcept; integral - fetch_xor(integral op, memory_order m = memory_order_seq_cst) volatile; - integral fetch_xor(integral op, memory_order m = memory_order_seq_cst); + fetch_xor(integral op, memory_order m = memory_order_seq_cst) volatile noexcept; + integral fetch_xor(integral op, memory_order m = memory_order_seq_cst) noexcept; - atomic() = default; - constexpr atomic(integral desr); + atomic() noexcept = default; + constexpr atomic(integral desr) noexcept; atomic(const atomic&) = delete; atomic& operator=(const atomic&) = delete; atomic& operator=(const atomic&) volatile = delete; - integral operator=(integral desr) volatile; - integral operator=(integral desr); + integral operator=(integral desr) volatile noexcept; + integral operator=(integral desr) noexcept; - integral operator++(int) volatile; - integral operator++(int); - integral operator--(int) volatile; - integral operator--(int); - integral operator++() volatile; - integral operator++(); - integral operator--() volatile; - integral operator--(); - integral operator+=(integral op) volatile; - integral operator+=(integral op); - integral operator-=(integral op) volatile; - integral operator-=(integral op); - integral operator&=(integral op) volatile; - integral operator&=(integral op); - integral operator|=(integral op) volatile; - integral operator|=(integral op); - integral operator^=(integral op) volatile; - integral operator^=(integral op); + integral operator++(int) volatile noexcept; + integral operator++(int) noexcept; + integral operator--(int) volatile noexcept; + integral operator--(int) noexcept; + integral operator++() volatile noexcept; + integral operator++() noexcept; + integral operator--() volatile noexcept; + integral operator--() noexcept; + integral operator+=(integral op) volatile noexcept; + integral operator+=(integral op) noexcept; + integral operator-=(integral op) volatile noexcept; + integral operator-=(integral op) noexcept; + integral operator&=(integral op) volatile noexcept; + integral operator&=(integral op) noexcept; + integral operator|=(integral op) volatile noexcept; + integral operator|=(integral op) noexcept; + integral operator^=(integral op) volatile noexcept; + integral operator^=(integral op) noexcept; }; template struct atomic { - bool is_lock_free() const volatile; - bool is_lock_free() const; - void store(T* desr, memory_order m = memory_order_seq_cst) volatile; - void store(T* desr, memory_order m = memory_order_seq_cst); - T* load(memory_order m = memory_order_seq_cst) const volatile; - T* load(memory_order m = memory_order_seq_cst) const; - operator T*() const volatile; - operator T*() const; - T* exchange(T* desr, memory_order m = memory_order_seq_cst) volatile; - T* exchange(T* desr, memory_order m = memory_order_seq_cst); + bool is_lock_free() const volatile noexcept; + bool is_lock_free() const noexcept; + void store(T* desr, memory_order m = memory_order_seq_cst) volatile noexcept; + void store(T* desr, memory_order m = memory_order_seq_cst) noexcept; + T* load(memory_order m = memory_order_seq_cst) const volatile noexcept; + T* load(memory_order m = memory_order_seq_cst) const noexcept; + operator T*() const volatile noexcept; + operator T*() const noexcept; + T* exchange(T* desr, memory_order m = memory_order_seq_cst) volatile noexcept; + T* exchange(T* desr, memory_order m = memory_order_seq_cst) noexcept; bool compare_exchange_weak(T*& expc, T* desr, - memory_order s, memory_order f) volatile; + memory_order s, memory_order f) volatile noexcept; bool compare_exchange_weak(T*& expc, T* desr, - memory_order s, memory_order f); + memory_order s, memory_order f) noexcept; bool compare_exchange_strong(T*& expc, T* desr, - memory_order s, memory_order f) volatile; + memory_order s, memory_order f) volatile noexcept; bool compare_exchange_strong(T*& expc, T* desr, - memory_order s, memory_order f); + memory_order s, memory_order f) noexcept; bool compare_exchange_weak(T*& expc, T* desr, - memory_order m = memory_order_seq_cst) volatile; + memory_order m = memory_order_seq_cst) volatile noexcept; bool compare_exchange_weak(T*& expc, T* desr, - memory_order m = memory_order_seq_cst); + memory_order m = memory_order_seq_cst) noexcept; bool compare_exchange_strong(T*& expc, T* desr, - memory_order m = memory_order_seq_cst) volatile; + memory_order m = memory_order_seq_cst) volatile noexcept; bool compare_exchange_strong(T*& expc, T* desr, - memory_order m = memory_order_seq_cst); - T* fetch_add(ptrdiff_t op, memory_order m = memory_order_seq_cst) volatile; - T* fetch_add(ptrdiff_t op, memory_order m = memory_order_seq_cst); - T* fetch_sub(ptrdiff_t op, memory_order m = memory_order_seq_cst) volatile; - T* fetch_sub(ptrdiff_t op, memory_order m = memory_order_seq_cst); + memory_order m = memory_order_seq_cst) noexcept; + T* fetch_add(ptrdiff_t op, memory_order m = memory_order_seq_cst) volatile noexcept; + T* fetch_add(ptrdiff_t op, memory_order m = memory_order_seq_cst) noexcept; + T* fetch_sub(ptrdiff_t op, memory_order m = memory_order_seq_cst) volatile noexcept; + T* fetch_sub(ptrdiff_t op, memory_order m = memory_order_seq_cst) noexcept; - atomic() = default; - constexpr atomic(T* desr); + atomic() noexcept = default; + constexpr atomic(T* desr) noexcept; atomic(const atomic&) = delete; atomic& operator=(const atomic&) = delete; atomic& operator=(const atomic&) volatile = delete; - T* operator=(T*) volatile; - T* operator=(T*); - T* operator++(int) volatile; - T* operator++(int); - T* operator--(int) volatile; - T* operator--(int); - T* operator++() volatile; - T* operator++(); - T* operator--() volatile; - T* operator--(); - T* operator+=(ptrdiff_t op) volatile; - T* operator+=(ptrdiff_t op); - T* operator-=(ptrdiff_t op) volatile; - T* operator-=(ptrdiff_t op); + T* operator=(T*) volatile noexcept; + T* operator=(T*) noexcept; + T* operator++(int) volatile noexcept; + T* operator++(int) noexcept; + T* operator--(int) volatile noexcept; + T* operator--(int) noexcept; + T* operator++() volatile noexcept; + T* operator++() noexcept; + T* operator--() volatile noexcept; + T* operator--() noexcept; + T* operator+=(ptrdiff_t op) volatile noexcept; + T* operator+=(ptrdiff_t op) noexcept; + T* operator-=(ptrdiff_t op) volatile noexcept; + T* operator-=(ptrdiff_t op) noexcept; }; template bool - atomic_is_lock_free(const volatile atomic* obj); + atomic_is_lock_free(const volatile atomic* obj) noexcept; template bool - atomic_is_lock_free(const atomic* obj); + atomic_is_lock_free(const atomic* obj) noexcept; template void - atomic_init(volatile atomic* obj, T desr); + atomic_init(volatile atomic* obj, T desr) noexcept; template void - atomic_init(atomic* obj, T desr); + atomic_init(atomic* obj, T desr) noexcept; template void - atomic_store(volatile atomic* obj, T desr); + atomic_store(volatile atomic* obj, T desr) noexcept; template void - atomic_store(atomic* obj, T desr); + atomic_store(atomic* obj, T desr) noexcept; template void - atomic_store_explicit(volatile atomic* obj, T desr, memory_order m); + atomic_store_explicit(volatile atomic* obj, T desr, memory_order m) noexcept; template void - atomic_store_explicit(atomic* obj, T desr, memory_order m); + atomic_store_explicit(atomic* obj, T desr, memory_order m) noexcept; template T - atomic_load(const volatile atomic* obj); + atomic_load(const volatile atomic* obj) noexcept; template T - atomic_load(const atomic* obj); + atomic_load(const atomic* obj) noexcept; template T - atomic_load_explicit(const volatile atomic* obj, memory_order m); + atomic_load_explicit(const volatile atomic* obj, memory_order m) noexcept; template T - atomic_load_explicit(const atomic* obj, memory_order m); + atomic_load_explicit(const atomic* obj, memory_order m) noexcept; template T - atomic_exchange(volatile atomic* obj, T desr); + atomic_exchange(volatile atomic* obj, T desr) noexcept; template T - atomic_exchange(atomic* obj, T desr); + atomic_exchange(atomic* obj, T desr) noexcept; template T - atomic_exchange_explicit(volatile atomic* obj, T desr, memory_order m); + atomic_exchange_explicit(volatile atomic* obj, T desr, memory_order m) noexcept; template T - atomic_exchange_explicit(atomic* obj, T desr, memory_order m); + atomic_exchange_explicit(atomic* obj, T desr, memory_order m) noexcept; template bool - atomic_compare_exchange_weak(volatile atomic* obj, T* expc, T desr); + atomic_compare_exchange_weak(volatile atomic* obj, T* expc, T desr) noexcept; template bool - atomic_compare_exchange_weak(atomic* obj, T* expc, T desr); + atomic_compare_exchange_weak(atomic* obj, T* expc, T desr) noexcept; template bool - atomic_compare_exchange_strong(volatile atomic* obj, T* expc, T desr); + atomic_compare_exchange_strong(volatile atomic* obj, T* expc, T desr) noexcept; template bool - atomic_compare_exchange_strong(atomic* obj, T* expc, T desr); + atomic_compare_exchange_strong(atomic* obj, T* expc, T desr) noexcept; template bool atomic_compare_exchange_weak_explicit(volatile atomic* obj, T* expc, T desr, - memory_order s, memory_order f); + memory_order s, memory_order f) noexcept; template bool atomic_compare_exchange_weak_explicit(atomic* obj, T* expc, T desr, - memory_order s, memory_order f); + memory_order s, memory_order f) noexcept; template bool atomic_compare_exchange_strong_explicit(volatile atomic* obj, T* expc, T desr, - memory_order s, memory_order f); + memory_order s, memory_order f) noexcept; template bool atomic_compare_exchange_strong_explicit(atomic* obj, T* expc, T desr, - memory_order s, memory_order f); + memory_order s, memory_order f) noexcept; template Integral - atomic_fetch_add(volatile atomic* obj, Integral op); + atomic_fetch_add(volatile atomic* obj, Integral op) noexcept; template Integral - atomic_fetch_add(atomic* obj, Integral op); + atomic_fetch_add(atomic* obj, Integral op) noexcept; template Integral atomic_fetch_add_explicit(volatile atomic* obj, Integral op, - memory_order m); + memory_order m) noexcept; template Integral atomic_fetch_add_explicit(atomic* obj, Integral op, - memory_order m); + memory_order m) noexcept; template Integral - atomic_fetch_sub(volatile atomic* obj, Integral op); + atomic_fetch_sub(volatile atomic* obj, Integral op) noexcept; template Integral - atomic_fetch_sub(atomic* obj, Integral op); + atomic_fetch_sub(atomic* obj, Integral op) noexcept; template Integral atomic_fetch_sub_explicit(volatile atomic* obj, Integral op, - memory_order m); + memory_order m) noexcept; template Integral atomic_fetch_sub_explicit(atomic* obj, Integral op, - memory_order m); + memory_order m) noexcept; template Integral - atomic_fetch_and(volatile atomic* obj, Integral op); + atomic_fetch_and(volatile atomic* obj, Integral op) noexcept; template Integral - atomic_fetch_and(atomic* obj, Integral op); + atomic_fetch_and(atomic* obj, Integral op) noexcept; template Integral atomic_fetch_and_explicit(volatile atomic* obj, Integral op, - memory_order m); + memory_order m) noexcept; template Integral atomic_fetch_and_explicit(atomic* obj, Integral op, - memory_order m); + memory_order m) noexcept; template Integral - atomic_fetch_or(volatile atomic* obj, Integral op); + atomic_fetch_or(volatile atomic* obj, Integral op) noexcept; template Integral - atomic_fetch_or(atomic* obj, Integral op); + atomic_fetch_or(atomic* obj, Integral op) noexcept; template Integral atomic_fetch_or_explicit(volatile atomic* obj, Integral op, - memory_order m); + memory_order m) noexcept; template Integral atomic_fetch_or_explicit(atomic* obj, Integral op, - memory_order m); + memory_order m) noexcept; template Integral - atomic_fetch_xor(volatile atomic* obj, Integral op); + atomic_fetch_xor(volatile atomic* obj, Integral op) noexcept; template Integral - atomic_fetch_xor(atomic* obj, Integral op); + atomic_fetch_xor(atomic* obj, Integral op) noexcept; template Integral atomic_fetch_xor_explicit(volatile atomic* obj, Integral op, - memory_order m); + memory_order m) noexcept; template Integral atomic_fetch_xor_explicit(atomic* obj, Integral op, - memory_order m); + memory_order m) noexcept; template T* - atomic_fetch_add(volatile atomic* obj, ptrdiff_t op); + atomic_fetch_add(volatile atomic* obj, ptrdiff_t op) noexcept; template T* - atomic_fetch_add(atomic* obj, ptrdiff_t op); + atomic_fetch_add(atomic* obj, ptrdiff_t op) noexcept; template T* atomic_fetch_add_explicit(volatile atomic* obj, ptrdiff_t op, - memory_order m); + memory_order m) noexcept; template T* - atomic_fetch_add_explicit(atomic* obj, ptrdiff_t op, memory_order m); + atomic_fetch_add_explicit(atomic* obj, ptrdiff_t op, memory_order m) noexcept; template T* - atomic_fetch_sub(volatile atomic* obj, ptrdiff_t op); + atomic_fetch_sub(volatile atomic* obj, ptrdiff_t op) noexcept; template T* - atomic_fetch_sub(atomic* obj, ptrdiff_t op); + atomic_fetch_sub(atomic* obj, ptrdiff_t op) noexcept; template T* atomic_fetch_sub_explicit(volatile atomic* obj, ptrdiff_t op, - memory_order m); + memory_order m) noexcept; template T* - atomic_fetch_sub_explicit(atomic* obj, ptrdiff_t op, memory_order m); + atomic_fetch_sub_explicit(atomic* obj, ptrdiff_t op, memory_order m) noexcept; // Atomics for standard typedef types @@ -514,8 +514,8 @@ typedef atomic atomic_uintmax // fences -void atomic_thread_fence(memory_order m); -void atomic_signal_fence(memory_order m); +void atomic_thread_fence(memory_order m) noexcept; +void atomic_signal_fence(memory_order m) noexcept; } // std @@ -545,7 +545,7 @@ typedef enum memory_order template inline _LIBCPP_INLINE_VISIBILITY _Tp -kill_dependency(_Tp __y) +kill_dependency(_Tp __y) _NOEXCEPT { return __y; } @@ -558,70 +558,70 @@ struct __atomic_base // false _Atomic(_Tp) __a_; _LIBCPP_INLINE_VISIBILITY - bool is_lock_free() const volatile - {return __atomic_is_lock_free(_Tp());} + bool is_lock_free() const volatile _NOEXCEPT + {return __c11_atomic_is_lock_free(sizeof(_Tp));} _LIBCPP_INLINE_VISIBILITY - bool is_lock_free() const - {return __atomic_is_lock_free(_Tp());} + bool is_lock_free() const _NOEXCEPT + {return __c11_atomic_is_lock_free(sizeof(_Tp));} _LIBCPP_INLINE_VISIBILITY - void store(_Tp __d, memory_order __m = memory_order_seq_cst) volatile - {__atomic_store(&__a_, __d, __m);} + void store(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT + {__c11_atomic_store(&__a_, __d, __m);} _LIBCPP_INLINE_VISIBILITY - void store(_Tp __d, memory_order __m = memory_order_seq_cst) - {__atomic_store(&__a_, __d, __m);} + void store(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT + {__c11_atomic_store(&__a_, __d, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp load(memory_order __m = memory_order_seq_cst) const volatile - {return __atomic_load(&__a_, __m);} + _Tp load(memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT + {return __c11_atomic_load(&__a_, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp load(memory_order __m = memory_order_seq_cst) const - {return __atomic_load(&__a_, __m);} + _Tp load(memory_order __m = memory_order_seq_cst) const _NOEXCEPT + {return __c11_atomic_load(&__a_, __m);} _LIBCPP_INLINE_VISIBILITY - operator _Tp() const volatile {return load();} + operator _Tp() const volatile _NOEXCEPT {return load();} _LIBCPP_INLINE_VISIBILITY - operator _Tp() const {return load();} + operator _Tp() const _NOEXCEPT {return load();} _LIBCPP_INLINE_VISIBILITY - _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) volatile - {return __atomic_exchange(&__a_, __d, __m);} + _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT + {return __c11_atomic_exchange(&__a_, __d, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) - {return __atomic_exchange(&__a_, __d, __m);} + _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT + {return __c11_atomic_exchange(&__a_, __d, __m);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_weak(_Tp& __e, _Tp __d, - memory_order __s, memory_order __f) volatile - {return __atomic_compare_exchange_weak(&__a_, &__e, __d, __s, __f);} + memory_order __s, memory_order __f) volatile _NOEXCEPT + {return __c11_atomic_compare_exchange_weak(&__a_, &__e, __d, __s, __f);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_weak(_Tp& __e, _Tp __d, - memory_order __s, memory_order __f) - {return __atomic_compare_exchange_weak(&__a_, &__e, __d, __s, __f);} + memory_order __s, memory_order __f) _NOEXCEPT + {return __c11_atomic_compare_exchange_weak(&__a_, &__e, __d, __s, __f);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_strong(_Tp& __e, _Tp __d, - memory_order __s, memory_order __f) volatile - {return __atomic_compare_exchange_strong(&__a_, &__e, __d, __s, __f);} + memory_order __s, memory_order __f) volatile _NOEXCEPT + {return __c11_atomic_compare_exchange_strong(&__a_, &__e, __d, __s, __f);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_strong(_Tp& __e, _Tp __d, - memory_order __s, memory_order __f) - {return __atomic_compare_exchange_strong(&__a_, &__e, __d, __s, __f);} + memory_order __s, memory_order __f) _NOEXCEPT + {return __c11_atomic_compare_exchange_strong(&__a_, &__e, __d, __s, __f);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_weak(_Tp& __e, _Tp __d, - memory_order __m = memory_order_seq_cst) volatile - {return __atomic_compare_exchange_weak(&__a_, &__e, __d, __m, __m);} + memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT + {return __c11_atomic_compare_exchange_weak(&__a_, &__e, __d, __m, __m);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_weak(_Tp& __e, _Tp __d, - memory_order __m = memory_order_seq_cst) - {return __atomic_compare_exchange_weak(&__a_, &__e, __d, __m, __m);} + memory_order __m = memory_order_seq_cst) _NOEXCEPT + {return __c11_atomic_compare_exchange_weak(&__a_, &__e, __d, __m, __m);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_strong(_Tp& __e, _Tp __d, - memory_order __m = memory_order_seq_cst) volatile - {return __atomic_compare_exchange_strong(&__a_, &__e, __d, __m, __m);} + memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT + {return __c11_atomic_compare_exchange_strong(&__a_, &__e, __d, __m, __m);} _LIBCPP_INLINE_VISIBILITY bool compare_exchange_strong(_Tp& __e, _Tp __d, - memory_order __m = memory_order_seq_cst) - {return __atomic_compare_exchange_strong(&__a_, &__e, __d, __m, __m);} + memory_order __m = memory_order_seq_cst) _NOEXCEPT + {return __c11_atomic_compare_exchange_strong(&__a_, &__e, __d, __m, __m);} _LIBCPP_INLINE_VISIBILITY - __atomic_base() {} // = default; + __atomic_base() _NOEXCEPT {} // = default; _LIBCPP_INLINE_VISIBILITY - /*constexpr*/ __atomic_base(_Tp __d) { __atomic_store(&__a_, __d, memory_order_seq_cst); } + _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __a_(__d) {} #ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS __atomic_base(const __atomic_base&) = delete; __atomic_base& operator=(const __atomic_base&) = delete; @@ -642,77 +642,77 @@ struct __atomic_base<_Tp, true> { typedef __atomic_base<_Tp, false> __base; _LIBCPP_INLINE_VISIBILITY - __atomic_base() {} // = default; + __atomic_base() _NOEXCEPT {} // = default; _LIBCPP_INLINE_VISIBILITY - /*constexpr*/ __atomic_base(_Tp __d) : __base(__d) {} + _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __base(__d) {} _LIBCPP_INLINE_VISIBILITY - _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) volatile - {return __atomic_fetch_add(&this->__a_, __op, __m);} + _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT + {return __c11_atomic_fetch_add(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) - {return __atomic_fetch_add(&this->__a_, __op, __m);} + _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT + {return __c11_atomic_fetch_add(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) volatile - {return __atomic_fetch_sub(&this->__a_, __op, __m);} + _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT + {return __c11_atomic_fetch_sub(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) - {return __atomic_fetch_sub(&this->__a_, __op, __m);} + _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT + {return __c11_atomic_fetch_sub(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) volatile - {return __atomic_fetch_and(&this->__a_, __op, __m);} + _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT + {return __c11_atomic_fetch_and(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) - {return __atomic_fetch_and(&this->__a_, __op, __m);} + _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT + {return __c11_atomic_fetch_and(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) volatile - {return __atomic_fetch_or(&this->__a_, __op, __m);} + _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT + {return __c11_atomic_fetch_or(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) - {return __atomic_fetch_or(&this->__a_, __op, __m);} + _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT + {return __c11_atomic_fetch_or(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) volatile - {return __atomic_fetch_xor(&this->__a_, __op, __m);} + _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT + {return __c11_atomic_fetch_xor(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) - {return __atomic_fetch_xor(&this->__a_, __op, __m);} + _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT + {return __c11_atomic_fetch_xor(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp operator++(int) volatile {return fetch_add(_Tp(1));} + _Tp operator++(int) volatile _NOEXCEPT {return fetch_add(_Tp(1));} _LIBCPP_INLINE_VISIBILITY - _Tp operator++(int) {return fetch_add(_Tp(1));} + _Tp operator++(int) _NOEXCEPT {return fetch_add(_Tp(1));} _LIBCPP_INLINE_VISIBILITY - _Tp operator--(int) volatile {return fetch_sub(_Tp(1));} + _Tp operator--(int) volatile _NOEXCEPT {return fetch_sub(_Tp(1));} _LIBCPP_INLINE_VISIBILITY - _Tp operator--(int) {return fetch_sub(_Tp(1));} + _Tp operator--(int) _NOEXCEPT {return fetch_sub(_Tp(1));} _LIBCPP_INLINE_VISIBILITY - _Tp operator++() volatile {return fetch_add(_Tp(1)) + _Tp(1);} + _Tp operator++() volatile _NOEXCEPT {return fetch_add(_Tp(1)) + _Tp(1);} _LIBCPP_INLINE_VISIBILITY - _Tp operator++() {return fetch_add(_Tp(1)) + _Tp(1);} + _Tp operator++() _NOEXCEPT {return fetch_add(_Tp(1)) + _Tp(1);} _LIBCPP_INLINE_VISIBILITY - _Tp operator--() volatile {return fetch_sub(_Tp(1)) - _Tp(1);} + _Tp operator--() volatile _NOEXCEPT {return fetch_sub(_Tp(1)) - _Tp(1);} _LIBCPP_INLINE_VISIBILITY - _Tp operator--() {return fetch_sub(_Tp(1)) - _Tp(1);} + _Tp operator--() _NOEXCEPT {return fetch_sub(_Tp(1)) - _Tp(1);} _LIBCPP_INLINE_VISIBILITY - _Tp operator+=(_Tp __op) volatile {return fetch_add(__op) + __op;} + _Tp operator+=(_Tp __op) volatile _NOEXCEPT {return fetch_add(__op) + __op;} _LIBCPP_INLINE_VISIBILITY - _Tp operator+=(_Tp __op) {return fetch_add(__op) + __op;} + _Tp operator+=(_Tp __op) _NOEXCEPT {return fetch_add(__op) + __op;} _LIBCPP_INLINE_VISIBILITY - _Tp operator-=(_Tp __op) volatile {return fetch_sub(__op) - __op;} + _Tp operator-=(_Tp __op) volatile _NOEXCEPT {return fetch_sub(__op) - __op;} _LIBCPP_INLINE_VISIBILITY - _Tp operator-=(_Tp __op) {return fetch_sub(__op) - __op;} + _Tp operator-=(_Tp __op) _NOEXCEPT {return fetch_sub(__op) - __op;} _LIBCPP_INLINE_VISIBILITY - _Tp operator&=(_Tp __op) volatile {return fetch_and(__op) & __op;} + _Tp operator&=(_Tp __op) volatile _NOEXCEPT {return fetch_and(__op) & __op;} _LIBCPP_INLINE_VISIBILITY - _Tp operator&=(_Tp __op) {return fetch_and(__op) & __op;} + _Tp operator&=(_Tp __op) _NOEXCEPT {return fetch_and(__op) & __op;} _LIBCPP_INLINE_VISIBILITY - _Tp operator|=(_Tp __op) volatile {return fetch_or(__op) | __op;} + _Tp operator|=(_Tp __op) volatile _NOEXCEPT {return fetch_or(__op) | __op;} _LIBCPP_INLINE_VISIBILITY - _Tp operator|=(_Tp __op) {return fetch_or(__op) | __op;} + _Tp operator|=(_Tp __op) _NOEXCEPT {return fetch_or(__op) | __op;} _LIBCPP_INLINE_VISIBILITY - _Tp operator^=(_Tp __op) volatile {return fetch_xor(__op) ^ __op;} + _Tp operator^=(_Tp __op) volatile _NOEXCEPT {return fetch_xor(__op) ^ __op;} _LIBCPP_INLINE_VISIBILITY - _Tp operator^=(_Tp __op) {return fetch_xor(__op) ^ __op;} + _Tp operator^=(_Tp __op) _NOEXCEPT {return fetch_xor(__op) ^ __op;} }; // atomic @@ -723,15 +723,15 @@ struct atomic { typedef __atomic_base<_Tp> __base; _LIBCPP_INLINE_VISIBILITY - atomic() {} // = default; + atomic() _NOEXCEPT {} // = default; _LIBCPP_INLINE_VISIBILITY - /*constexpr*/ atomic(_Tp __d) : __base(__d) {} + _LIBCPP_CONSTEXPR atomic(_Tp __d) _NOEXCEPT : __base(__d) {} _LIBCPP_INLINE_VISIBILITY - _Tp operator=(_Tp __d) volatile + _Tp operator=(_Tp __d) volatile _NOEXCEPT {__base::store(__d); return __d;} _LIBCPP_INLINE_VISIBILITY - _Tp operator=(_Tp __d) + _Tp operator=(_Tp __d) _NOEXCEPT {__base::store(__d); return __d;} }; @@ -743,56 +743,56 @@ struct atomic<_Tp*> { typedef __atomic_base<_Tp*> __base; _LIBCPP_INLINE_VISIBILITY - atomic() {} // = default; + atomic() _NOEXCEPT {} // = default; _LIBCPP_INLINE_VISIBILITY - /*constexpr*/ atomic(_Tp* __d) : __base(__d) {} + _LIBCPP_CONSTEXPR atomic(_Tp* __d) _NOEXCEPT : __base(__d) {} _LIBCPP_INLINE_VISIBILITY - _Tp* operator=(_Tp* __d) volatile + _Tp* operator=(_Tp* __d) volatile _NOEXCEPT {__base::store(__d); return __d;} _LIBCPP_INLINE_VISIBILITY - _Tp* operator=(_Tp* __d) + _Tp* operator=(_Tp* __d) _NOEXCEPT {__base::store(__d); return __d;} _LIBCPP_INLINE_VISIBILITY _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) - volatile - {return __atomic_fetch_add(&this->__a_, __op, __m);} + volatile _NOEXCEPT + {return __c11_atomic_fetch_add(&this->__a_, __op, __m);} _LIBCPP_INLINE_VISIBILITY - _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Thu May 3 16:05:34 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC010106566B; Thu, 3 May 2012 16:05:34 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D7518FC16; Thu, 3 May 2012 16:05:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q43G5YA9050549; Thu, 3 May 2012 16:05:34 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q43G5Y2l050548; Thu, 3 May 2012 16:05:34 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201205031605.q43G5Y2l050548@svn.freebsd.org> From: David Chisnall Date: Thu, 3 May 2012 16:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234960 - vendor/libc++/r156067 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 16:05:34 -0000 Author: theraven Date: Thu May 3 16:05:34 2012 New Revision: 234960 URL: http://svn.freebsd.org/changeset/base/234960 Log: Tag new libc++ import. Added: vendor/libc++/r156067/ - copied from r234959, vendor/libc++/dist/ From owner-svn-src-vendor@FreeBSD.ORG Thu May 3 16:50:57 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 408151065689; Thu, 3 May 2012 16:50:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26DA38FC1C; Thu, 3 May 2012 16:50:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q43GovAi052794; Thu, 3 May 2012 16:50:57 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q43Gou9k052775; Thu, 3 May 2012 16:50:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205031650.q43Gou9k052775@svn.freebsd.org> From: Dimitry Andric Date: Thu, 3 May 2012 16:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234971 - in vendor/llvm/dist: . autoconf cmake/modules docs docs/CommandGuide include/llvm include/llvm-c include/llvm/ADT include/llvm/CodeGen include/llvm/Config include/llvm/MC/MCPa... X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 16:50:57 -0000 Author: dim Date: Thu May 3 16:50:55 2012 New Revision: 234971 URL: http://svn.freebsd.org/changeset/base/234971 Log: Vendor import of llvm release_31 branch r155985: http://llvm.org/svn/llvm-project/llvm/branches/release_31@155985 Added: vendor/llvm/dist/include/llvm/Support/Locale.h vendor/llvm/dist/include/llvm/Support/MDBuilder.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/GDBRegistrar.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/ObjectImage.h vendor/llvm/dist/lib/Support/Locale.cpp vendor/llvm/dist/lib/Support/LocaleGeneric.inc vendor/llvm/dist/lib/Support/LocaleWindows.inc vendor/llvm/dist/lib/Support/LocaleXlocale.inc vendor/llvm/dist/lib/Target/Mips/Disassembler/ vendor/llvm/dist/lib/Target/Mips/Disassembler/CMakeLists.txt vendor/llvm/dist/lib/Target/Mips/Disassembler/LLVMBuild.txt vendor/llvm/dist/lib/Target/Mips/Disassembler/Makefile vendor/llvm/dist/lib/Target/Mips/Disassembler/MipsDisassembler.cpp vendor/llvm/dist/test/CodeGen/PowerPC/ppc-vaarg-agg.ll vendor/llvm/dist/test/CodeGen/X86/2012-04-26-sdglue.ll vendor/llvm/dist/test/CodeGen/X86/GC/cg-O0.ll vendor/llvm/dist/test/CodeGen/X86/avx2-vperm.ll (contents, props changed) vendor/llvm/dist/test/CodeGen/X86/dbg-declare.ll vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-MRRC2-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/unpredictable-AI1cmp-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/unpredictable-MRRC2-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/unpredictable-MRS-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/unpredictable-swp-arm.txt vendor/llvm/dist/test/MC/Disassembler/Mips/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips32.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32_le.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2_le.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64_le.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2_le.txt vendor/llvm/dist/test/MC/Mips/sym-offset.ll vendor/llvm/dist/test/Transforms/BBVectorize/no-ldstr-conn.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple-ldstr-ptrs.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple-sel.ll vendor/llvm/dist/test/Transforms/InstCombine/2012-04-30-SRem.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/pr12691.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/2012-04-30-LoopUnswitch-LPad-Crash.ll vendor/llvm/dist/test/Transforms/ObjCARC/escape.ll vendor/llvm/dist/test/Transforms/Reassociate/pr12245.ll vendor/llvm/dist/test/Transforms/SimplifyLibCalls/win-math.ll vendor/llvm/dist/test/Verifier/fpmath.ll vendor/llvm/dist/unittests/Support/MDBuilderTest.cpp Deleted: vendor/llvm/dist/include/llvm/Support/JSONParser.h vendor/llvm/dist/lib/Support/JSONParser.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonMCInst.h vendor/llvm/dist/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp vendor/llvm/dist/test/CodeGen/Generic/dbg-declare.ll vendor/llvm/dist/test/Verifier/fpaccuracy.ll vendor/llvm/dist/unittests/Support/JSONParserTest.cpp vendor/llvm/dist/utils/json-bench/ Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/CREDITS.TXT vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake vendor/llvm/dist/configure vendor/llvm/dist/docs/CodeGenerator.html vendor/llvm/dist/docs/CommandGuide/FileCheck.pod vendor/llvm/dist/docs/DebuggingJITedCode.html vendor/llvm/dist/docs/LLVMBuild.html vendor/llvm/dist/docs/LangRef.html vendor/llvm/dist/docs/ProgrammersManual.html vendor/llvm/dist/docs/ReleaseNotes.html vendor/llvm/dist/docs/TestingGuide.html vendor/llvm/dist/include/llvm-c/lto.h vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h vendor/llvm/dist/include/llvm/ADT/StringMap.h vendor/llvm/dist/include/llvm/CodeGen/DFAPacketizer.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAGInstrs.h vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/Config/config.h.in vendor/llvm/dist/include/llvm/IntrinsicsX86.td vendor/llvm/dist/include/llvm/LLVMContext.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmLexer.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmLexer.h vendor/llvm/dist/include/llvm/Object/ELF.h vendor/llvm/dist/include/llvm/Operator.h vendor/llvm/dist/include/llvm/Support/IRBuilder.h vendor/llvm/dist/include/llvm/Support/Process.h vendor/llvm/dist/include/llvm/Support/SourceMgr.h vendor/llvm/dist/include/llvm/Support/YAMLParser.h vendor/llvm/dist/include/llvm/Support/raw_ostream.h vendor/llvm/dist/include/llvm/TableGen/Error.h vendor/llvm/dist/include/llvm/TableGen/Record.h vendor/llvm/dist/include/llvm/Target/TargetLibraryInfo.h vendor/llvm/dist/include/llvm/Target/TargetRegisterInfo.h vendor/llvm/dist/include/llvm/Transforms/Utils/BasicBlockUtils.h vendor/llvm/dist/include/llvm/Transforms/Vectorize.h vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfAccelTable.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp vendor/llvm/dist/lib/CodeGen/DFAPacketizer.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineBlockPlacement.cpp vendor/llvm/dist/lib/CodeGen/Passes.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/SlotIndexes.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/Object/ELFObjectFile.cpp vendor/llvm/dist/lib/Support/CMakeLists.txt vendor/llvm/dist/lib/Support/SmallPtrSet.cpp vendor/llvm/dist/lib/Support/SourceMgr.cpp vendor/llvm/dist/lib/Support/Unix/Process.inc vendor/llvm/dist/lib/Support/Windows/Process.inc vendor/llvm/dist/lib/Support/YAMLParser.cpp vendor/llvm/dist/lib/Support/raw_ostream.cpp vendor/llvm/dist/lib/TableGen/Error.cpp vendor/llvm/dist/lib/Target/ARM/ARMCallingConv.td vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp vendor/llvm/dist/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUCallingConv.td vendor/llvm/dist/lib/Target/CellSPU/SPUTargetMachine.cpp vendor/llvm/dist/lib/Target/Hexagon/CMakeLists.txt vendor/llvm/dist/lib/Target/Hexagon/Hexagon.h vendor/llvm/dist/lib/Target/Hexagon/HexagonAsmPrinter.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonISelLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrFormats.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrFormatsV4.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.h vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfoV3.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfoV4.td vendor/llvm/dist/lib/Target/Hexagon/HexagonMCInstLower.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonSchedule.td vendor/llvm/dist/lib/Target/Hexagon/HexagonScheduleV4.td vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetMachine.cpp vendor/llvm/dist/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp vendor/llvm/dist/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.h vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeCallingConv.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeTargetMachine.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430TargetMachine.cpp vendor/llvm/dist/lib/Target/Mips/CMakeLists.txt vendor/llvm/dist/lib/Target/Mips/LLVMBuild.txt vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp vendor/llvm/dist/lib/Target/Mips/Makefile vendor/llvm/dist/lib/Target/Mips/Mips64InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsCondMov.td vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MipsInstrFormats.td vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.cpp vendor/llvm/dist/lib/Target/PTX/PTXTargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCCallingConv.td vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.cpp vendor/llvm/dist/lib/Target/TargetLibraryInfo.cpp vendor/llvm/dist/lib/Target/X86/Utils/X86ShuffleDecode.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86InstrFragmentsSIMD.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/XCore/XCoreTargetMachine.cpp vendor/llvm/dist/lib/Transforms/IPO/Internalize.cpp vendor/llvm/dist/lib/Transforms/IPO/PassManagerBuilder.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/ObjCARC.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/BreakCriticalEdges.cpp vendor/llvm/dist/lib/Transforms/Vectorize/BBVectorize.cpp vendor/llvm/dist/lib/VMCore/AutoUpgrade.cpp vendor/llvm/dist/lib/VMCore/Instructions.cpp vendor/llvm/dist/lib/VMCore/LLVMContext.cpp vendor/llvm/dist/lib/VMCore/Module.cpp vendor/llvm/dist/lib/VMCore/Verifier.cpp vendor/llvm/dist/test/Analysis/ScalarEvolution/nsw-offset.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/nsw.ll vendor/llvm/dist/test/CodeGen/ARM/2011-03-23-PeepholeBug.ll vendor/llvm/dist/test/CodeGen/ARM/fusedMAC.ll vendor/llvm/dist/test/CodeGen/ARM/ldr_post.ll vendor/llvm/dist/test/CodeGen/ARM/ldr_pre.ll vendor/llvm/dist/test/CodeGen/ARM/tail-opts.ll vendor/llvm/dist/test/CodeGen/ARM/vector-extend-narrow.ll vendor/llvm/dist/test/CodeGen/ARM/widen-vmovs.ll vendor/llvm/dist/test/CodeGen/CellSPU/2009-01-01-BrCond.ll vendor/llvm/dist/test/CodeGen/Mips/analyzebranch.ll vendor/llvm/dist/test/CodeGen/Mips/eh.ll vendor/llvm/dist/test/CodeGen/Mips/fpbr.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-branch.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ifcvt2.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-jtb.ll vendor/llvm/dist/test/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll vendor/llvm/dist/test/CodeGen/X86/2008-05-01-InvalidOrdCompare.ll vendor/llvm/dist/test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll vendor/llvm/dist/test/CodeGen/X86/2010-11-18-SelectOfExtload.ll vendor/llvm/dist/test/CodeGen/X86/2011-09-14-valcoalesce.ll vendor/llvm/dist/test/CodeGen/X86/atom-sched.ll vendor/llvm/dist/test/CodeGen/X86/atomic_op.ll vendor/llvm/dist/test/CodeGen/X86/avx2-intrinsics-x86.ll vendor/llvm/dist/test/CodeGen/X86/block-placement.ll vendor/llvm/dist/test/CodeGen/X86/br-fold.ll vendor/llvm/dist/test/CodeGen/X86/call-push.ll vendor/llvm/dist/test/CodeGen/X86/licm-dominance.ll vendor/llvm/dist/test/CodeGen/X86/loop-blocks.ll vendor/llvm/dist/test/CodeGen/X86/machine-cp.ll vendor/llvm/dist/test/CodeGen/X86/postra-licm.ll vendor/llvm/dist/test/CodeGen/X86/pr2659.ll vendor/llvm/dist/test/CodeGen/X86/select.ll vendor/llvm/dist/test/CodeGen/X86/sibcall.ll vendor/llvm/dist/test/CodeGen/X86/sink-hoist.ll vendor/llvm/dist/test/CodeGen/X86/smul-with-overflow.ll vendor/llvm/dist/test/CodeGen/X86/sse41-blend.ll vendor/llvm/dist/test/CodeGen/X86/sub-with-overflow.ll vendor/llvm/dist/test/CodeGen/X86/switch-bt.ll vendor/llvm/dist/test/CodeGen/X86/tail-opts.ll vendor/llvm/dist/test/CodeGen/X86/uint64-to-float.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-20.ll vendor/llvm/dist/test/CodeGen/X86/xor-icmp.ll vendor/llvm/dist/test/CodeGen/XCore/ashr.ll vendor/llvm/dist/test/MC/ARM/neon-add-encoding.s vendor/llvm/dist/test/MC/ARM/neon-shift-encoding.s vendor/llvm/dist/test/MC/ARM/neon-sub-encoding.s vendor/llvm/dist/test/MC/AsmParser/macro-args.s vendor/llvm/dist/test/MC/Disassembler/ARM/arm-tests.txt vendor/llvm/dist/test/MC/Disassembler/ARM/neon.txt vendor/llvm/dist/test/MC/Disassembler/ARM/neont2.txt vendor/llvm/dist/test/MC/Disassembler/X86/intel-syntax.txt vendor/llvm/dist/test/MC/Mips/elf-bigendian.ll vendor/llvm/dist/test/Transforms/GlobalOpt/constantfold-initializers.ll vendor/llvm/dist/test/Transforms/InstCombine/apint-shift.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll vendor/llvm/dist/test/Transforms/SimplifyLibCalls/floor.ll vendor/llvm/dist/test/lit.cfg vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/lli/lli.cpp vendor/llvm/dist/tools/llvm-mc/Disassembler.cpp vendor/llvm/dist/tools/llvm-mc/Disassembler.h vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/llvm-shlib/Makefile vendor/llvm/dist/tools/llvm-stress/llvm-stress.cpp vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/lto/LTOCodeGenerator.h vendor/llvm/dist/tools/lto/lto.cpp vendor/llvm/dist/tools/lto/lto.exports vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/CMakeLists.txt vendor/llvm/dist/unittests/VMCore/InstructionsTest.cpp vendor/llvm/dist/utils/Makefile vendor/llvm/dist/utils/TableGen/AsmMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenRegisters.cpp vendor/llvm/dist/utils/TableGen/EDEmitter.cpp vendor/llvm/dist/utils/TableGen/RegisterInfoEmitter.cpp vendor/llvm/dist/utils/buildit/build_llvm vendor/llvm/dist/utils/release/findRegressions-nightly.py vendor/llvm/dist/utils/release/findRegressions-simple.py vendor/llvm/dist/utils/release/tag.sh vendor/llvm/dist/utils/release/test-release.sh Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/CMakeLists.txt Thu May 3 16:50:55 2012 (r234971) @@ -213,15 +213,6 @@ if( WIN32 AND NOT CYGWIN ) set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32 tools") endif() -# On Win32 using MS tools, provide an option to set the number of parallel jobs -# to use. -if( MSVC_IDE AND ( MSVC90 OR MSVC10 ) ) - # Only Visual Studio 2008 and 2010 officially supports /MP. Visual Studio - # 2005 supports it but it is experimental. - set(LLVM_COMPILER_JOBS "0" CACHE STRING - "Number of parallel compiler jobs. 0 means use all processors. Default is 0.") -endif() - # Define options to control the inclusion and default build behavior for # components which may not strictly be necessary (tools, runtime, examples, and # tests). @@ -396,7 +387,6 @@ add_subdirectory(utils/FileUpdate) add_subdirectory(utils/count) add_subdirectory(utils/not) add_subdirectory(utils/llvm-lit) -add_subdirectory(utils/json-bench) add_subdirectory(utils/yaml-bench) add_subdirectory(projects) Modified: vendor/llvm/dist/CREDITS.TXT ============================================================================== --- vendor/llvm/dist/CREDITS.TXT Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/CREDITS.TXT Thu May 3 16:50:55 2012 (r234971) @@ -50,9 +50,15 @@ N: Cameron Buschardt E: buschard@uiuc.edu D: The `mem2reg' pass - promotes values stored in memory to registers +N: Brendon Cahoon +E: bcahoon@codeaurora.org +D: Loop unrolling with run-time trip counts. + N: Chandler Carruth E: chandlerc@gmail.com -D: LinkTimeOptimizer for Linux, via binutils integration, and C API +D: Hashing algorithms and interfaces +D: Inline cost analysis +D: Machine block placement pass N: Casey Carter E: ccarter@uiuc.edu @@ -210,6 +216,10 @@ N: Benjamin Kramer E: benny.kra@gmail.com D: Miscellaneous bug fixes +N: Sundeep Kushwaha +E: sundeepk@codeaurora.org +D: Implemented DFA-based target independent VLIW packetizer + N: Christopher Lamb E: christopher.lamb@gmail.com D: aligned load/store support, parts of noalias and restrict support @@ -245,6 +255,10 @@ N: Nick Lewycky E: nicholas@mxc.ca D: PredicateSimplifier pass +N: Tony Linthicum, et. al. +E: tlinth@codeaurora.org +D: Backend for Qualcomm's Hexagon VLIW processor. + N: Bruno Cardoso Lopes E: bruno.cardoso@gmail.com W: http://www.brunocardoso.org @@ -271,6 +285,10 @@ N: Scott Michel E: scottm@aero.org D: Added STI Cell SPU backend. +N: Kai Nacke +E: kai@redstar.de +D: Support for implicit TLS model used with MS VC runtime + N: Takumi Nakamura E: geek4civic@gmail.com E: chapuni@hf.rim.or.jp Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/autoconf/configure.ac Thu May 3 16:50:55 2012 (r234971) @@ -838,6 +838,13 @@ AC_ARG_WITH(gcc-toolchain, AC_DEFINE_UNQUOTED(GCC_INSTALL_PREFIX,"$withval", [Directory where gcc is installed.]) +AC_ARG_WITH(default-sysroot, + AS_HELP_STRING([--with-default-sysroot], + [Add --sysroot= to all compiler invocations.]),, + withval="") +AC_DEFINE_UNQUOTED(DEFAULT_SYSROOT,"$withval", + [Default to all compiler invocations for --sysroot=.]) + dnl Allow linking of LLVM with GPLv3 binutils code. AC_ARG_WITH(binutils-include, AS_HELP_STRING([--with-binutils-include], Modified: vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Thu May 3 16:50:55 2012 (r234971) @@ -110,9 +110,9 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT endif( LLVM_BUILD_32_BITS ) endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) -if( MSVC_IDE AND ( MSVC90 OR MSVC10 ) ) - # Only Visual Studio 2008 and 2010 officially supports /MP. - # Visual Studio 2005 do support it but it's experimental there. +# On Win32 using MS tools, provide an option to set the number of parallel jobs +# to use. +if( MSVC_IDE ) set(LLVM_COMPILER_JOBS "0" CACHE STRING "Number of parallel compiler jobs. 0 means use all processors. Default is 0.") if( NOT LLVM_COMPILER_JOBS STREQUAL "1" ) Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/configure Thu May 3 16:50:55 2012 (r234971) @@ -1442,6 +1442,7 @@ Optional Packages: --with-c-include-dirs Colon separated list of directories clang will search for headers --with-gcc-toolchain Directory where gcc is installed. + --with-default-sysroot Add --sysroot= to all compiler invocations. --with-binutils-include Specify path to binutils/include/ containing plugin-api.h file for gold plugin. --with-bug-report-url Specify the URL where bug reports should be @@ -3802,7 +3803,7 @@ else llvm_cv_target_os_type="Darwin" ;; *-*-minix*) llvm_cv_target_os_type="Minix" ;; - *-*-freebsd*| *-*-kfreebsd-gnu) + *-*-freebsd* | *-*-kfreebsd-gnu) llvm_cv_target_os_type="FreeBSD" ;; *-*-openbsd*) llvm_cv_target_os_type="OpenBSD" ;; @@ -5583,6 +5584,20 @@ _ACEOF +# Check whether --with-default-sysroot was given. +if test "${with_default_sysroot+set}" = set; then + withval=$with_default_sysroot; +else + withval="" +fi + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_SYSROOT "$withval" +_ACEOF + + + # Check whether --with-binutils-include was given. if test "${with_binutils_include+set}" = set; then withval=$with_binutils_include; @@ -10386,7 +10401,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <GenRegisterNames.inc file for that architecture. For instance, by - inspecting lib/Target/X86/X86GenRegisterNames.inc we see that the - 32-bit register EAX is denoted by 15, and the MMX register - MM0 is mapped to 48.

+ inspecting lib/Target/X86/X86GenRegisterInfo.inc we see that the + 32-bit register EAX is denoted by 43, and the MMX register + MM0 is mapped to 65.

Some architectures contain registers that share the same physical location. A notable example is the X86 platform. For instance, in the X86 architecture, @@ -1627,7 +1627,7 @@ def : Pat<(i32 imm:$imm), bits. These physical registers are marked as aliased in LLVM. Given a particular architecture, you can check which registers are aliased by inspecting its RegisterInfo.td file. Moreover, the method - TargetRegisterInfo::getAliasSet(p_reg) returns an array containing + MCRegisterInfo::getAliasSet(p_reg) returns an array containing all the physical registers aliased to the register p_reg.

Physical registers, in LLVM, are grouped in Register Classes. @@ -3182,7 +3182,7 @@ MOVSX32rm16 -> movsx, 32-bit register Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2012-03-27 13:25:16 +0200 (Tue, 27 Mar 2012) $ + Last modified: $Date: 2012-04-15 22:22:36 +0200 (Sun, 15 Apr 2012) $ Modified: vendor/llvm/dist/docs/CommandGuide/FileCheck.pod ============================================================================== --- vendor/llvm/dist/docs/CommandGuide/FileCheck.pod Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/docs/CommandGuide/FileCheck.pod Thu May 3 16:50:55 2012 (r234971) @@ -67,20 +67,20 @@ This syntax says to pipe the current fil llc, then pipe the output of llc into FileCheck. This means that FileCheck will be verifying its standard input (the llc output) against the filename argument specified (the original .ll file specified by "%s"). To see how this works, -lets look at the rest of the .ll file (after the RUN line): +let's look at the rest of the .ll file (after the RUN line): define void @sub1(i32* %p, i32 %v) { entry: - ; CHECK: sub1: - ; CHECK: subl + ; CHECK: sub1: + ; CHECK: subl %0 = tail call i32 @llvm.atomic.load.sub.i32.p0i32(i32* %p, i32 %v) ret void } define void @inc4(i64* %p) { entry: - ; CHECK: inc4: - ; CHECK: incq + ; CHECK: inc4: + ; CHECK: incq %0 = tail call i64 @llvm.atomic.load.add.i64.p0i64(i64* %p, i64 1) ret void } @@ -111,18 +111,18 @@ driven from one .ll file. This is usefu testing different architectural variants with llc. Here's a simple example: ; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin9 -mattr=sse41 \ - ; RUN: | FileCheck %s -check-prefix=X32 + ; RUN: | FileCheck %s -check-prefix=X32> ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin9 -mattr=sse41 \ - ; RUN: | FileCheck %s -check-prefix=X64 + ; RUN: | FileCheck %s -check-prefix=X64> define <4 x i32> @pinsrd_1(i32 %s, <4 x i32> %tmp) nounwind { %tmp1 = insertelement <4 x i32>; %tmp, i32 %s, i32 1 ret <4 x i32> %tmp1 - ; X32: pinsrd_1: - ; X32: pinsrd $1, 4(%esp), %xmm0 + ; X32: pinsrd_1: + ; X32: pinsrd $1, 4(%esp), %xmm0 - ; X64: pinsrd_1: - ; X64: pinsrd $1, %edi, %xmm0 + ; X64: pinsrd_1: + ; X64: pinsrd $1, %edi, %xmm0 } In this case, we're testing that we get the expected code generation with @@ -147,13 +147,13 @@ example, something like this works as yo store <2 x double> %tmp9, <2 x double>* %r, align 16 ret void - ; CHECK: t2: - ; CHECK: movl 8(%esp), %eax - ; CHECK-NEXT: movapd (%eax), %xmm0 - ; CHECK-NEXT: movhpd 12(%esp), %xmm0 - ; CHECK-NEXT: movl 4(%esp), %eax - ; CHECK-NEXT: movapd %xmm0, (%eax) - ; CHECK-NEXT: ret + ; CHECK: t2: + ; CHECK: movl 8(%esp), %eax + ; CHECK-NEXT: movapd (%eax), %xmm0 + ; CHECK-NEXT: movhpd 12(%esp), %xmm0 + ; CHECK-NEXT: movl 4(%esp), %eax + ; CHECK-NEXT: movapd %xmm0, (%eax) + ; CHECK-NEXT: ret } CHECK-NEXT: directives reject the input unless there is exactly one newline @@ -177,9 +177,9 @@ can be used: %A = load i8* %P3 ret i8 %A - ; CHECK: @coerce_offset0 - ; CHECK-NOT: load - ; CHECK: ret i8 + ; CHECK: @coerce_offset0 + ; CHECK-NOT: load + ; CHECK: ret i8 } @@ -195,7 +195,7 @@ matching for a majority of what we do, F mixing and matching fixed string matching with regular expressions. This allows you to write things like this: - ; CHECK: movhpd {{[0-9]+}}(%esp), {{%xmm[0-7]}} + ; CHECK: movhpd {{[0-9]+}}(%esp), {{%xmm[0-7]}} In this case, any offset from the ESP register will be allowed, and any xmm register will be allowed. @@ -217,20 +217,20 @@ allows named variables to be defined and simple example: ; CHECK: test5: - ; CHECK: notw [[REGISTER:%[a-z]+]] - ; CHECK: andw {{.*}}[[REGISTER]] + ; CHECK: notw [[REGISTER:%[a-z]+]] + ; CHECK: andw {{.*}}[REGISTER]] -The first check line matches a regex (%[a-z]+) and captures it into -the variables "REGISTER". The second line verifies that whatever is in REGISTER +The first check line matches a regex (B<%[a-z]+>) and captures it into +the variable "REGISTER". The second line verifies that whatever is in REGISTER occurs later in the file after an "andw". FileCheck variable references are -always contained in [[ ]] pairs, are named, and their names can be -formed with the regex "[a-zA-Z_][a-zA-Z0-9_]*". If a colon follows the +always contained in B<[[ ]]> pairs, are named, and their names can be +formed with the regex "B<[a-zA-Z_][a-zA-Z0-9_]*>". If a colon follows the name, then it is a definition of the variable, if not, it is a use. FileCheck variables can be defined multiple times, and uses always get the latest value. Note that variables are all read at the start of a "CHECK" line and are all defined at the end. This means that if you have something like -"CHECK: [[XYZ:.*]]x[[XYZ]]" that the check line will read the previous +"B", the check line will read the previous value of the XYZ variable and define a new one after the match is performed. If you need to do something like this you can probably take advantage of the fact that FileCheck is not actually line-oriented when it matches, this allows you to Modified: vendor/llvm/dist/docs/DebuggingJITedCode.html ============================================================================== --- vendor/llvm/dist/docs/DebuggingJITedCode.html Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/docs/DebuggingJITedCode.html Thu May 3 16:50:55 2012 (r234971) @@ -8,135 +8,165 @@ -

Debugging JITed Code With GDB

+

Debugging JIT-ed Code With GDB

    -
  1. Example usage
  2. Background
  3. +
  4. GDB Version
  5. +
  6. Debugging MCJIT-ed code
  7. +
-
Written by Reid Kleckner
+
Written by Reid Kleckner and Eli Bendersky
-

Example usage

+

Background

-

In order to debug code JITed by LLVM, you need GDB 7.0 or newer, which is +

Without special runtime support, debugging dynamically generated code with +GDB (as well as most debuggers) can be quite painful. Debuggers generally read +debug information from the object file of the code, but for JITed code, there is +no such file to look for. +

+ +

In order to communicate the necessary debug info to GDB, an interface for +registering JITed code with debuggers has been designed and implemented for +GDB and LLVM MCJIT. At a high level, whenever MCJIT generates new machine code, +it does so in an in-memory object file that contains the debug information in +DWARF format. MCJIT then adds this in-memory object file to a global list of +dynamically generated object files and calls a special function +(__jit_debug_register_code) marked noinline that GDB knows about. When +GDB attaches to a process, it puts a breakpoint in this function and loads all +of the object files in the global list. When MCJIT calls the registration +function, GDB catches the breakpoint signal, loads the new object file from +the inferior's memory, and resumes the execution. In this way, GDB can get the +necessary debug information. +

+
+ + +

GDB Version

+ + +

In order to debug code JIT-ed by LLVM, you need GDB 7.0 or newer, which is available on most modern distributions of Linux. The version of GDB that Apple ships with XCode has been frozen at 6.3 for a while. LLDB may be a better -option for debugging JITed code on Mac OS X. +option for debugging JIT-ed code on Mac OS X.

-

Consider debugging the following code compiled with clang and run through -lli: -

-
-#include <stdio.h>
+
+

Debugging MCJIT-ed code

+ +
-void foo() { - printf("%d\n", *(int*)NULL); // Crash here -} - -void bar() { - foo(); -} - -void baz() { - bar(); -} - -int main(int argc, char **argv) { - baz(); -} -
+

The emerging MCJIT component of LLVM allows full debugging of JIT-ed code with +GDB. This is due to MCJIT's ability to use the MC emitter to provide full +DWARF debugging information to GDB.

-

Here are the commands to run that application under GDB and print the stack -trace at the crash: -

+

Note that lli has to be passed the -use-mcjit flag to JIT the code +with MCJIT instead of the old JIT.

-
-# Compile foo.c to bitcode.  You can use either clang or llvm-gcc with this
-# command line.  Both require -fexceptions, or the calls are all marked
-# 'nounwind' which disables DWARF exception handling info.  Custom frontends
-# should avoid adding this attribute to JITed code, since it interferes with
-# DWARF CFA generation at the moment.
-$ clang foo.c -fexceptions -emit-llvm -c -o foo.bc
-
-# Run foo.bc under lli with -jit-emit-debug.  If you built lli in debug mode,
-# -jit-emit-debug defaults to true.
-$ $GDB_INSTALL/gdb --args lli -jit-emit-debug foo.bc
-...
-
-# Run the code.
-(gdb) run
-Starting program: /tmp/gdb/lli -jit-emit-debug foo.bc
-[Thread debugging using libthread_db enabled]
+

Example

-Program received signal SIGSEGV, Segmentation fault. -0x00007ffff7f55164 in foo () +
-# Print the backtrace, this time with symbols instead of ??. -(gdb) bt -#0 0x00007ffff7f55164 in foo () -#1 0x00007ffff7f550f9 in bar () -#2 0x00007ffff7f55099 in baz () -#3 0x00007ffff7f5502a in main () -#4 0x00000000007c0225 in llvm::JIT::runFunction(llvm::Function*, - std::vector<llvm::GenericValue, - std::allocator<llvm::GenericValue> > const&) () -#5 0x00000000007d6d98 in - llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, - std::vector<std::string, - std::allocator<std::string> > const&, char const* const*) () -#6 0x00000000004dab76 in main () +

Consider the following C code (with line numbers added to make the example +easier to follow):

+ +
+1   int compute_factorial(int n)
+2   {
+3       if (n <= 1)
+4           return 1;
+5
+6       int f = n;
+7       while (--n > 1) 
+8           f *= n;
+9       return f;
+10  }
+11
+12
+13  int main(int argc, char** argv)
+14  {
+15      if (argc < 2)
+16          return -1;
+17      char firstletter = argv[1][0];
+18      int result = compute_factorial(firstletter - '0');
+19  
+20      // Returned result is clipped at 255...
+21      return result;
+22  }
 
-

As you can see, GDB can correctly unwind the stack and has the appropriate -function names. +

Here is a sample command line session that shows how to build and run this +code via lli inside GDB:

-
- -

Background

- -
+
+$ $BINPATH/clang -cc1 -O0 -g -emit-llvm showdebug.c
+$ gdb --quiet --args $BINPATH/lli -use-mcjit showdebug.ll 5
+Reading symbols from $BINPATH/lli...done.
+(gdb) b showdebug.c:6
+No source file named showdebug.c.
+Make breakpoint pending on future shared library load? (y or [n]) y
+Breakpoint 1 (showdebug.c:6) pending.
+(gdb) r
+Starting program: $BINPATH/lli -use-mcjit showdebug.ll 5
+[Thread debugging using libthread_db enabled]
 
-

Without special runtime support, debugging dynamically generated code with -GDB (as well as most debuggers) can be quite painful. Debuggers generally read -debug information from the object file of the code, but for JITed code, there is -no such file to look for. -

+Breakpoint 1, compute_factorial (n=5) at showdebug.c:6 +6 int f = n; +(gdb) p n +$1 = 5 +(gdb) p f +$2 = 0 +(gdb) n +7 while (--n > 1) +(gdb) p f +$3 = 5 +(gdb) b showdebug.c:9 +Breakpoint 2 at 0x7ffff7ed404c: file showdebug.c, line 9. +(gdb) c +Continuing. + +Breakpoint 2, compute_factorial (n=1) at showdebug.c:9 +9 return f; +(gdb) p f +$4 = 120 +(gdb) bt +#0 compute_factorial (n=1) at showdebug.c:9 +#1 0x00007ffff7ed40a9 in main (argc=2, argv=0x16677e0) at showdebug.c:18 +#2 0x3500000001652748 in ?? () +#3 0x00000000016677e0 in ?? () +#4 0x0000000000000002 in ?? () +#5 0x0000000000d953b3 in llvm::MCJIT::runFunction (this=0x16151f0, F=0x1603020, ArgValues=...) at /home/ebenders_test/llvm_svn_rw/lib/ExecutionEngine/MCJIT/MCJIT.cpp:161 +#6 0x0000000000dc8872 in llvm::ExecutionEngine::runFunctionAsMain (this=0x16151f0, Fn=0x1603020, argv=..., envp=0x7fffffffe040) + at /home/ebenders_test/llvm_svn_rw/lib/ExecutionEngine/ExecutionEngine.cpp:397 +#7 0x000000000059c583 in main (argc=4, argv=0x7fffffffe018, envp=0x7fffffffe040) at /home/ebenders_test/llvm_svn_rw/tools/lli/lli.cpp:324 +(gdb) finish +Run till exit from #0 compute_factorial (n=1) at showdebug.c:9 +0x00007ffff7ed40a9 in main (argc=2, argv=0x16677e0) at showdebug.c:18 +18 int result = compute_factorial(firstletter - '0'); +Value returned is $5 = 120 +(gdb) p result +$6 = 23406408 +(gdb) n +21 return result; +(gdb) p result +$7 = 120 +(gdb) c +Continuing. -

Depending on the architecture, this can impact the debugging experience in -different ways. For example, on most 32-bit x86 architectures, you can simply -compile with -fno-omit-frame-pointer for GCC and -disable-fp-elim for LLVM. -When GDB creates a backtrace, it can properly unwind the stack, but the stack -frames owned by JITed code have ??'s instead of the appropriate symbol name. -However, on Linux x86_64 in particular, GDB relies on the DWARF call frame -address (CFA) debug information to unwind the stack, so even if you compile -your program to leave the frame pointer untouched, GDB will usually be unable -to unwind the stack past any JITed code stack frames. -

+Program exited with code 0170. +(gdb) -

In order to communicate the necessary debug info to GDB, an interface for -registering JITed code with debuggers has been designed and implemented for -GDB and LLVM. At a high level, whenever LLVM generates new machine code, it -also generates an object file in memory containing the debug information. LLVM -then adds the object file to the global list of object files and calls a special -function (__jit_debug_register_code) marked noinline that GDB knows about. When -GDB attaches to a process, it puts a breakpoint in this function and loads all -of the object files in the global list. When LLVM calls the registration -function, GDB catches the breakpoint signal, loads the new object file from -LLVM's memory, and resumes the execution. In this way, GDB can get the -necessary debug information. -

+
-

At the time of this writing, LLVM only supports architectures that use ELF -object files and it only generates symbols and DWARF CFA information. However, -it would be easy to add more information to the object file, so we don't need to -coordinate with GDB to get better debug information. -

+ +
@@ -145,9 +175,10 @@ coordinate with GDB to get better debug src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"> Valid HTML 4.01 - Reid Kleckner
+ Reid Kleckner, + Eli Bendersky
The LLVM Compiler Infrastructure
- Last modified: $Date: 2011-10-31 12:21:59 +0100 (Mon, 31 Oct 2011) $ + Last modified: $Date: 2012-05-01 09:58:54 +0200 (Tue, 01 May 2012) $ Modified: vendor/llvm/dist/docs/LLVMBuild.html ============================================================================== --- vendor/llvm/dist/docs/LLVMBuild.html Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/docs/LLVMBuild.html Thu May 3 16:50:55 2012 (r234971) @@ -101,7 +101,7 @@ $ROOT of project trees for things which

As mentioned earlier, LLVM projects are organized into - logical components. Every component is typically grouped into it's + logical components. Every component is typically grouped into its own subdirectory. Generally, a component is organized around a coherent group of sources which have some kind of clear API separation from other parts of the code.

@@ -190,7 +190,7 @@ required_libraries = Archive BitReader C number in order for files with multiple components ("component_0", "component_1", and so on).

-

Section names not matches this format (or the "common" section) are +

Section names not matching this format (or the "common" section) are currently unused and are disallowed.

Every component is defined by the properties in the section. The exact list @@ -212,7 +212,7 @@ required_libraries = Archive BitReader C

  • parent [required]

    The name of the logical parent of the component. Components are organized into a logical tree to make it easier to navigate and organize - groups of components. The parent's have no semantics as far as the project + groups of components. The parents have no semantics as far as the project build is concerned, however. Typically, the parent will be the main component of the parent directory.

    @@ -263,7 +263,7 @@ required_libraries = Archive BitReader C

    If given, a list of the names of Library or LibraryGroup components which must also be linked in whenever this library is used. That is, the link time dependencies for this component. When tools are built, - the build system will include the transitive closer of + the build system will include the transitive closure of all required_libraries for the components the tool needs.

  • add_to_library_groups [optional] Modified: vendor/llvm/dist/docs/LangRef.html ============================================================================== --- vendor/llvm/dist/docs/LangRef.html Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/docs/LangRef.html Thu May 3 16:50:55 2012 (r234971) @@ -103,7 +103,7 @@
  • Metadata Nodes and Metadata Strings
    1. 'tbaa' Metadata
    2. -
    3. 'fpaccuracy' Metadata
    4. +
    5. 'fpmath' Metadata
    6. 'range' Metadata
  • @@ -3000,16 +3000,16 @@ call void @llvm.dbg.value(metadata !24,

    - 'fpaccuracy' Metadata + 'fpmath' Metadata

    -

    fpaccuracy metadata may be attached to any instruction of floating - point type. It expresses the maximum relative error allowed in the result - of that instruction, in ULPs, thus potentially allowing the compiler to use - a more efficient but less accurate method of computing it. - ULP is defined as follows:

    +

    fpmath metadata may be attached to any instruction of floating point + type. It can be used to express the maximum acceptable error in the result of + that instruction, in ULPs, thus potentially allowing the compiler to use a + more efficient but less accurate method of computing it. ULP is defined as + follows:

    @@ -3021,13 +3021,12 @@ call void @llvm.dbg.value(metadata !24,
    -

    The metadata node shall consist of a single non-negative floating - point number representing the maximum relative error. For example, - 2.5 ULP:

    +

    The metadata node shall consist of a single positive floating point number + representing the maximum relative error, for example:

    -!0 = metadata !{ float 2.5 }
    +!0 = metadata !{ float 2.5 } ; maximum acceptable inaccuracy is 2.5 ULPs
     
    @@ -8506,7 +8505,7 @@ LLVM.

    Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2012-04-10 10:22:43 +0200 (Tue, 10 Apr 2012) $ + Last modified: $Date: 2012-04-16 21:39:33 +0200 (Mon, 16 Apr 2012) $ Modified: vendor/llvm/dist/docs/ProgrammersManual.html ============================================================================== --- vendor/llvm/dist/docs/ProgrammersManual.html Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/docs/ProgrammersManual.html Thu May 3 16:50:55 2012 (r234971) @@ -1734,6 +1734,9 @@ already in the table, and each pair in t

    StringMap also provides query methods that take byte ranges, so it only ever copies a string if a value is inserted into the table.

    + +

    StringMap iteratation order, however, is not guaranteed to be deterministic, +so any uses which require that should instead use a std::map.

    @@ -4125,7 +4128,7 @@ arguments. An argument has a pointer to Dinakar Dhurjati and Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2012-03-27 13:25:16 +0200 (Tue, 27 Mar 2012) $ + Last modified: $Date: 2012-04-18 22:28:55 +0200 (Wed, 18 Apr 2012) $ Modified: vendor/llvm/dist/docs/ReleaseNotes.html ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.html Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/docs/ReleaseNotes.html Thu May 3 16:50:55 2012 (r234971) @@ -206,6 +206,36 @@ Release Notes.
    + + +

    +Polly: Polyhedral Optimizer +

    + +
    + +

    Polly is an experimental + optimizer for data locality and parallelism. It currently provides high-level + loop optimizations and automatic parallelisation (using the OpenMP run time). + Work in the area of automatic SIMD and accelerator code generation was + started. + +

    Within the LLVM 3.1 time-frame there were the following highlights:

    + +
      +
    • Polly became an official LLVM project
    • +
    • Polly can be loaded directly into clang (Enabled by '-O3 -mllvm -polly' + )
    • +
    • An automatic scheduling optimizer (derived from Pluto) was integrated. It + performs loop transformations to optimize for data-locality and parallelism. + The transformations include, but are not limited to interchange, fusion, + fission, skewing and tiling. +
    • +
    + +
    + @@ -269,6 +299,8 @@ Release Notes. Support to model instruction bundling / packing.
  • ARM Integrated Assembler, A full featured assembler and direct-to-object support for ARM.
  • +
  • Basic Block Placement + Probability driven basic block placement.
  • ....
  • @@ -292,6 +324,9 @@ Release Notes. module as a whole to LLVM subsystems.
  • Loads can now have range metadata attached to them to describe the possible values being loaded.
  • +
  • Inline cost heuristics have been completely overhauled and now closely + model constant propagation through call sites, disregard trivially dead + code costs, and can model C++ STL iterator patterns.
  • ....
  • @@ -308,6 +343,14 @@ Release Notes. optimizers:

      +
    • The loop unroll pass now is able to unroll loops with run-time trip counts. + This feature is turned off by default, and is enabled with the + -unroll-runtime flag.
    • +
    • A new basic-block autovectorization pass is available. Pass + -vectorize to run this pass along with some associated + post-vectorization cleanup passes. For more information, see the EuroLLVM + 2012 slides: + Autovectorization with LLVM.
    • ....
    @@ -373,6 +416,19 @@ Release Notes. target's schedule description which can be queried to determine legal groupings of instructions in a bundle.

    +

    We have added a new target independent VLIW packetizer based on the + DFA infrastructure to group machine instructions into bundles.

    + + + +

    +Basic Block Placement +

    +
    +

    A probability based block placement and code layout algorithm was added to +LLVM's code generator. This layout pass supports probabilities derived from +static heuristics as well as source code annotations such as +__builtin_expect.

    @@ -391,6 +447,7 @@ Release Notes. times and better support for different calling conventions. The old WINCALL instructions are no longer needed.
  • DW2 Exception Handling is enabled on Cygwin and MinGW.
  • +
  • Support for implicit TLS model used with MS VC runtime
  • @@ -451,6 +508,8 @@ syntax, there are still significant gaps
    +

    Support for Qualcomm's Hexagon VLIW processor has been added.

    +
    • ....
    • @@ -524,6 +583,8 @@ syntax, there are still significant gaps
    • llvm::getTrapFunctionName()
    • llvm::EnableSegmentedStacks
    +
  • The MDBuilder class has been added to simplify the creation of + metadata.
  • ....
  • @@ -621,7 +682,7 @@ syntax, there are still significant gaps src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2012-04-12 17:17:35 +0200 (Thu, 12 Apr 2012) $ + Last modified: $Date: 2012-04-17 03:13:53 +0200 (Tue, 17 Apr 2012) $ Modified: vendor/llvm/dist/docs/TestingGuide.html ============================================================================== --- vendor/llvm/dist/docs/TestingGuide.html Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/docs/TestingGuide.html Thu May 3 16:50:55 2012 (r234971) @@ -299,15 +299,15 @@ clang/test directory.

    you.

    In order for the regression tests to work, each directory of tests must - have a dg.exp file. Lit looks for this file to determine how to - run the tests. This file is just a Tcl script and it can do anything you want, + have a lit.local.cfg file. Lit looks for this file to determine how + to run the tests. This file is just Python code and thus is very flexible, but we've standardized it for the LLVM regression tests. If you're adding a - directory of tests, just copy dg.exp from another directory to get - running. The standard dg.exp simply loads a Tcl library - (test/lib/llvm.exp) and calls the llvm_runtests function - defined in that library with a list of file names to run. The names are - obtained by using Tcl's glob command. Any directory that contains only - directories does not need the dg.exp file.

    + directory of tests, just copy lit.local.cfg from another directory to + get running. The standard lit.local.cfg simply specifies which files + to look in for tests. Any directory that contains only directories does not + need the lit.local.cfg file. Read the + Lit documentation for more + information.

    The llvm-runtests function looks at each file that is passed to it and gathers any lines together that match "RUN:". These are the "RUN" lines @@ -473,7 +473,7 @@ negatives).

    llc, then pipe the output of llc into FileCheck. This means that FileCheck will be verifying its standard input (the llc output) against the filename argument specified (the original .ll file specified by "%s"). To see how this works, -lets look at the rest of the .ll file (after the RUN line):

    +let's look at the rest of the .ll file (after the RUN line):

    @@ -900,7 +900,7 @@ the The LLVM Compiler Infrastructure
    - Last modified: $Date: 2012-03-27 13:25:16 +0200 (Tue, 27 Mar 2012) $ + Last modified: $Date: 2012-04-18 10:02:25 +0200 (Wed, 18 Apr 2012) $ Modified: vendor/llvm/dist/include/llvm-c/lto.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/lto.h Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/include/llvm-c/lto.h Thu May 3 16:50:55 2012 (r234971) @@ -251,12 +251,6 @@ lto_codegen_set_assembler_args(lto_code_ int nargs); /** - * Enables the internalize pass during LTO optimizations. - */ -extern void -lto_codegen_set_whole_program_optimization(lto_code_gen_t cg); - -/** * Adds to a list of all global symbols that must exist in the final * generated code. If a function is not listed, it might be * inlined into every usage and optimized away. Modified: vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h Thu May 3 16:50:55 2012 (r234971) @@ -126,9 +126,6 @@ protected: private: bool isSmall() const { return CurArray == SmallArray; } - unsigned Hash(const void *Ptr) const { - return static_cast(((uintptr_t)Ptr >> 4) & (CurArraySize-1)); - } const void * const *FindBucketFor(const void *Ptr) const; void shrink_and_clear(); Modified: vendor/llvm/dist/include/llvm/ADT/StringMap.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/StringMap.h Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/include/llvm/ADT/StringMap.h Thu May 3 16:50:55 2012 (r234971) @@ -239,7 +239,7 @@ public: explicit StringMap(AllocatorTy A) : StringMapImpl(static_cast(sizeof(MapEntryTy))), Allocator(A) {} - explicit StringMap(const StringMap &RHS) + StringMap(const StringMap &RHS) : StringMapImpl(static_cast(sizeof(MapEntryTy))) { assert(RHS.empty() && "Copy ctor from non-empty stringmap not implemented yet!"); Modified: vendor/llvm/dist/include/llvm/CodeGen/DFAPacketizer.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/DFAPacketizer.h Thu May 3 16:49:27 2012 (r234970) +++ vendor/llvm/dist/include/llvm/CodeGen/DFAPacketizer.h Thu May 3 16:50:55 2012 (r234971) @@ -28,7 +28,6 @@ #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/ADT/DenseMap.h" -#include namespace llvm { @@ -37,7 +36,7 @@ class MachineInstr; class MachineLoopInfo; class MachineDominatorTree; class InstrItineraryData; -class DefaultVLIWScheduler; +class ScheduleDAGInstrs; class SUnit; class DFAPacketizer { @@ -78,8 +77,6 @@ public: // reserveResources - Reserve the resources occupied by a machine // instruction and change the current state to reflect that change. void reserveResources(llvm::MachineInstr *MI); - - const InstrItineraryData *getInstrItins() const { return InstrItins; } }; // VLIWPacketizerList - Implements a simple VLIW packetizer using DFA. The @@ -90,21 +87,20 @@ public: // and machine resource is marked as taken. If any dependency is found, a target // API call is made to prune the dependence. class VLIWPacketizerList { -protected: const TargetMachine &TM; const MachineFunction &MF; const TargetInstrInfo *TII; - // The VLIW Scheduler. - DefaultVLIWScheduler *VLIWScheduler; + // Encapsulate data types not exposed to the target interface. + ScheduleDAGInstrs *SchedulerImpl; +protected: // Vector of instructions assigned to the current packet. std::vector CurrentPacketMIs; // DFA resource tracker. DFAPacketizer *ResourceTracker; - - // Generate MI -> SU map. - std::map MIToSUnit; + // Scheduling units. + std::vector SUnits; public: VLIWPacketizerList( @@ -122,32 +118,17 @@ public: DFAPacketizer *getResourceTracker() {return ResourceTracker;} // addToPacket - Add MI to the current packet. - virtual MachineBasicBlock::iterator addToPacket(MachineInstr *MI) { - MachineBasicBlock::iterator MII = MI; - CurrentPacketMIs.push_back(MI); - ResourceTracker->reserveResources(MI); - return MII; - } + void addToPacket(MachineInstr *MI); // endPacket - End the current packet. - void endPacket(MachineBasicBlock *MBB, MachineInstr *MI); - - // initPacketizerState - perform initialization before packetizing - // an instruction. This function is supposed to be overrided by - // the target dependent packetizer. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Thu May 3 16:52:07 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF183106567A; Thu, 3 May 2012 16:52:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C18318FC17; Thu, 3 May 2012 16:52:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q43Gq7cr052874; Thu, 3 May 2012 16:52:07 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q43Gq71E052873; Thu, 3 May 2012 16:52:07 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205031652.q43Gq71E052873@svn.freebsd.org> From: Dimitry Andric Date: Thu, 3 May 2012 16:52:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234972 - vendor/llvm/llvm-release_31-r155985 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 16:52:08 -0000 Author: dim Date: Thu May 3 16:52:07 2012 New Revision: 234972 URL: http://svn.freebsd.org/changeset/base/234972 Log: Tag llvm release_31 branch r155985. Added: vendor/llvm/llvm-release_31-r155985/ - copied from r234971, vendor/llvm/dist/ From owner-svn-src-vendor@FreeBSD.ORG Thu May 3 16:54:01 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A5C27106567D; Thu, 3 May 2012 16:54:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CF268FC20; Thu, 3 May 2012 16:54:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q43Gs1Wv053002; Thu, 3 May 2012 16:54:01 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q43Gs1Ek052968; Thu, 3 May 2012 16:54:01 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205031654.q43Gs1Ek052968@svn.freebsd.org> From: Dimitry Andric Date: Thu, 3 May 2012 16:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234973 - in vendor/clang/dist: . bindings/python/clang bindings/python/tests/cindex examples/clang-interpreter include/clang/AST include/clang/Analysis include/clang/Basic include/clan... X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 16:54:01 -0000 Author: dim Date: Thu May 3 16:53:59 2012 New Revision: 234973 URL: http://svn.freebsd.org/changeset/base/234973 Log: Vendor import of clang release_31 branch r155985: http://llvm.org/svn/llvm-project/cfe/branches/release_31@155985 Added: vendor/clang/dist/lib/Sema/SemaStmtAttr.cpp vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp vendor/clang/dist/test/CodeCompletion/preamble.c vendor/clang/dist/test/CodeCompletion/some_struct.h vendor/clang/dist/test/CodeGen/arm-homogenous.c vendor/clang/dist/test/CodeGenCXX/cxx11-exception-spec.cpp vendor/clang/dist/test/CodeGenCXX/mangle-this-cxx11.cpp vendor/clang/dist/test/CodeGenOpenCL/fpmath.cl vendor/clang/dist/test/Misc/unprintable.c vendor/clang/dist/test/Misc/wnull-character.cpp (contents, props changed) vendor/clang/dist/test/Misc/wrong-encoding.c vendor/clang/dist/test/PCH/typo2.cpp vendor/clang/dist/test/Parser/cxx11-stmt-attributes.cpp vendor/clang/dist/test/Rewriter/rewrite-modern-extern-c-func-decl.mm vendor/clang/dist/test/Rewriter/rewrite-modern-protocol-1.mm vendor/clang/dist/test/Rewriter/rewrite-modern-super.mm vendor/clang/dist/test/Rewriter/rewrite-modern-typeof.mm vendor/clang/dist/test/Sema/const-eval-64.c vendor/clang/dist/test/SemaObjC/error-implicit-property.m vendor/clang/dist/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp vendor/clang/dist/test/Tooling/clang-check-args.cpp vendor/clang/dist/www/libstdc++4.7-clang11.patch Deleted: vendor/clang/dist/include/clang/Basic/DelayedCleanupPool.h vendor/clang/dist/include/clang/Index/ vendor/clang/dist/lib/Index/ vendor/clang/dist/test/CodeGenOpenCL/fpaccuracy.cl vendor/clang/dist/test/Misc/pubnames.c Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/bindings/python/clang/cindex.py vendor/clang/dist/bindings/python/tests/cindex/test_type.py vendor/clang/dist/examples/clang-interpreter/CMakeLists.txt vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclLookups.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExternalASTSource.h vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h vendor/clang/dist/include/clang/AST/Stmt.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/AST/VTableBuilder.h vendor/clang/dist/include/clang/Analysis/ProgramPoint.h vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/ConvertUTF.h vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/ExceptionSpecificationType.h vendor/clang/dist/include/clang/Basic/OnDiskHashTable.h vendor/clang/dist/include/clang/Basic/StmtNodes.td vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Basic/TokenKinds.def vendor/clang/dist/include/clang/Config/config.h.cmake vendor/clang/dist/include/clang/Config/config.h.in vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Compilation.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Frontend/FrontendOptions.h vendor/clang/dist/include/clang/Frontend/TextDiagnostic.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Sema/DeclSpec.h vendor/clang/dist/include/clang/Sema/ParsedTemplate.h vendor/clang/dist/include/clang/Sema/Scope.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Serialization/ASTBitCodes.h vendor/clang/dist/include/clang/Serialization/ASTReader.h vendor/clang/dist/include/clang/Serialization/ASTWriter.h vendor/clang/dist/include/clang/Serialization/Module.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h vendor/clang/dist/include/clang/Tooling/CompilationDatabase.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/ExternalASTSource.cpp vendor/clang/dist/lib/AST/ItaniumMangle.cpp vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/VTableBuilder.cpp vendor/clang/dist/lib/Analysis/CFG.cpp vendor/clang/dist/lib/Analysis/CMakeLists.txt vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Basic/Version.cpp vendor/clang/dist/lib/CMakeLists.txt vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenTBAA.cpp vendor/clang/dist/lib/CodeGen/CodeGenTBAA.h vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/Compilation.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/TextDiagnostic.cpp vendor/clang/dist/lib/FrontendTool/ExecuteCompilerInvocation.cpp vendor/clang/dist/lib/Headers/avx2intrin.h vendor/clang/dist/lib/Headers/avxintrin.h vendor/clang/dist/lib/Makefile vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Rewrite/RewriteModernObjC.cpp vendor/clang/dist/lib/Rewrite/RewriteRope.cpp vendor/clang/dist/lib/Sema/CMakeLists.txt vendor/clang/dist/lib/Sema/DeclSpec.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/SemaAccess.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprMember.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaPseudoObject.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTReaderInternals.h vendor/clang/dist/lib/Serialization/ASTReaderStmt.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp vendor/clang/dist/lib/Serialization/ASTWriterStmt.cpp vendor/clang/dist/lib/Serialization/Module.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/AnalysisManager.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/CoreEngine.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngine.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp vendor/clang/dist/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/Tooling/CompilationDatabase.cpp vendor/clang/dist/test/Analysis/objc-bool.m vendor/clang/dist/test/Analysis/redefined_system.c vendor/clang/dist/test/Analysis/self-init.m vendor/clang/dist/test/CXX/class/class.mem/p2.cpp vendor/clang/dist/test/CXX/except/except.spec/p1.cpp vendor/clang/dist/test/CXX/special/class.inhctor/elsewhere.cpp vendor/clang/dist/test/CXX/special/class.inhctor/p3.cpp vendor/clang/dist/test/CXX/special/class.inhctor/p7.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.variadic/p5.cpp vendor/clang/dist/test/CodeGen/avx-shuffle-builtins.c vendor/clang/dist/test/CodeGen/avx2-builtins.c vendor/clang/dist/test/CodeGen/builtins-x86.c vendor/clang/dist/test/CodeGen/may-alias.c vendor/clang/dist/test/CodeGen/packed-nest-unpacked.c vendor/clang/dist/test/CodeGen/tbaa-for-vptr.cpp vendor/clang/dist/test/CodeGenCXX/block-byref-cxx-objc.cpp vendor/clang/dist/test/CodeGenCXX/const-init-cxx11.cpp vendor/clang/dist/test/CodeGenCXX/inheriting-constructor.cpp vendor/clang/dist/test/CodeGenCXX/static-init.cpp vendor/clang/dist/test/Headers/typedef_guards.c vendor/clang/dist/test/Index/get-cursor.m vendor/clang/dist/test/Lexer/newline-eof-c++98-compat.cpp vendor/clang/dist/test/Lexer/newline-eof.c vendor/clang/dist/test/Lexer/utf-16.c vendor/clang/dist/test/Misc/message-length.c vendor/clang/dist/test/Parser/MicrosoftExtensions.cpp vendor/clang/dist/test/Parser/objcxx11-attributes.mm vendor/clang/dist/test/Preprocessor/pragma_sysheader.c vendor/clang/dist/test/Rewriter/blockcast3.mm vendor/clang/dist/test/Rewriter/instancetype-test.mm vendor/clang/dist/test/Rewriter/objc-bool-literal-check-modern.mm vendor/clang/dist/test/Rewriter/objc-bool-literal-modern.mm vendor/clang/dist/test/Rewriter/objc-modern-numeric-literal.mm vendor/clang/dist/test/Rewriter/rewrite-block-consts.mm vendor/clang/dist/test/Rewriter/rewrite-block-literal-1.mm vendor/clang/dist/test/Rewriter/rewrite-block-literal.mm vendor/clang/dist/test/Rewriter/rewrite-block-pointer.mm vendor/clang/dist/test/Rewriter/rewrite-byref-in-nested-blocks.mm vendor/clang/dist/test/Rewriter/rewrite-elaborated-type.mm vendor/clang/dist/test/Rewriter/rewrite-foreach-in-block.mm vendor/clang/dist/test/Rewriter/rewrite-modern-container-literal.mm vendor/clang/dist/test/Rewriter/rewrite-nested-blocks-1.mm vendor/clang/dist/test/Rewriter/rewrite-nested-blocks-2.mm vendor/clang/dist/test/Rewriter/rewrite-nested-blocks.mm vendor/clang/dist/test/Rewriter/rewrite-nested-property-in-blocks.mm vendor/clang/dist/test/Rewriter/rewrite-unique-block-api.mm vendor/clang/dist/test/Sema/const-eval.c vendor/clang/dist/test/Sema/surpress-deprecated.c vendor/clang/dist/test/SemaCXX/constant-expression-cxx11.cpp vendor/clang/dist/test/SemaCXX/cxx98-compat.cpp vendor/clang/dist/test/SemaCXX/dependent-noexcept-unevaluated.cpp vendor/clang/dist/test/SemaCXX/implicit-exception-spec.cpp vendor/clang/dist/test/SemaCXX/warn-everthing.cpp vendor/clang/dist/test/SemaCXX/warn-thread-safety-parsing.cpp vendor/clang/dist/test/SemaObjC/objc-literal-nsnumber.m vendor/clang/dist/test/SemaObjCXX/literals.mm vendor/clang/dist/test/SemaObjCXX/property-reference.mm vendor/clang/dist/test/SemaTemplate/default-expr-arguments.cpp vendor/clang/dist/test/SemaTemplate/dependent-names.cpp vendor/clang/dist/test/SemaTemplate/instantiate-declref.cpp vendor/clang/dist/tools/arcmt-test/Makefile vendor/clang/dist/tools/c-arcmt-test/Makefile vendor/clang/dist/tools/c-index-test/Makefile vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/clang-check/ClangCheck.cpp vendor/clang/dist/tools/driver/CMakeLists.txt vendor/clang/dist/tools/driver/Makefile vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/CMakeLists.txt vendor/clang/dist/tools/libclang/CXCursor.cpp vendor/clang/dist/tools/libclang/Makefile vendor/clang/dist/tools/scan-build/ccc-analyzer vendor/clang/dist/unittests/Frontend/Makefile vendor/clang/dist/unittests/Tooling/CompilationDatabaseTest.cpp vendor/clang/dist/www/cxx_status.html vendor/clang/dist/www/hacking.html Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/CMakeLists.txt Thu May 3 16:53:59 2012 (r234973) @@ -66,6 +66,10 @@ set(CLANG_RESOURCE_DIR "" CACHE STRING set(C_INCLUDE_DIRS "" CACHE STRING "Colon separated list of directories clang will search for headers.") +set(GCC_INSTALL_PREFIX "" CACHE PATH "Directory where gcc is installed." ) +set(DEFAULT_SYSROOT "" CACHE PATH + "Default to all compiler invocations for --sysroot=." ) + set(CLANG_VENDOR "" CACHE STRING "Vendor-specific text for showing with version information.") Modified: vendor/clang/dist/bindings/python/clang/cindex.py ============================================================================== --- vendor/clang/dist/bindings/python/clang/cindex.py Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/bindings/python/clang/cindex.py Thu May 3 16:53:59 2012 (r234973) @@ -1079,6 +1079,11 @@ class TypeKind(object): self._name_map[value] = key return self._name_map[self] + @property + def spelling(self): + """Retrieve the spelling of this TypeKind.""" + return TypeKind_spelling(self.value) + @staticmethod def from_id(id): if id >= len(TypeKind._kinds) or TypeKind._kinds[id] is None: @@ -1088,6 +1093,10 @@ class TypeKind(object): def __repr__(self): return 'TypeKind.%s' % (self.name,) +TypeKind_spelling = lib.clang_getTypeKindSpelling +TypeKind_spelling.argtypes = [c_uint] +TypeKind_spelling.restype = _CXString +TypeKind_spelling.errcheck = _CXString.from_result TypeKind.INVALID = TypeKind(0) Modified: vendor/clang/dist/bindings/python/tests/cindex/test_type.py ============================================================================== --- vendor/clang/dist/bindings/python/tests/cindex/test_type.py Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/bindings/python/tests/cindex/test_type.py Thu May 3 16:53:59 2012 (r234973) @@ -1,5 +1,4 @@ from clang.cindex import CursorKind -from clang.cindex import Index from clang.cindex import TypeKind from nose.tools import raises from .util import get_cursor @@ -109,6 +108,14 @@ def test_equal(): assert a.type != None assert a.type != 'foo' +def test_typekind_spelling(): + """Ensure TypeKind.spelling works.""" + tu = get_tu('int a;') + a = get_cursor(tu, 'a') + + assert a is not None + assert a.type.kind.spelling == 'Int' + def test_function_argument_types(): """Ensure that Type.argument_types() works as expected.""" tu = get_tu('void f(int, int);') Modified: vendor/clang/dist/examples/clang-interpreter/CMakeLists.txt ============================================================================== --- vendor/clang/dist/examples/clang-interpreter/CMakeLists.txt Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/examples/clang-interpreter/CMakeLists.txt Thu May 3 16:53:59 2012 (r234973) @@ -7,7 +7,6 @@ set(LLVM_USED_LIBS clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers clangStaticAnalyzerCore - clangIndex clangAnalysis clangRewrite clangAST Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/AST/Decl.h Thu May 3 16:53:59 2012 (r234973) @@ -64,6 +64,9 @@ public: /// \brief Return the TypeLoc wrapper for the type source info. TypeLoc getTypeLoc() const; // implemented in TypeLoc.h + + /// \brief Override the type stored in this TypeSourceInfo. Use with caution! + void overrideType(QualType T) { Ty = T; } }; /// TranslationUnitDecl - The top declaration context. @@ -242,11 +245,7 @@ public: bool visibilityExplicit() const { return explicit_; } void setLinkage(Linkage L) { linkage_ = L; } - void setVisibility(Visibility V) { visibility_ = V; } void setVisibility(Visibility V, bool E) { visibility_ = V; explicit_ = E; } - void setVisibility(LinkageInfo Other) { - setVisibility(Other.visibility(), Other.visibilityExplicit()); - } void mergeLinkage(Linkage L) { setLinkage(minLinkage(linkage(), L)); Modified: vendor/clang/dist/include/clang/AST/DeclBase.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclBase.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/AST/DeclBase.h Thu May 3 16:53:59 2012 (r234973) @@ -861,7 +861,6 @@ public: void dumpXML(raw_ostream &OS) const; private: - const Attr *getAttrsImpl() const; void setAttrsImpl(const AttrVec& Attrs, ASTContext &Ctx); void setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC, ASTContext &Ctx); Modified: vendor/clang/dist/include/clang/AST/DeclLookups.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclLookups.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/AST/DeclLookups.h Thu May 3 16:53:59 2012 (r234973) @@ -67,6 +67,8 @@ public: DeclContext::all_lookups_iterator DeclContext::lookups_begin() const { DeclContext *Primary = const_cast(this)->getPrimaryContext(); + if (hasExternalVisibleStorage()) + getParentASTContext().getExternalSource()->completeVisibleDeclsMap(Primary); if (StoredDeclsMap *Map = Primary->buildLookup()) return all_lookups_iterator(Map->begin(), Map->end()); return all_lookups_iterator(); @@ -74,6 +76,8 @@ DeclContext::all_lookups_iterator DeclCo DeclContext::all_lookups_iterator DeclContext::lookups_end() const { DeclContext *Primary = const_cast(this)->getPrimaryContext(); + if (hasExternalVisibleStorage()) + getParentASTContext().getExternalSource()->completeVisibleDeclsMap(Primary); if (StoredDeclsMap *Map = Primary->buildLookup()) return all_lookups_iterator(Map->end(), Map->end()); return all_lookups_iterator(); Modified: vendor/clang/dist/include/clang/AST/Expr.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Expr.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/AST/Expr.h Thu May 3 16:53:59 2012 (r234973) @@ -581,16 +581,6 @@ public: /// member expression. static QualType findBoundMemberType(const Expr *expr); - /// \brief Result type of CanThrow(). - enum CanThrowResult { - CT_Cannot, - CT_Dependent, - CT_Can - }; - /// \brief Test if this expression, if evaluated, might throw, according to - /// the rules of C++ [expr.unary.noexcept]. - CanThrowResult CanThrow(ASTContext &C) const; - /// IgnoreImpCasts - Skip past any implicit casts which might /// surround this expression. Only skips ImplicitCastExprs. Expr *IgnoreImpCasts() LLVM_READONLY; @@ -3608,6 +3598,10 @@ public: return LBraceLoc.isValid() && RBraceLoc.isValid(); } + // Is this an initializer for an array of characters, initialized by a string + // literal or an @encode? + bool isStringLiteralInit() const; + SourceLocation getLBraceLoc() const { return LBraceLoc; } void setLBraceLoc(SourceLocation Loc) { LBraceLoc = Loc; } SourceLocation getRBraceLoc() const { return RBraceLoc; } Modified: vendor/clang/dist/include/clang/AST/ExternalASTSource.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ExternalASTSource.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/AST/ExternalASTSource.h Thu May 3 16:53:59 2012 (r234973) @@ -126,6 +126,12 @@ public: virtual DeclContextLookupResult FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name); + /// \brief Ensures that the table of all visible declarations inside this + /// context is up to date. + /// + /// The default implementation of this functino is a no-op. + virtual void completeVisibleDeclsMap(const DeclContext *DC); + /// \brief Finds all declarations lexically contained within the given /// DeclContext, after applying an optional filter predicate. /// Modified: vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h ============================================================================== --- vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h Thu May 3 16:53:59 2012 (r234973) @@ -1870,6 +1870,7 @@ DEF_TRAVERSE_STMT(GotoStmt, { }) DEF_TRAVERSE_STMT(IfStmt, { }) DEF_TRAVERSE_STMT(IndirectGotoStmt, { }) DEF_TRAVERSE_STMT(LabelStmt, { }) +DEF_TRAVERSE_STMT(AttributedStmt, { }) DEF_TRAVERSE_STMT(NullStmt, { }) DEF_TRAVERSE_STMT(ObjCAtCatchStmt, { }) DEF_TRAVERSE_STMT(ObjCAtFinallyStmt, { }) Modified: vendor/clang/dist/include/clang/AST/Stmt.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Stmt.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/AST/Stmt.h Thu May 3 16:53:59 2012 (r234973) @@ -20,6 +20,7 @@ #include "clang/AST/StmtIterator.h" #include "clang/AST/DeclGroup.h" #include "clang/AST/ASTContext.h" +#include "clang/AST/Attr.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/raw_ostream.h" @@ -794,6 +795,47 @@ public: }; +/// \brief Represents an attribute applied to a statement. +/// +/// Represents an attribute applied to a statement. For example: +/// [[omp::for(...)]] for (...) { ... } +/// +class AttributedStmt : public Stmt { + Stmt *SubStmt; + SourceLocation AttrLoc; + AttrVec Attrs; + // TODO: It can be done as Attr *Attrs[1]; and variable size array as in + // StringLiteral + + friend class ASTStmtReader; + +public: + AttributedStmt(SourceLocation loc, const AttrVec &attrs, Stmt *substmt) + : Stmt(AttributedStmtClass), SubStmt(substmt), AttrLoc(loc), Attrs(attrs) { + } + + // \brief Build an empty attributed statement. + explicit AttributedStmt(EmptyShell Empty) + : Stmt(AttributedStmtClass, Empty) { + } + + SourceLocation getAttrLoc() const { return AttrLoc; } + const AttrVec &getAttrs() const { return Attrs; } + Stmt *getSubStmt() { return SubStmt; } + const Stmt *getSubStmt() const { return SubStmt; } + + SourceRange getSourceRange() const LLVM_READONLY { + return SourceRange(AttrLoc, SubStmt->getLocEnd()); + } + child_range children() { return child_range(&SubStmt, &SubStmt + 1); } + + static bool classof(const Stmt *T) { + return T->getStmtClass() == AttributedStmtClass; + } + static bool classof(const AttributedStmt *) { return true; } +}; + + /// IfStmt - This represents an if/then/else. /// class IfStmt : public Stmt { Modified: vendor/clang/dist/include/clang/AST/Type.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Type.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/AST/Type.h Thu May 3 16:53:59 2012 (r234973) @@ -79,6 +79,7 @@ namespace clang { class CXXRecordDecl; class EnumDecl; class FieldDecl; + class FunctionDecl; class ObjCInterfaceDecl; class ObjCProtocolDecl; class ObjCMethodDecl; @@ -2700,7 +2701,9 @@ public: ExtProtoInfo() : Variadic(false), HasTrailingReturn(false), TypeQuals(0), ExceptionSpecType(EST_None), RefQualifier(RQ_None), - NumExceptions(0), Exceptions(0), NoexceptExpr(0), ConsumedArguments(0) {} + NumExceptions(0), Exceptions(0), NoexceptExpr(0), + ExceptionSpecDecl(0), ExceptionSpecTemplate(0), + ConsumedArguments(0) {} FunctionType::ExtInfo ExtInfo; bool Variadic : 1; @@ -2711,6 +2714,8 @@ public: unsigned NumExceptions; const QualType *Exceptions; Expr *NoexceptExpr; + FunctionDecl *ExceptionSpecDecl; + FunctionDecl *ExceptionSpecTemplate; const bool *ConsumedArguments; }; @@ -2756,6 +2761,11 @@ private: // NoexceptExpr - Instead of Exceptions, there may be a single Expr* pointing // to the expression in the noexcept() specifier. + // ExceptionSpecDecl, ExceptionSpecTemplate - Instead of Exceptions, there may + // be a pair of FunctionDecl* pointing to the function which should be used to + // instantiate this function type's exception specification, and the function + // from which it should be instantiated. + // ConsumedArgs - A variable size array, following Exceptions // and of length NumArgs, holding flags indicating which arguments // are consumed. This only appears if HasAnyConsumedArgs is true. @@ -2795,6 +2805,9 @@ public: EPI.Exceptions = exception_begin(); } else if (EPI.ExceptionSpecType == EST_ComputedNoexcept) { EPI.NoexceptExpr = getNoexceptExpr(); + } else if (EPI.ExceptionSpecType == EST_Uninstantiated) { + EPI.ExceptionSpecDecl = getExceptionSpecDecl(); + EPI.ExceptionSpecTemplate = getExceptionSpecTemplate(); } if (hasAnyConsumedArgs()) EPI.ConsumedArguments = getConsumedArgsBuffer(); @@ -2838,9 +2851,26 @@ public: // NoexceptExpr sits where the arguments end. return *reinterpret_cast(arg_type_end()); } + /// \brief If this function type has an uninstantiated exception + /// specification, this is the function whose exception specification + /// is represented by this type. + FunctionDecl *getExceptionSpecDecl() const { + if (getExceptionSpecType() != EST_Uninstantiated) + return 0; + return reinterpret_cast(arg_type_end())[0]; + } + /// \brief If this function type has an uninstantiated exception + /// specification, this is the function whose exception specification + /// should be instantiated to find the exception specification for + /// this type. + FunctionDecl *getExceptionSpecTemplate() const { + if (getExceptionSpecType() != EST_Uninstantiated) + return 0; + return reinterpret_cast(arg_type_end())[1]; + } bool isNothrow(ASTContext &Ctx) const { ExceptionSpecificationType EST = getExceptionSpecType(); - assert(EST != EST_Delayed); + assert(EST != EST_Delayed && EST != EST_Uninstantiated); if (EST == EST_DynamicNone || EST == EST_BasicNoexcept) return true; if (EST != EST_ComputedNoexcept) Modified: vendor/clang/dist/include/clang/AST/VTableBuilder.h ============================================================================== --- vendor/clang/dist/include/clang/AST/VTableBuilder.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/AST/VTableBuilder.h Thu May 3 16:53:59 2012 (r234973) @@ -205,11 +205,11 @@ public: typedef llvm::DenseMap AddressPointsMapTy; private: uint64_t NumVTableComponents; - VTableComponent *VTableComponents; + llvm::OwningArrayPtr VTableComponents; /// VTableThunks - Contains thunks needed by vtables. uint64_t NumVTableThunks; - VTableThunkTy *VTableThunks; + llvm::OwningArrayPtr VTableThunks; /// Address points - Address points for all vtables. AddressPointsMapTy AddressPoints; @@ -227,11 +227,11 @@ public: } vtable_component_iterator vtable_component_begin() const { - return VTableComponents; + return VTableComponents.get(); } vtable_component_iterator vtable_component_end() const { - return VTableComponents+NumVTableComponents; + return VTableComponents.get()+NumVTableComponents; } uint64_t getNumVTableThunks() const { @@ -239,11 +239,11 @@ public: } vtable_thunk_iterator vtable_thunk_begin() const { - return VTableThunks; + return VTableThunks.get(); } vtable_thunk_iterator vtable_thunk_end() const { - return VTableThunks+NumVTableThunks; + return VTableThunks.get()+NumVTableThunks; } uint64_t getAddressPoint(BaseSubobject Base) const { Modified: vendor/clang/dist/include/clang/Analysis/ProgramPoint.h ============================================================================== --- vendor/clang/dist/include/clang/Analysis/ProgramPoint.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Analysis/ProgramPoint.h Thu May 3 16:53:59 2012 (r234973) @@ -129,7 +129,7 @@ public: static bool classof(const ProgramPoint*) { return true; } bool operator==(const ProgramPoint & RHS) const { - return Data1 == Data1 && + return Data1 == RHS.Data1 && Data2 == RHS.Data2 && L == RHS.L && Tag == RHS.Tag; Modified: vendor/clang/dist/include/clang/Basic/BuiltinsX86.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/BuiltinsX86.def Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Basic/BuiltinsX86.def Thu May 3 16:53:59 2012 (r234973) @@ -412,6 +412,9 @@ BUILTIN(__builtin_ia32_cvtps2pd256, "V4d BUILTIN(__builtin_ia32_cvttpd2dq256, "V4iV4d", "") BUILTIN(__builtin_ia32_cvtpd2dq256, "V4iV4d", "") BUILTIN(__builtin_ia32_cvttps2dq256, "V8iV8f", "") +BUILTIN(__builtin_ia32_vperm2f128_pd256, "V4dV4dV4dIc", "") +BUILTIN(__builtin_ia32_vperm2f128_ps256, "V8fV8fV8fIc", "") +BUILTIN(__builtin_ia32_vperm2f128_si256, "V8iV8iV8iIc", "") BUILTIN(__builtin_ia32_vinsertf128_pd256, "V4dV4dV2dIc", "") BUILTIN(__builtin_ia32_vinsertf128_ps256, "V8fV8fV4fIc", "") BUILTIN(__builtin_ia32_vinsertf128_si256, "V8iV8iV4iIc", "") @@ -560,9 +563,8 @@ BUILTIN(__builtin_ia32_pbroadcastw128, " BUILTIN(__builtin_ia32_pbroadcastd128, "V4iV4i", "") BUILTIN(__builtin_ia32_pbroadcastq128, "V2LLiV2LLi", "") BUILTIN(__builtin_ia32_permvarsi256, "V8iV8iV8i", "") -BUILTIN(__builtin_ia32_permdf256, "V4dV4dIc", "") BUILTIN(__builtin_ia32_permvarsf256, "V8fV8fV8f", "") -BUILTIN(__builtin_ia32_permdi256, "V4LLiV4LLiIc", "") +BUILTIN(__builtin_ia32_permti256, "V4LLiV4LLiV4LLiIc", "") BUILTIN(__builtin_ia32_extract128i256, "V2LLiV4LLiIc", "") BUILTIN(__builtin_ia32_insert128i256, "V4LLiV4LLiV2LLiIc", "") BUILTIN(__builtin_ia32_maskloadd256, "V8iV8iC*V8i", "") Modified: vendor/clang/dist/include/clang/Basic/ConvertUTF.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/ConvertUTF.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Basic/ConvertUTF.h Thu May 3 16:53:59 2012 (r234973) @@ -151,9 +151,9 @@ ConversionResult ConvertUTF16toUTF32 ( ConversionResult ConvertUTF32toUTF16 ( const UTF32** sourceStart, const UTF32* sourceEnd, UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); +#endif Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd); -#endif Boolean isLegalUTF8String(const UTF8 *source, const UTF8 *sourceEnd); Modified: vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Thu May 3 16:53:59 2012 (r234973) @@ -410,6 +410,8 @@ def ext_ellipsis_exception_spec : Extens "exception specification of '...' is a Microsoft extension">; def err_dynamic_and_noexcept_specification : Error< "cannot have both throw() and noexcept() clause on the same function">; +def err_except_spec_unparsed : Error< + "unexpected end of exception specification">; def warn_cxx98_compat_noexcept_decl : Warning< "noexcept specifications are incompatible with C++98">, InGroup, DefaultIgnore; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu May 3 16:53:59 2012 (r234973) @@ -231,9 +231,13 @@ def err_using_decl_can_not_refer_to_name "using declaration can not refer to namespace">; def err_using_decl_constructor : Error< "using declaration can not refer to a constructor">; -def warn_cxx98_compat_using_decl_constructor : Warning< - "inherited constructors are incompatible with C++98">, - InGroup, DefaultIgnore; +def err_using_decl_constructor_unsupported : Error< + "inheriting constructors are not supported">; +// FIXME: Replace the above error with this warning if support for +// inheriting constructors is implemented. +//def warn_cxx98_compat_using_decl_constructor : Warning< +// "inheriting constructors are incompatible with C++98">, +// InGroup, DefaultIgnore; def err_using_decl_destructor : Error< "using declaration can not refer to a destructor">; def err_using_decl_template_id : Error< @@ -1547,9 +1551,6 @@ def warn_objc_redundant_literal_use : Wa "using %0 with a literal is redundant">, InGroup; } -def warn_bool_for_boolean_literal : Warning< - "BOOL of type %0 is non-intergal and unsuitable for a " - "boolean literal - ignored">, InGroup>; def err_only_annotate_after_access_spec : Error< "access specifier can only have annotation attributes">; def err_attribute_section_invalid_for_target : Error< @@ -1563,6 +1564,9 @@ def warn_redeclaration_without_attribute def warn_attribute_ignored : Warning<"%0 attribute ignored">; def warn_unknown_attribute_ignored : Warning< "unknown attribute %0 ignored">, InGroup; +def warn_attribute_invalid_on_stmt : Warning< + "attribute %0 cannot be specified on a statement">, + InGroup; def warn_declspec_attribute_ignored : Warning< "attribute %0 is ignored, place it after \"%select{class|struct|union|enum}1\" to apply attribute to type declaration">, InGroup; def warn_attribute_precede_definition : Warning< @@ -2583,6 +2587,8 @@ def note_template_enum_def_here : Note< "in instantiation of enumeration %q0 requested here">; def note_template_type_alias_instantiation_here : Note< "in instantiation of template type alias %0 requested here">; +def note_template_exception_spec_instantiation_here : Note< + "in instantiation of exception specification for %0 requested here">; def note_default_arg_instantiation_here : Note< "in instantiation of default argument for '%0' required here">; @@ -3798,6 +3804,9 @@ def warn_null_in_comparison_operation : def err_invalid_this_use : Error< "invalid use of 'this' outside of a non-static member function">; +def err_this_static_member_func : Error< + "'this' cannot be%select{| implicitly}0 used in a static member function " + "declaration">; def err_invalid_member_use_in_static_method : Error< "invalid use of member %0 in static member function">; def err_invalid_qualified_function_type : Error< @@ -3907,7 +3916,7 @@ def err_nosetter_property_incdec : Error def err_nogetter_property_compound_assignment : Error< "a getter method is needed to perform a compound assignment on a property">; def err_nogetter_property_incdec : Error< - "no getter method %1 for %select{increment|decrement} of property">; + "no getter method %1 for %select{increment|decrement}0 of property">; def error_no_subobject_property_setting : Error< "expression is not assignable">; def err_qualified_objc_access : Error< Modified: vendor/clang/dist/include/clang/Basic/ExceptionSpecificationType.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/ExceptionSpecificationType.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Basic/ExceptionSpecificationType.h Thu May 3 16:53:59 2012 (r234973) @@ -16,7 +16,7 @@ namespace clang { -/// \brief The various types of exception specifications that exist in C++0x. +/// \brief The various types of exception specifications that exist in C++11. enum ExceptionSpecificationType { EST_None, ///< no exception specification EST_DynamicNone, ///< throw() @@ -24,7 +24,8 @@ enum ExceptionSpecificationType { EST_MSAny, ///< Microsoft throw(...) extension EST_BasicNoexcept, ///< noexcept EST_ComputedNoexcept, ///< noexcept(expression) - EST_Delayed ///< not known yet + EST_Delayed, ///< not known yet + EST_Uninstantiated ///< not instantiated yet }; inline bool isDynamicExceptionSpec(ExceptionSpecificationType ESpecType) { @@ -35,6 +36,19 @@ inline bool isNoexceptExceptionSpec(Exce return ESpecType == EST_BasicNoexcept || ESpecType == EST_ComputedNoexcept; } +/// \brief Possible results from evaluation of a noexcept expression. +enum CanThrowResult { + CT_Cannot, + CT_Dependent, + CT_Can +}; + +inline CanThrowResult mergeCanThrow(CanThrowResult CT1, CanThrowResult CT2) { + // CanThrowResult constants are ordered so that the maximum is the correct + // merge result. + return CT1 > CT2 ? CT1 : CT2; +} + } // end namespace clang #endif // LLVM_CLANG_BASIC_EXCEPTIONSPECIFICATIONTYPE_H Modified: vendor/clang/dist/include/clang/Basic/OnDiskHashTable.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/OnDiskHashTable.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Basic/OnDiskHashTable.h Thu May 3 16:53:59 2012 (r234973) @@ -132,7 +132,7 @@ class OnDiskChainedHashTableGenerator { class Bucket { public: io::Offset off; - Item* head; + Item* head; unsigned length; Bucket() {} @@ -201,6 +201,7 @@ public: // Write out the number of items in the bucket. Emit16(out, B.length); + assert(B.length != 0 && "Bucket has a head but zero length?"); // Write out the entries in the bucket. for (Item *I = B.head; I ; I = I->next) { @@ -398,31 +399,30 @@ public: } key_iterator key_end() { return key_iterator(); } - /// \brief Iterates over all the entries in the table, returning - /// a key/data pair. - class item_iterator { + /// \brief Iterates over all the entries in the table, returning the data. + class data_iterator { const unsigned char* Ptr; unsigned NumItemsInBucketLeft; unsigned NumEntriesLeft; Info *InfoObj; public: - typedef std::pair value_type; + typedef data_type value_type; - item_iterator(const unsigned char* const Ptr, unsigned NumEntries, + data_iterator(const unsigned char* const Ptr, unsigned NumEntries, Info *InfoObj) : Ptr(Ptr), NumItemsInBucketLeft(0), NumEntriesLeft(NumEntries), InfoObj(InfoObj) { } - item_iterator() + data_iterator() : Ptr(0), NumItemsInBucketLeft(0), NumEntriesLeft(0), InfoObj(0) { } - bool operator==(const item_iterator& X) const { + bool operator==(const data_iterator& X) const { return X.NumEntriesLeft == NumEntriesLeft; } - bool operator!=(const item_iterator& X) const { + bool operator!=(const data_iterator& X) const { return X.NumEntriesLeft != NumEntriesLeft; } - item_iterator& operator++() { // Preincrement + data_iterator& operator++() { // Preincrement if (!NumItemsInBucketLeft) { // 'Items' starts with a 16-bit unsigned integer representing the // number of items in this bucket. @@ -438,8 +438,8 @@ public: --NumEntriesLeft; return *this; } - item_iterator operator++(int) { // Postincrement - item_iterator tmp = *this; ++*this; return tmp; + data_iterator operator++(int) { // Postincrement + data_iterator tmp = *this; ++*this; return tmp; } value_type operator*() const { @@ -454,15 +454,14 @@ public: // Read the key. const internal_key_type& Key = InfoObj->ReadKey(LocalPtr, L.first); - return std::make_pair(InfoObj->GetExternalKey(Key), - InfoObj->ReadData(Key, LocalPtr + L.first, L.second)); + return InfoObj->ReadData(Key, LocalPtr + L.first, L.second); } }; - item_iterator item_begin() { - return item_iterator(Base + 4, getNumEntries(), &InfoObj); + data_iterator data_begin() { + return data_iterator(Base + 4, getNumEntries(), &InfoObj); } - item_iterator item_end() { return item_iterator(); } + data_iterator data_end() { return data_iterator(); } Info &getInfoObj() { return InfoObj; } Modified: vendor/clang/dist/include/clang/Basic/StmtNodes.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/StmtNodes.td Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Basic/StmtNodes.td Thu May 3 16:53:59 2012 (r234973) @@ -12,6 +12,7 @@ class DStmt def NullStmt : Stmt; def CompoundStmt : Stmt; def LabelStmt : Stmt; +def AttributedStmt : Stmt; def IfStmt : Stmt; def SwitchStmt : Stmt; def WhileStmt : Stmt; Modified: vendor/clang/dist/include/clang/Basic/TargetInfo.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/TargetInfo.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Basic/TargetInfo.h Thu May 3 16:53:59 2012 (r234973) @@ -132,6 +132,11 @@ protected: IntType SizeType, IntMaxType, UIntMaxType, PtrDiffType, IntPtrType, WCharType, WIntType, Char16Type, Char32Type, Int64Type, SigAtomicType; + /// Flag whether the Objective-C built-in boolean type should be signed char. + /// Otherwise, when this flag is not set, the normal built-in boolean type is + /// used. + unsigned UseSignedCharForObjCBool : 1; + /// Control whether the alignment of bit-field types is respected when laying /// out structures. If true, then the alignment of the bit-field type will be /// used to (a) impact the alignment of the containing structure, and (b) @@ -299,6 +304,16 @@ public: return MCountName; } + /// useSignedCharForObjCBool - Check if the Objective-C built-in boolean + /// type should be signed char. Otherwise, if this returns false, the + /// normal built-in boolean type should also be used for Objective-C. + bool useSignedCharForObjCBool() const { + return UseSignedCharForObjCBool; + } + void noSignedCharForObjCBool() { + UseSignedCharForObjCBool = false; + } + /// useBitFieldTypeAlignment() - Check whether the alignment of bit-field /// types is respected when laying out structures. bool useBitFieldTypeAlignment() const { Modified: vendor/clang/dist/include/clang/Basic/TokenKinds.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/TokenKinds.def Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Basic/TokenKinds.def Thu May 3 16:53:59 2012 (r234973) @@ -105,6 +105,7 @@ TOK(eod) // End of prepr // directive). TOK(code_completion) // Code completion marker TOK(cxx_defaultarg_end) // C++ default argument end marker +TOK(cxx_exceptspec_end) // C++ exception-specification end marker // C99 6.4.9: Comments. TOK(comment) // Comment (only in -E -C[C] mode) Modified: vendor/clang/dist/include/clang/Config/config.h.cmake ============================================================================== --- vendor/clang/dist/include/clang/Config/config.h.cmake Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Config/config.h.cmake Thu May 3 16:53:59 2012 (r234973) @@ -4,8 +4,11 @@ /* Relative directory for resource files */ #define CLANG_RESOURCE_DIR "${CLANG_RESOURCE_DIR}" -/* Directory where gcc is installed. */ -#define GCC_INSTALL_PREFIX "${GCC_INSTALL_PREFIX}" - /* Directories clang will search for headers */ #define C_INCLUDE_DIRS "${C_INCLUDE_DIRS}" + +/* Default to all compiler invocations for --sysroot=. */ +#define DEFAULT_SYSROOT "${DEFAULT_SYSROOT}" + +/* Directory where gcc is installed. */ +#define GCC_INSTALL_PREFIX "${GCC_INSTALL_PREFIX}" Modified: vendor/clang/dist/include/clang/Config/config.h.in ============================================================================== --- vendor/clang/dist/include/clang/Config/config.h.in Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Config/config.h.in Thu May 3 16:53:59 2012 (r234973) @@ -9,13 +9,16 @@ /* Relative directory for resource files */ #undef CLANG_RESOURCE_DIR -/* Directory where gcc is installed. */ -#undef GCC_INSTALL_PREFIX - /* Directories clang will search for headers */ #undef C_INCLUDE_DIRS /* Linker version detected at compile time. */ #undef HOST_LINK_VERSION +/* Default to all compiler invocations for --sysroot=. */ +#undef DEFAULT_SYSROOT + +/* Directory where gcc is installed. */ +#undef GCC_INSTALL_PREFIX + #endif Modified: vendor/clang/dist/include/clang/Driver/CC1Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/CC1Options.td Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Driver/CC1Options.td Thu May 3 16:53:59 2012 (r234973) @@ -428,9 +428,6 @@ def ast_view : Flag<"-ast-view">, HelpText<"Build ASTs and view them with GraphViz">; def print_decl_contexts : Flag<"-print-decl-contexts">, HelpText<"Print DeclContexts and their Decls">; -def pubnames_dump : Flag<"-pubnames-dump">, - HelpText<"Print all of the public (global) names in the source, e.g., the " - "names of all global declarations and macros">; def emit_module : Flag<"-emit-module">, HelpText<"Generate pre-compiled module file from a module map">; def emit_pth : Flag<"-emit-pth">, Modified: vendor/clang/dist/include/clang/Driver/Compilation.h ============================================================================== --- vendor/clang/dist/include/clang/Driver/Compilation.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Driver/Compilation.h Thu May 3 16:53:59 2012 (r234973) @@ -92,6 +92,9 @@ public: return FailureResultFiles; } + /// Returns the sysroot path. + StringRef getSysRoot() const; + /// getArgsForToolChain - Return the derived argument list for the /// tool chain \arg TC (or the default tool chain, if TC is not /// specified). Modified: vendor/clang/dist/include/clang/Frontend/ASTUnit.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/ASTUnit.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Frontend/ASTUnit.h Thu May 3 16:53:59 2012 (r234973) @@ -14,7 +14,6 @@ #ifndef LLVM_CLANG_FRONTEND_ASTUNIT_H #define LLVM_CLANG_FRONTEND_ASTUNIT_H -#include "clang/Index/ASTLocation.h" #include "clang/Serialization/ASTBitCodes.h" #include "clang/Sema/Sema.h" #include "clang/Sema/CodeCompleteConsumer.h" @@ -57,8 +56,6 @@ class SourceManager; class TargetInfo; class ASTFrontendAction; -using namespace idx; - /// \brief Utility class for loading a ASTContext from an AST file. /// class ASTUnit : public ModuleLoader { @@ -134,9 +131,6 @@ private: /// The name of the original source file used to generate this ASTUnit. std::string OriginalSourceFile; - // Critical optimization when using clang_getCursor(). - ASTLocation LastLoc; - /// \brief The set of diagnostics produced when creating the preamble. SmallVector PreambleDiagnostics; @@ -474,10 +468,6 @@ public: bool getOwnsRemappedFileBuffers() const { return OwnsRemappedFileBuffers; } void setOwnsRemappedFileBuffers(bool val) { OwnsRemappedFileBuffers = val; } - void setLastASTLocation(ASTLocation ALoc) { LastLoc = ALoc; } - ASTLocation getLastASTLocation() const { return LastLoc; } - - StringRef getMainFileName() const; typedef std::vector::iterator top_level_iterator; Modified: vendor/clang/dist/include/clang/Frontend/FrontendActions.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/FrontendActions.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Frontend/FrontendActions.h Thu May 3 16:53:59 2012 (r234973) @@ -173,15 +173,6 @@ protected: virtual bool usesPreprocessorOnly() const { return true; } }; -class PubnamesDumpAction : public ASTFrontendAction { -protected: - virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, - StringRef InFile); - -public: - virtual bool hasCodeCompletionSupport() const { return false; } -}; - //===----------------------------------------------------------------------===// // Preprocessor Actions //===----------------------------------------------------------------------===// Modified: vendor/clang/dist/include/clang/Frontend/FrontendOptions.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/FrontendOptions.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Frontend/FrontendOptions.h Thu May 3 16:53:59 2012 (r234973) @@ -42,7 +42,6 @@ namespace frontend { PrintDeclContext, ///< Print DeclContext and their Decls. PrintPreamble, ///< Print the "preamble" of the input file PrintPreprocessedInput, ///< -E mode. - PubnamesDump, ///< Print all of the "public" names in the source. RewriteMacros, ///< Expand macros but not #includes. RewriteObjC, ///< ObjC->C Rewriter. RewriteTest, ///< Rewriter playground Modified: vendor/clang/dist/include/clang/Frontend/TextDiagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/TextDiagnostic.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Frontend/TextDiagnostic.h Thu May 3 16:53:59 2012 (r234973) @@ -18,6 +18,8 @@ #include "clang/Frontend/DiagnosticRenderer.h" +struct SourceColumnMap; + namespace clang { /// \brief Class to encapsulate the logic for formatting and printing a textual @@ -103,15 +105,16 @@ private: SmallVectorImpl& Ranges, ArrayRef Hints); + void emitSnippet(StringRef SourceLine); + void highlightRange(const CharSourceRange &R, unsigned LineNo, FileID FID, - const std::string &SourceLine, + const SourceColumnMap &map, std::string &CaretLine); + std::string buildFixItInsertionLine(unsigned LineNo, - const char *LineStart, - const char *LineEnd, + const SourceColumnMap &map, ArrayRef Hints); - void expandTabs(std::string &SourceLine, std::string &CaretLine); void emitParseableFixits(ArrayRef Hints); }; Modified: vendor/clang/dist/include/clang/Parse/Parser.h ============================================================================== --- vendor/clang/dist/include/clang/Parse/Parser.h Thu May 3 16:52:07 2012 (r234972) +++ vendor/clang/dist/include/clang/Parse/Parser.h Thu May 3 16:53:59 2012 (r234973) @@ -15,7 +15,6 @@ #define LLVM_CLANG_PARSE_PARSER_H #include "clang/Basic/Specifiers.h" -#include "clang/Basic/DelayedCleanupPool.h" #include "clang/Lex/Preprocessor.h" #include "clang/Lex/CodeCompletionHandler.h" #include "clang/Sema/Sema.h" @@ -192,9 +191,9 @@ class Parser : public CodeCompletionHand /// Factory object for creating AttributeList objects. AttributeFactory AttrFactory; - /// \brief Gathers and cleans up objects when parsing of a top-level - /// declaration is finished. - DelayedCleanupPool TopLevelDeclCleanupPool; + /// \brief Gathers and cleans up TemplateIdAnnotations when parsing of a + /// top-level declaration is finished. + SmallVector TemplateIds; IdentifierInfo *getSEHExceptKeyword(); @@ -568,9 +567,7 @@ private: const char *&PrevSpec, unsigned &DiagID, bool &isInvalid); - /// \brief Get the TemplateIdAnnotation from the token and put it in the - /// cleanup pool so that it gets destroyed when parsing the current top level - /// declaration is finished. + /// \brief Get the TemplateIdAnnotation from the token. TemplateIdAnnotation *takeTemplateIdAnnotation(const Token &tok); /// TentativeParsingAction - An object that is used as a kind of "tentative @@ -858,7 +855,7 @@ private: /// argument (C++ [class.mem]p2). struct LateParsedMethodDeclaration : public LateParsedDeclaration { explicit LateParsedMethodDeclaration(Parser *P, Decl *M) - : Self(P), Method(M), TemplateScope(false) { } + : Self(P), Method(M), TemplateScope(false), ExceptionSpecTokens(0) { } virtual void ParseLexedMethodDeclarations(); @@ -878,6 +875,10 @@ private: /// method will be stored so that they can be reintroduced into /// scope at the appropriate times. SmallVector DefaultArgs; + + /// \brief The set of tokens that make up an exception-specification that + /// has not yet been parsed. + CachedTokens *ExceptionSpecTokens; }; /// LateParsedMemberInitializer - An initializer for a non-static class data @@ -1420,11 +1421,13 @@ private: // C++ 15: C++ Throw Expression ExprResult ParseThrowExpression(); - ExceptionSpecificationType MaybeParseExceptionSpecification( + ExceptionSpecificationType tryParseExceptionSpecification( + bool Delayed, SourceRange &SpecificationRange, SmallVectorImpl &DynamicExceptions, SmallVectorImpl &DynamicExceptionRanges, - ExprResult &NoexceptExpr); + ExprResult &NoexceptExpr, + CachedTokens *&ExceptionSpecTokens); // EndLoc is filled with the location of the last token of the specification. ExceptionSpecificationType ParseDynamicExceptionSpecification( @@ -1517,42 +1520,40 @@ private: //===--------------------------------------------------------------------===// // C99 6.8: Statements and Blocks. - StmtResult ParseStatement(SourceLocation *TrailingElseLoc = NULL) { + StmtResult ParseStatement(SourceLocation *TrailingElseLoc = 0) { StmtVector Stmts(Actions); return ParseStatementOrDeclaration(Stmts, true, TrailingElseLoc); } - StmtResult ParseStatementOrDeclaration(StmtVector& Stmts, + StmtResult ParseStatementOrDeclaration(StmtVector &Stmts, + bool OnlyStatement, + SourceLocation *TrailingElseLoc = 0); + StmtResult ParseStatementOrDeclarationAfterAttributes( + StmtVector &Stmts, bool OnlyStatement, - SourceLocation *TrailingElseLoc = NULL); - StmtResult ParseExprStatement(ParsedAttributes &Attrs); - StmtResult ParseLabeledStatement(ParsedAttributes &Attr); - StmtResult ParseCaseStatement(ParsedAttributes &Attr, - bool MissingCase = false, + SourceLocation *TrailingElseLoc, + ParsedAttributesWithRange &Attrs); + StmtResult ParseExprStatement(); + StmtResult ParseLabeledStatement(ParsedAttributesWithRange &attrs); + StmtResult ParseCaseStatement(bool MissingCase = false, ExprResult Expr = ExprResult()); - StmtResult ParseDefaultStatement(ParsedAttributes &Attr); - StmtResult ParseCompoundStatement(ParsedAttributes &Attr, - bool isStmtExpr = false); - StmtResult ParseCompoundStatement(ParsedAttributes &Attr, - bool isStmtExpr, + StmtResult ParseDefaultStatement(); + StmtResult ParseCompoundStatement(bool isStmtExpr = false); + StmtResult ParseCompoundStatement(bool isStmtExpr, unsigned ScopeFlags); StmtResult ParseCompoundStatementBody(bool isStmtExpr = false); bool ParseParenExprOrCondition(ExprResult &ExprResult, Decl *&DeclResult, SourceLocation Loc, bool ConvertToBoolean); - StmtResult ParseIfStatement(ParsedAttributes &Attr, - SourceLocation *TrailingElseLoc); - StmtResult ParseSwitchStatement(ParsedAttributes &Attr, - SourceLocation *TrailingElseLoc); - StmtResult ParseWhileStatement(ParsedAttributes &Attr, - SourceLocation *TrailingElseLoc); - StmtResult ParseDoStatement(ParsedAttributes &Attr); - StmtResult ParseForStatement(ParsedAttributes &Attr, - SourceLocation *TrailingElseLoc); - StmtResult ParseGotoStatement(ParsedAttributes &Attr); - StmtResult ParseContinueStatement(ParsedAttributes &Attr); - StmtResult ParseBreakStatement(ParsedAttributes &Attr); - StmtResult ParseReturnStatement(ParsedAttributes &Attr); + StmtResult ParseIfStatement(SourceLocation *TrailingElseLoc); + StmtResult ParseSwitchStatement(SourceLocation *TrailingElseLoc); + StmtResult ParseWhileStatement(SourceLocation *TrailingElseLoc); + StmtResult ParseDoStatement(); + StmtResult ParseForStatement(SourceLocation *TrailingElseLoc); + StmtResult ParseGotoStatement(); + StmtResult ParseContinueStatement(); + StmtResult ParseBreakStatement(); + StmtResult ParseReturnStatement(); StmtResult ParseAsmStatement(bool &msAsm); StmtResult ParseMicrosoftAsmStatement(SourceLocation AsmLoc); @@ -1586,7 +1587,7 @@ private: /// \brief The behavior of this __if_exists or __if_not_exists block /// should. IfExistsBehavior Behavior; -}; + }; bool ParseMicrosoftIfExistsCondition(IfExistsCondition& Result); void ParseMicrosoftIfExistsStatement(StmtVector &Stmts); @@ -1602,14 +1603,14 @@ private: //===--------------------------------------------------------------------===// // C++ 6: Statements and Blocks - StmtResult ParseCXXTryBlock(ParsedAttributes &Attr); + StmtResult ParseCXXTryBlock(); StmtResult ParseCXXTryBlockCommon(SourceLocation TryLoc); StmtResult ParseCXXCatchBlock(); //===--------------------------------------------------------------------===// // MS: SEH Statements and Blocks - StmtResult ParseSEHTryBlock(ParsedAttributes &Attr); + StmtResult ParseSEHTryBlock(); StmtResult ParseSEHTryBlockCommon(SourceLocation Loc); StmtResult ParseSEHExceptBlock(SourceLocation Loc); StmtResult ParseSEHFinallyBlock(SourceLocation Loc); @@ -1883,6 +1884,7 @@ private: void ProhibitAttributes(ParsedAttributesWithRange &attrs) { if (!attrs.Range.isValid()) return; DiagnoseProhibitedAttributes(attrs); + attrs.clear(); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Thu May 3 16:54:33 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1D0D0106573B; Thu, 3 May 2012 16:54:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1A7A8FC14; Thu, 3 May 2012 16:54:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q43GsWqI053053; Thu, 3 May 2012 16:54:32 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q43GsWTr053052; Thu, 3 May 2012 16:54:32 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205031654.q43GsWTr053052@svn.freebsd.org> From: Dimitry Andric Date: Thu, 3 May 2012 16:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234974 - vendor/clang/clang-release_31-r155985 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 16:54:33 -0000 Author: dim Date: Thu May 3 16:54:32 2012 New Revision: 234974 URL: http://svn.freebsd.org/changeset/base/234974 Log: Tag clang release_31 branch r155985. Added: vendor/clang/clang-release_31-r155985/ - copied from r234973, vendor/clang/dist/ From owner-svn-src-vendor@FreeBSD.ORG Fri May 4 18:29:33 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D0FB106566B; Fri, 4 May 2012 18:29:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 677C78FC0A; Fri, 4 May 2012 18:29:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q44ITXgJ017180; Fri, 4 May 2012 18:29:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q44ITXw0017177; Fri, 4 May 2012 18:29:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205041829.q44ITXw0017177@svn.freebsd.org> From: Xin LI Date: Fri, 4 May 2012 18:29:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235025 - vendor/netcat/dist X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 18:29:33 -0000 Author: delphij Date: Fri May 4 18:29:32 2012 New Revision: 235025 URL: http://svn.freebsd.org/changeset/base/235025 Log: Vendor import of netcat as of OPENBSD_5_1. Modified: vendor/netcat/dist/nc.1 vendor/netcat/dist/netcat.c Modified: vendor/netcat/dist/nc.1 ============================================================================== --- vendor/netcat/dist/nc.1 Fri May 4 18:24:38 2012 (r235024) +++ vendor/netcat/dist/nc.1 Fri May 4 18:29:32 2012 (r235025) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.57 2011/01/09 22:16:46 jeremy Exp $ +.\" $OpenBSD: nc.1,v 1.60 2012/02/07 12:11:43 lum Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: January 8 2011 $ +.Dd $Mdocdate: October 4 2011 $ .Dt NC 1 .Os .Sh NAME @@ -41,7 +41,7 @@ .Op Fl P Ar proxy_username .Op Fl p Ar source_port .Op Fl s Ar source -.Op Fl T Ar ToS +.Op Fl T Ar toskeyword .Op Fl V Ar rtable .Op Fl w Ar timeout .Op Fl X Ar proxy_protocol @@ -164,14 +164,21 @@ to create and use so that datagrams can It is an error to use this option in conjunction with the .Fl l option. -.It Fl T Ar ToS -Specifies IP Type of Service (ToS) for the connection. -Valid values are the tokens -.Dq lowdelay , -.Dq throughput , -.Dq reliability , -or an 8-bit hexadecimal value preceded by -.Dq 0x . +.It Fl T Ar toskeyword +Change IPv4 TOS value. +.Ar toskeyword +may be one of +.Ar critical , +.Ar inetcontrol , +.Ar lowdelay , +.Ar netcontrol , +.Ar throughput , +.Ar reliability , +or one of the DiffServ Code Points: +.Ar ef , +.Ar af11 ... af43 , +.Ar cs0 ... cs7 ; +or a number in either hex or decimal. .It Fl t Causes .Nm @@ -203,9 +210,9 @@ Have .Nm give more verbose output. .It Fl w Ar timeout -If a connection and stdin are idle for more than +Connections which cannot be established or are idle timeout after .Ar timeout -seconds, then the connection is silently closed. +seconds. The .Fl w flag has no effect on the @@ -442,8 +449,15 @@ Original implementation by *Hobbit* Rewritten with IPv6 support by .An Eric Jackson Aq ericj@monkey.org . .Sh CAVEATS -UDP port scans will always succeed -(i.e. report the port as open), -rendering the +UDP port scans using the .Fl uz -combination of flags relatively useless. +combination of flags will always report success irrespective of +the target machine's state. +However, +in conjunction with a traffic sniffer either on the target machine +or an intermediary device, +the +.Fl uz +combination could be useful for communications diagnostics. +Note that the amount of UDP traffic generated may be limited either +due to hardware resources and/or configuration settings. Modified: vendor/netcat/dist/netcat.c ============================================================================== --- vendor/netcat/dist/netcat.c Fri May 4 18:24:38 2012 (r235024) +++ vendor/netcat/dist/netcat.c Fri May 4 18:29:32 2012 (r235025) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.101 2011/06/21 17:31:07 mikeb Exp $ */ +/* $OpenBSD: netcat.c,v 1.105 2012/02/09 06:25:35 lum Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -98,6 +98,7 @@ void help(void); int local_listen(char *, char *, struct addrinfo); void readwrite(int); int remote_connect(const char *, const char *, struct addrinfo); +int timeout_connect(int, const struct sockaddr *, socklen_t); int socks_connect(const char *, const char *, struct addrinfo, const char *, const char *, struct addrinfo, int, const char *); int udptest(int); @@ -105,7 +106,7 @@ int unix_bind(char *); int unix_connect(char *); int unix_listen(char *); void set_common_sockopts(int); -int parse_iptos(char *); +int map_tos(char *, int *); void usage(int); int @@ -234,7 +235,18 @@ main(int argc, char *argv[]) Sflag = 1; break; case 'T': - Tflag = parse_iptos(optarg); + errstr = NULL; + errno = 0; + if (map_tos(optarg, &Tflag)) + break; + if (strlen(optarg) > 1 && optarg[0] == '0' && + optarg[1] == 'x') + Tflag = (int)strtol(optarg, NULL, 16); + else + Tflag = (int)strtonum(optarg, 0, 255, + &errstr); + if (Tflag < 0 || Tflag > 255 || errstr || errno) + errx(1, "illegal tos value %s", optarg); break; default: usage(1); @@ -579,7 +591,7 @@ remote_connect(const char *host, const c set_common_sockopts(s); - if (connect(s, res0->ai_addr, res0->ai_addrlen) == 0) + if (timeout_connect(s, res0->ai_addr, res0->ai_addrlen) == 0) break; else if (vflag) warn("connect to %s port %s (%s) failed", host, port, @@ -594,6 +606,43 @@ remote_connect(const char *host, const c return (s); } +int +timeout_connect(int s, const struct sockaddr *name, socklen_t namelen) +{ + struct pollfd pfd; + socklen_t optlen; + int flags, optval; + int ret; + + if (timeout != -1) { + flags = fcntl(s, F_GETFL, 0); + if (fcntl(s, F_SETFL, flags | O_NONBLOCK) == -1) + err(1, "set non-blocking mode"); + } + + if ((ret = connect(s, name, namelen)) != 0 && errno == EINPROGRESS) { + pfd.fd = s; + pfd.events = POLLOUT; + if ((ret = poll(&pfd, 1, timeout)) == 1) { + optlen = sizeof(optval); + if ((ret = getsockopt(s, SOL_SOCKET, SO_ERROR, + &optval, &optlen)) == 0) { + errno = optval; + ret = optval == 0 ? 0 : -1; + } + } else if (ret == 0) { + errno = ETIMEDOUT; + ret = -1; + } else + err(1, "poll failed"); + } + + if (timeout != -1 && fcntl(s, F_SETFL, flags) == -1) + err(1, "restoring flags"); + + return (ret); +} + /* * local_listen() * Returns a socket listening on a local port, binds to specified source @@ -753,7 +802,7 @@ atelnet(int nfd, unsigned char *buf, uns /* * build_ports() - * Build an array or ports in portlist[], listing each port + * Build an array of ports in portlist[], listing each port * that we should try to connect to. */ void @@ -765,9 +814,6 @@ build_ports(char *p) int x = 0; if ((n = strchr(p, '-')) != NULL) { - if (lflag) - errx(1, "Cannot use -l with multiple ports!"); - *n = '\0'; n++; @@ -819,8 +865,7 @@ build_ports(char *p) /* * udptest() * Do a few writes to see if the UDP port is there. - * XXX - Better way of doing this? Doesn't work for IPv6. - * Also fails after around 100 ports checked. + * Fails once PF state table is full. */ int udptest(int s) @@ -874,20 +919,51 @@ set_common_sockopts(int s) } int -parse_iptos(char *s) +map_tos(char *s, int *val) { - int tos = -1; + /* DiffServ Codepoints and other TOS mappings */ + const struct toskeywords { + const char *keyword; + int val; + } *t, toskeywords[] = { + { "af11", IPTOS_DSCP_AF11 }, + { "af12", IPTOS_DSCP_AF12 }, + { "af13", IPTOS_DSCP_AF13 }, + { "af21", IPTOS_DSCP_AF21 }, + { "af22", IPTOS_DSCP_AF22 }, + { "af23", IPTOS_DSCP_AF23 }, + { "af31", IPTOS_DSCP_AF31 }, + { "af32", IPTOS_DSCP_AF32 }, + { "af33", IPTOS_DSCP_AF33 }, + { "af41", IPTOS_DSCP_AF41 }, + { "af42", IPTOS_DSCP_AF42 }, + { "af43", IPTOS_DSCP_AF43 }, + { "critical", IPTOS_PREC_CRITIC_ECP }, + { "cs0", IPTOS_DSCP_CS0 }, + { "cs1", IPTOS_DSCP_CS1 }, + { "cs2", IPTOS_DSCP_CS2 }, + { "cs3", IPTOS_DSCP_CS3 }, + { "cs4", IPTOS_DSCP_CS4 }, + { "cs5", IPTOS_DSCP_CS5 }, + { "cs6", IPTOS_DSCP_CS6 }, + { "cs7", IPTOS_DSCP_CS7 }, + { "ef", IPTOS_DSCP_EF }, + { "inetcontrol", IPTOS_PREC_INTERNETCONTROL }, + { "lowdelay", IPTOS_LOWDELAY }, + { "netcontrol", IPTOS_PREC_NETCONTROL }, + { "reliability", IPTOS_RELIABILITY }, + { "throughput", IPTOS_THROUGHPUT }, + { NULL, -1 }, + }; + + for (t = toskeywords; t->keyword != NULL; t++) { + if (strcmp(s, t->keyword) == 0) { + *val = t->val; + return (1); + } + } - if (strcmp(s, "lowdelay") == 0) - return (IPTOS_LOWDELAY); - if (strcmp(s, "throughput") == 0) - return (IPTOS_THROUGHPUT); - if (strcmp(s, "reliability") == 0) - return (IPTOS_RELIABILITY); - - if (sscanf(s, "0x%x", &tos) != 1 || tos < 0 || tos > 0xff) - errx(1, "invalid IP Type of Service"); - return (tos); + return (0); } void @@ -911,7 +987,7 @@ help(void) \t-r Randomize remote ports\n\ \t-S Enable the TCP MD5 signature option\n\ \t-s addr\t Local source address\n\ - \t-T ToS\t Set IP Type of Service\n\ + \t-T toskeyword\tSet IP Type of Service\n\ \t-t Answer TELNET negotiation\n\ \t-U Use UNIX domain socket\n\ \t-u UDP mode\n\ From owner-svn-src-vendor@FreeBSD.ORG Fri May 4 18:30:40 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0A33106568A; Fri, 4 May 2012 18:30:40 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 913E88FC15; Fri, 4 May 2012 18:30:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q44IUe9m017255; Fri, 4 May 2012 18:30:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q44IUeTD017254; Fri, 4 May 2012 18:30:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205041830.q44IUeTD017254@svn.freebsd.org> From: Xin LI Date: Fri, 4 May 2012 18:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235026 - vendor/netcat/5.1 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 18:30:40 -0000 Author: delphij Date: Fri May 4 18:30:40 2012 New Revision: 235026 URL: http://svn.freebsd.org/changeset/base/235026 Log: Tag netcat from OpenBSD 5.1. Added: vendor/netcat/5.1/ - copied from r235025, vendor/netcat/dist/