From owner-svn-src-vendor@freebsd.org Thu Jun 8 12:58:35 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9628BFE88E; Thu, 8 Jun 2017 12:58:35 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DD8280D64; Thu, 8 Jun 2017 12:58:35 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58CwYGK082156; Thu, 8 Jun 2017 12:58:34 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58CwYfk082152; Thu, 8 Jun 2017 12:58:34 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201706081258.v58CwYfk082152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Thu, 8 Jun 2017 12:58:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319692 - in vendor/Juniper/libxo/dist: . doc encoder/cbor encoder/test libxo tests/core tests/core/saved tests/gettext tests/xo xo xohtml xopo X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 08 Jun 2017 12:58:35 -0000 Author: phil Date: Thu Jun 8 12:58:33 2017 New Revision: 319692 URL: https://svnweb.freebsd.org/changeset/base/319692 Log: Import libxo 0.8.0 Modified: vendor/Juniper/libxo/dist/Makefile.am vendor/Juniper/libxo/dist/configure.ac vendor/Juniper/libxo/dist/doc/libxo-manual.html vendor/Juniper/libxo/dist/doc/libxo.txt vendor/Juniper/libxo/dist/encoder/cbor/enc_cbor.c vendor/Juniper/libxo/dist/encoder/test/enc_test.c vendor/Juniper/libxo/dist/libxo/libxo.c vendor/Juniper/libxo/dist/libxo/xo.h vendor/Juniper/libxo/dist/libxo/xo_buf.h vendor/Juniper/libxo/dist/libxo/xo_encoder.c vendor/Juniper/libxo/dist/libxo/xo_encoder.h vendor/Juniper/libxo/dist/libxo/xo_syslog.c vendor/Juniper/libxo/dist/tests/core/Makefile.am vendor/Juniper/libxo/dist/tests/core/saved/test_01.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_03.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_04.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_05.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_06.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_07.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_08.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_09.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_10.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_11.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_11.HIPx.out vendor/Juniper/libxo/dist/tests/core/saved/test_12.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_12.H.out vendor/Juniper/libxo/dist/tests/core/saved/test_12.HIPx.out vendor/Juniper/libxo/dist/tests/core/saved/test_12.HP.out vendor/Juniper/libxo/dist/tests/core/saved/test_12.J.out vendor/Juniper/libxo/dist/tests/core/saved/test_12.JP.out vendor/Juniper/libxo/dist/tests/core/saved/test_12.T.out vendor/Juniper/libxo/dist/tests/core/saved/test_12.X.out vendor/Juniper/libxo/dist/tests/core/saved/test_12.XP.out vendor/Juniper/libxo/dist/tests/core/test_12.c vendor/Juniper/libxo/dist/tests/gettext/Makefile.am vendor/Juniper/libxo/dist/tests/xo/Makefile.am vendor/Juniper/libxo/dist/xo/xo.1 vendor/Juniper/libxo/dist/xohtml/xohtml.1 vendor/Juniper/libxo/dist/xopo/xopo.1 vendor/Juniper/libxo/dist/xopo/xopo.c Modified: vendor/Juniper/libxo/dist/Makefile.am ============================================================================== --- vendor/Juniper/libxo/dist/Makefile.am Thu Jun 8 12:39:03 2017 (r319691) +++ vendor/Juniper/libxo/dist/Makefile.am Thu Jun 8 12:58:33 2017 (r319692) @@ -100,4 +100,25 @@ ANALYZE_DIR = ~/trash/libxo ANALYZE_CMD = scan-build-mp-3.6 analyze: + ${MAKE} clean ${ANALYZE_CMD} -o ${ANALYZE_DIR} ${MAKE} + +SANIFLAGS=-fno-omit-frame-pointer -g -O2 + +sanitize-address: + ${MAKE} clean + ${MAKE} CFLAGS="-fsanitize=address ${SANIFLAGS}" + ${MAKE} install + ${MAKE} test + +sanitize-undefined: + ${MAKE} clean + ${MAKE} CFLAGS="-fsanitize=undefined ${SANIFLAGS}" + ${MAKE} install + ${MAKE} test + +sanitize-memory: + ${MAKE} clean + ${MAKE} CFLAGS="-fsanitize=memory ${SANIFLAGS}" + ${MAKE} install + ${MAKE} test Modified: vendor/Juniper/libxo/dist/configure.ac ============================================================================== --- vendor/Juniper/libxo/dist/configure.ac Thu Jun 8 12:39:03 2017 (r319691) +++ vendor/Juniper/libxo/dist/configure.ac Thu Jun 8 12:58:33 2017 (r319692) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.7.2], [phil@juniper.net]) +AC_INIT([libxo], [0.8.0], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. Modified: vendor/Juniper/libxo/dist/doc/libxo-manual.html ============================================================================== --- vendor/Juniper/libxo/dist/doc/libxo-manual.html Thu Jun 8 12:39:03 2017 (r319691) +++ vendor/Juniper/libxo/dist/doc/libxo-manual.html Thu Jun 8 12:58:33 2017 (r319692) @@ -515,7 +515,7 @@ li.indline1 { } @top-right { - content: "May 2017"; + content: "June 2017"; } @top-center { @@ -21983,15 +21983,17 @@ jQuery(function ($) { - - - - - - - - - + + + + + + + + + + + @@ -22009,7 +22011,7 @@ jQuery(function ($) { -May 15, 2017 +June 3, 2017

libxo: The Easy Way to Generate text, XML, JSON, and HTML output
libxo-manual

@@ -22018,398 +22020,413 @@ jQuery(function ($) {
  • 1   
    -Overview
    • -
      1.1   
      -Getting libxo
    • -
      2   
      +
      3   
      Formatting with libxo +
    • +
    • +
      4   
      +Command-line Arguments
    • -
      3   
      +
      5   
      The libxo API
    • -
      4   
      +
      6   
      The "xo" Utility
    • -
      5   
      +
      7   
      xolint
    • -
      6   
      +
      8   
      xohtml
    • -
      7   
      +
      9   
      xopo
    • -
      8   
      +
      10   
      FAQs
    • -
      9   
      +
      11   
      Howtos: Focused Directions
    • -
      10   
      +
      12   
      Examples
    • @@ -22642,14 +22659,31 @@ jQuery(function ($) { Overview

      libxo - A Library for Generating Text, XML, JSON, and HTML Output

      -

      You want to prepare for the future, but you need to live in the present. You'd love a flying car, but need to get to work today. You want to support features like XML, JSON, and HTML rendering to allow integration with NETCONF, REST, and web browsers, but you need to make text output for command line users. And you don't want multiple code paths that can't help but get out of sync. None of this "if (xml) {... } else {...}" logic. And ifdefs are right out. But you'd really, really like all the fancy features that modern encoding formats can provide. libxo can help.

      -

      The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced. The application calls a function "xo_emit" to product output that is described in a format string. A "field descriptor" tells libxo what the field is and what it means. Each field descriptor is placed in braces with a printf-like format string (Section 2.2):

      +

      You want to prepare for the future, but you need to live in the present. You'd love a flying car, but need to get to work today. You want to support features like XML, JSON, and HTML rendering to allow integration with NETCONF, REST, and web browsers, but you need to make text output for command line users.

      +

      And you don't want multiple code paths that can't help but get out of sync:

      +    /* None of this "if (xml) {... } else {...}"  logic */
      +    if (xml) {
      +        /* some code to make xml*/
      +    } else {
      +        /* other code to make text */
      +        /* oops forgot to add something on both clauses! */
      +    }
      +
      +    /* And ifdefs are right out. */
      +    #ifdef MAKE_XML
      +        /* icky */
      +    #else
      +        /* pooh */
      +    #endif
      +	    

      But you'd really, really like all the fancy features that modern encoding formats can provide. libxo can help.

      +

      The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced. The application calls a function "xo_emit" to product output that is described in a format string. A "field descriptor" tells libxo what the field is and what it means. Each field descriptor is placed in braces with a printf-like format string (Section 3.2):

      +
           xo_emit(" {:lines/%7ju} {:words/%7ju} "
                   "{:characters/%7ju} {d:filename/%s}\n",
                   linect, wordct, charct, file);
      -	    

      Each field can have a role, with the 'value' role being the default, and the role tells libxo how and when to render that field. Output can then be generated in various style, using the "‑‑libxo" option:

      -
      +	    

      Each field can have a role, with the 'value' role being the default, and the role tells libxo how and when to render that field (see Section 3.2.1 for details). Modifiers change how the field is rendered in different output styles (see Section 3.2.2 for details. Output can then be generated in various style, using the "‑‑libxo" option:

      +
           % wc /etc/motd
                 25     165    1140 /etc/motd
           % wc --libxo xml,pretty,warn /etc/motd
      @@ -22685,160 +22719,164 @@ jQuery(function ($) {
             <div class="text"> </div>
             <div class="data" data-tag="filename">/etc/motd</div>
           </div>
      -	    

      Section Contents:

      - +

      Same code path, same format strings, same information, but it's rendered in distinct styles based on run-time flags.

      + +
      -

      +

      -1.1 
      +2_ 

      Getting libxo - -

      libxo lives on github as:

      -

      https://github.com/Juniper/libxo

      -

      The latest release of libxo is available at:

      -

      https://github.com/Juniper/libxo/releases

      -

      We are following the branching scheme from http://nvie.com/posts/a-successful-git-branching-model/ which means we will do development under the "develop" branch, and release from the "master" branch. To clone a developer tree, run the following command:

      -
      +
      +

      libxo now ships as part of the FreeBSD Operating System (as of -11).

      +

      libxo lives on github as:

      +

      https://github.com/Juniper/libxo

      +

      The latest release of libxo is available at:

      +

      https://github.com/Juniper/libxo/releases

      +

      We are following the branching scheme from http://nvie.com/posts/a-successful-git-branching-model/ which means we will do development under the "develop" branch, and release from the "master" branch. To clone a developer tree, run the following command:

      +
         git clone https://github.com/Juniper/libxo.git -b develop
      -	    

      We're using semantic release numbering, as defined in http://semver.org/spec/v2.0.0.html.

      -

      libxo is open source, distributed under the BSD license. It shipped as part of the FreeBSD operating system starting with release 11.0.

      -

      Issues, problems, and bugs should be directly to the issues page on our github site.

      -

      Section Contents:

      +

      We're using semantic release numbering, as defined in http://semver.org/spec/v2.0.0.html.

      +

      libxo is open source, distributed under the BSD license. It shipped as part of the FreeBSD operating system starting with release 11.0.

      +

      Issues, problems, and bugs should be directly to the issues page on our github site.

      +

      Section Contents:

      -

      +

      -1.1.1 
      +2.1 

      Downloading libxo Source Code - -

      You can retrieve the source for libxo in two ways:

      -

      A) Use a "distfile" for a specific release. We use github to maintain our releases. Visit github release page (https://github.com/Juniper/libxo/releases) to see the list of releases. To download the latest, look for the release with the green "Latest release" button and the green "libxo‑RELEASE.tar.gz" button under that section.

      -

      After downloading that release's distfile, untar it as follows:

      -
      +
      +

      You can retrieve the source for libxo in two ways:

      +

      A) Use a "distfile" for a specific release. We use github to maintain our releases. Visit github release page (https://github.com/Juniper/libxo/releases) to see the list of releases. To download the latest, look for the release with the green "Latest release" button and the green "libxo‑RELEASE.tar.gz" button under that section.

      +

      After downloading that release's distfile, untar it as follows:

      +
           tar -zxf libxo-RELEASE.tar.gz
           cd libxo-RELEASE
      -	    

      [Note: for Solaris users, your "tar" command lacks the "‑z" flag, so you'll need to substitute "gzip -dc "file" | tar xf -" instead of "tar -zxf "file"".]

      -

      B) Use the current build from github. This gives you the most recent source code, which might be less stable than a specific release. To build libxo from the git repo:

      -
      +	    

      [Note: for Solaris users, your "tar" command lacks the "‑z" flag, so you'll need to substitute "gzip -dc "file" | tar xf -" instead of "tar -zxf "file"".]

      +

      B) Use the current build from github. This gives you the most recent source code, which might be less stable than a specific release. To build libxo from the git repo:

      +
           git clone https://github.com/Juniper/libxo.git
           cd libxo
      -	    

      _BE AWARE_: The github repository does _not_ contain the files generated by "autoreconf", with the notable exception of the "m4" directory. Since these files (depcomp, configure, missing, install-sh, etc) are generated files, we keep them out of the source code repository.

      -

      This means that if you download the a release distfile, these files will be ready and you'll just need to run "configure", but if you download the source code from svn, then you'll need to run "autoreconf" by hand. This step is done for you by the "setup.sh" script, described in the next section.

      +

      _BE AWARE_: The github repository does _not_ contain the files generated by "autoreconf", with the notable exception of the "m4" directory. Since these files (depcomp, configure, missing, install-sh, etc) are generated files, we keep them out of the source code repository.

      +

      This means that if you download the a release distfile, these files will be ready and you'll just need to run "configure", but if you download the source code from svn, then you'll need to run "autoreconf" by hand. This step is done for you by the "setup.sh" script, described in the next section.

      -

      +

      -1.1.2 
      +2.2 

      Building libxo - -

      To build libxo, you'll need to set up the build, run the "configure" script, run the "make" command, and run the regression tests.

      -

      The following is a summary of the commands needed. These commands are explained in detail in the rest of this section.

      -
      +
      +

      To build libxo, you'll need to set up the build, run the "configure" script, run the "make" command, and run the regression tests.

      +

      The following is a summary of the commands needed. These commands are explained in detail in the rest of this section.

      *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Thu Jun 8 12:58:49 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06310BFE8C7; Thu, 8 Jun 2017 12:58:49 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B23D080DED; Thu, 8 Jun 2017 12:58:48 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58Cwl9P082207; Thu, 8 Jun 2017 12:58:47 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58CwlNk082206; Thu, 8 Jun 2017 12:58:47 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201706081258.v58CwlNk082206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Thu, 8 Jun 2017 12:58:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319693 - vendor/Juniper/libxo/0.8.0 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 08 Jun 2017 12:58:49 -0000 Author: phil Date: Thu Jun 8 12:58:47 2017 New Revision: 319693 URL: https://svnweb.freebsd.org/changeset/base/319693 Log: Tag libxo 0.8.0 Added: - copied from r319692, vendor/Juniper/libxo/dist/ Directory Properties: vendor/Juniper/libxo/0.8.0/ (props changed) From owner-svn-src-vendor@freebsd.org Thu Jun 8 19:29:10 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9DB7C78529; Thu, 8 Jun 2017 19:29:09 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 997796E6FF; Thu, 8 Jun 2017 19:29:09 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58JT8eb045547; Thu, 8 Jun 2017 19:29:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58JT7Sa045531; Thu, 8 Jun 2017 19:29:07 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201706081929.v58JT7Sa045531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 8 Jun 2017 19:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319715 - vendor/mdocml/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 08 Jun 2017 19:29:10 -0000 Author: bapt Date: Thu Jun 8 19:29:07 2017 New Revision: 319715 URL: https://svnweb.freebsd.org/changeset/base/319715 Log: Import mandoc 2017-06-08 Added: vendor/mdocml/dist/mdoc_markdown.c (contents, props changed) vendor/mdocml/dist/roff_html.c (contents, props changed) vendor/mdocml/dist/roff_term.c (contents, props changed) vendor/mdocml/dist/roff_validate.c (contents, props changed) vendor/mdocml/dist/term_tab.c (contents, props changed) Deleted: vendor/mdocml/dist/man_hash.c vendor/mdocml/dist/manpage.c vendor/mdocml/dist/mdoc_hash.c Modified: vendor/mdocml/dist/LICENSE vendor/mdocml/dist/Makefile vendor/mdocml/dist/Makefile.depend vendor/mdocml/dist/NEWS vendor/mdocml/dist/TODO vendor/mdocml/dist/apropos.1 vendor/mdocml/dist/catman.8 vendor/mdocml/dist/cgi.c vendor/mdocml/dist/cgi.h.example vendor/mdocml/dist/chars.c vendor/mdocml/dist/configure vendor/mdocml/dist/configure.local.example vendor/mdocml/dist/eqn.c vendor/mdocml/dist/gmdiff vendor/mdocml/dist/html.c vendor/mdocml/dist/html.h vendor/mdocml/dist/libman.h vendor/mdocml/dist/libmandoc.h vendor/mdocml/dist/libmdoc.h vendor/mdocml/dist/main.c vendor/mdocml/dist/main.h vendor/mdocml/dist/makewhatis.8 vendor/mdocml/dist/man.1 vendor/mdocml/dist/man.7 vendor/mdocml/dist/man.c vendor/mdocml/dist/man.cgi.3 vendor/mdocml/dist/man.cgi.8 vendor/mdocml/dist/man.h vendor/mdocml/dist/man_html.c vendor/mdocml/dist/man_macro.c vendor/mdocml/dist/man_term.c vendor/mdocml/dist/man_validate.c vendor/mdocml/dist/mandoc.1 vendor/mdocml/dist/mandoc.3 vendor/mdocml/dist/mandoc.c vendor/mdocml/dist/mandoc.css vendor/mdocml/dist/mandoc.h vendor/mdocml/dist/mandoc_char.7 vendor/mdocml/dist/mandoc_headers.3 vendor/mdocml/dist/mandoc_html.3 vendor/mdocml/dist/mandocd.8 vendor/mdocml/dist/mandocdb.c vendor/mdocml/dist/mansearch.3 vendor/mdocml/dist/mansearch.c vendor/mdocml/dist/mansearch.h vendor/mdocml/dist/mdoc.7 vendor/mdocml/dist/mdoc.c vendor/mdocml/dist/mdoc.h vendor/mdocml/dist/mdoc_argv.c vendor/mdocml/dist/mdoc_html.c vendor/mdocml/dist/mdoc_macro.c vendor/mdocml/dist/mdoc_man.c vendor/mdocml/dist/mdoc_state.c vendor/mdocml/dist/mdoc_term.c vendor/mdocml/dist/mdoc_validate.c vendor/mdocml/dist/out.c vendor/mdocml/dist/out.h vendor/mdocml/dist/read.c vendor/mdocml/dist/roff.7 vendor/mdocml/dist/roff.c vendor/mdocml/dist/roff.h vendor/mdocml/dist/soelim.1 vendor/mdocml/dist/tbl.7 vendor/mdocml/dist/tbl.c vendor/mdocml/dist/tbl_data.c vendor/mdocml/dist/tbl_html.c vendor/mdocml/dist/tbl_layout.c vendor/mdocml/dist/tbl_term.c vendor/mdocml/dist/term.c vendor/mdocml/dist/term.h vendor/mdocml/dist/term_ascii.c vendor/mdocml/dist/term_ps.c vendor/mdocml/dist/tree.c Modified: vendor/mdocml/dist/LICENSE ============================================================================== --- vendor/mdocml/dist/LICENSE Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/LICENSE Thu Jun 8 19:29:07 2017 (r319715) @@ -1,4 +1,4 @@ -$Id: LICENSE,v 1.14 2017/02/08 12:24:10 schwarze Exp $ +$Id: LICENSE,v 1.15 2017/02/21 00:37:03 schwarze Exp $ With the exceptions noted below, all code and documentation contained in the mdocml toolkit is protected by the Copyright Modified: vendor/mdocml/dist/Makefile ============================================================================== --- vendor/mdocml/dist/Makefile Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/Makefile Thu Jun 8 19:29:07 2017 (r319715) @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp $ +# $Id: Makefile,v 1.512 2017/05/07 17:31:45 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons # Copyright (c) 2011, 2013-2017 Ingo Schwarze @@ -85,7 +85,6 @@ SRCS = att.c \ lib.c \ main.c \ man.c \ - man_hash.c \ man_html.c \ man_macro.c \ man_term.c \ @@ -95,15 +94,14 @@ SRCS = att.c \ mandoc_ohash.c \ mandocd.c \ mandocdb.c \ - manpage.c \ manpath.c \ mansearch.c \ mdoc.c \ mdoc_argv.c \ - mdoc_hash.c \ mdoc_html.c \ mdoc_macro.c \ mdoc_man.c \ + mdoc_markdown.c \ mdoc_state.c \ mdoc_term.c \ mdoc_validate.c \ @@ -112,6 +110,9 @@ SRCS = att.c \ preconv.c \ read.c \ roff.c \ + roff_html.c \ + roff_term.c \ + roff_validate.c \ soelim.c \ st.c \ tag.c \ @@ -124,6 +125,7 @@ SRCS = att.c \ term.c \ term_ascii.c \ term_ps.c \ + term_tab.c \ tree.c DISTFILES = INSTALL \ @@ -198,7 +200,6 @@ DISTFILES = INSTALL \ $(TESTSRCS) LIBMAN_OBJS = man.o \ - man_hash.o \ man_macro.o \ man_validate.o @@ -206,7 +207,6 @@ LIBMDOC_OBJS = att.o \ lib.o \ mdoc.o \ mdoc_argv.o \ - mdoc_hash.o \ mdoc_macro.o \ mdoc_state.o \ mdoc_validate.o \ @@ -214,6 +214,7 @@ LIBMDOC_OBJS = att.o \ LIBROFF_OBJS = eqn.o \ roff.o \ + roff_validate.o \ tbl.o \ tbl_data.o \ tbl_layout.o \ @@ -250,16 +251,17 @@ MANDOC_HTML_OBJS = eqn_html.o \ html.o \ man_html.o \ mdoc_html.o \ + roff_html.o \ tbl_html.o -MANDOC_MAN_OBJS = mdoc_man.o - MANDOC_TERM_OBJS = eqn_term.o \ man_term.o \ mdoc_term.o \ + roff_term.o \ term.o \ term_ascii.o \ term_ps.o \ + term_tab.o \ tbl_term.o DBM_OBJS = dbm.o \ @@ -279,6 +281,8 @@ MAIN_OBJS = $(MANDOC_HTML_OBJS) \ $(DBA_OBJS) \ main.o \ manpath.o \ + mdoc_man.o \ + mdoc_markdown.o \ out.o \ tag.o \ tree.o @@ -294,10 +298,6 @@ MANDOCD_OBJS = $(MANDOC_HTML_OBJS) \ out.o \ tag.o -MANPAGE_OBJS = $(DBM_OBJS) \ - manpage.o \ - manpath.o - DEMANDOC_OBJS = demandoc.o SOELIM_OBJS = soelim.o \ @@ -373,7 +373,6 @@ clean: rm -f mandoc $(MAIN_OBJS) rm -f man.cgi $(CGI_OBJS) rm -f mandocd catman $(MANDOCD_OBJS) - rm -f manpage $(MANPAGE_OBJS) rm -f demandoc $(DEMANDOC_OBJS) rm -f soelim $(SOELIM_OBJS) rm -f $(WWW_MANS) $(WWW_OBJS) @@ -388,17 +387,16 @@ base-install: mandoc demandoc soelim mkdir -p $(DESTDIR)$(MANDIR)/man8 $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) $(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) - $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) - $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) - $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) - $(LN) $(DESTDIR)$(BINDIR)/mandoc \ - $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS) + cd $(DESTDIR)$(SBINDIR) && \ + $(LN) ${BIN_FROM_SBIN}/mandoc $(BINM_MAKEWHATIS) $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 - $(LN) $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ - $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 + cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1 $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 @@ -475,7 +473,7 @@ uninstall: rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h - rmdir $(DESTDIR)$(INCLUDEDIR) + [ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR) regress: all cd regress && ./regress.pl @@ -492,9 +490,6 @@ libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) mandoc: $(MAIN_OBJS) libmandoc.a $(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD) - -manpage: $(MANPAGE_OBJS) libmandoc.a - $(CC) -o $@ $(LDFLAGS) $(MANPAGE_OBJS) libmandoc.a $(LDADD) man.cgi: $(CGI_OBJS) libmandoc.a $(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD) Modified: vendor/mdocml/dist/Makefile.depend ============================================================================== --- vendor/mdocml/dist/Makefile.depend Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/Makefile.depend Thu Jun 8 19:29:07 2017 (r319715) @@ -28,11 +28,10 @@ demandoc.o: demandoc.c config.h roff.h man.h mdoc.h ma eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h -html.o: html.c config.h mandoc.h mandoc_aux.h out.h html.h manconf.h main.h +html.o: html.c config.h mandoc_aux.h mandoc.h roff.h out.h html.h manconf.h main.h lib.o: lib.c config.h roff.h mdoc.h libmdoc.h lib.in main.o: main.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h tag.h main.h manconf.h mansearch.h man.o: man.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h -man_hash.o: man_hash.c config.h mandoc.h roff.h man.h libmandoc.h libman.h man_html.o: man_html.c config.h mandoc_aux.h roff.h man.h out.h html.h main.h man_macro.o: man_macro.c config.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h man_term.o: man_term.c config.h mandoc_aux.h mandoc.h roff.h man.h out.h term.h main.h @@ -42,15 +41,14 @@ mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_au mandoc_ohash.o: mandoc_ohash.c mandoc_aux.h mandoc_ohash.h compat_ohash.h mandocd.o: mandocd.c config.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h dba_array.h dba.h -manpage.o: manpage.c config.h manconf.h mansearch.h manpath.o: manpath.c config.h mandoc_aux.h manconf.h mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h dbm.h mdoc.o: mdoc.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h -mdoc_hash.o: mdoc_hash.c config.h mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h mdoc_html.o: mdoc_html.c config.h mandoc_aux.h roff.h mdoc.h out.h html.h main.h mdoc_macro.o: mdoc_macro.c config.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h mdoc_man.o: mdoc_man.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h out.h main.h +mdoc_markdown.o: mdoc_markdown.c mandoc_aux.h mandoc.h roff.h mdoc.h main.h mdoc_state.o: mdoc_state.c mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h mdoc_term.o: mdoc_term.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h out.h term.h tag.h main.h mdoc_validate.o: mdoc_validate.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h @@ -58,7 +56,10 @@ msec.o: msec.c config.h mandoc.h libmandoc.h msec.in out.o: out.c config.h mandoc_aux.h mandoc.h out.h preconv.o: preconv.c config.h mandoc.h libmandoc.h read.o: read.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h libmandoc.h roff_int.h -roff.o: roff.c config.h mandoc.h mandoc_aux.h roff.h libmandoc.h roff_int.h libroff.h predefs.in +roff.o: roff.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h roff.h libmandoc.h roff_int.h libroff.h predefs.in +roff_html.o: roff_html.c roff.h out.h html.h +roff_term.o: roff_term.c roff.h out.h term.h +roff_validate.o: roff_validate.c mandoc.h roff.h libmandoc.h roff_int.h soelim.o: soelim.c config.h compat_stringlist.h st.o: st.c config.h roff.h mdoc.h libmdoc.h st.in tag.o: tag.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h tag.h @@ -71,4 +72,5 @@ tbl_term.o: tbl_term.c config.h mandoc.h out.h term.h term.o: term.c config.h mandoc.h mandoc_aux.h out.h term.h main.h term_ascii.o: term_ascii.c config.h mandoc.h mandoc_aux.h out.h term.h manconf.h main.h term_ps.o: term_ps.c config.h mandoc_aux.h out.h term.h manconf.h main.h +term_tab.o: term_tab.c mandoc_aux.h out.h term.h tree.o: tree.c config.h mandoc.h roff.h mdoc.h man.h main.h Modified: vendor/mdocml/dist/NEWS ============================================================================== --- vendor/mdocml/dist/NEWS Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/NEWS Thu Jun 8 19:29:07 2017 (r319715) @@ -1,4 +1,4 @@ -$Id: NEWS,v 1.20 2017/02/16 14:38:12 schwarze Exp $ +$Id: NEWS,v 1.21 2017/02/21 00:37:03 schwarze Exp $ This file lists the most important changes in the mdocml.bsd.lv distribution. Modified: vendor/mdocml/dist/TODO ============================================================================== --- vendor/mdocml/dist/TODO Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/TODO Thu Jun 8 19:29:07 2017 (r319715) @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.234 2017/02/18 11:53:33 schwarze Exp $ +* $Id: TODO,v 1.237 2017/05/16 19:06:30 schwarze Exp $ ************************************************************************ Many issues are annotated for difficulty as follows: @@ -61,18 +61,6 @@ are mere guesses, and some may be wrong. reported by brad@ Sat, 15 Jan 2011 15:45:23 -0500 loc *** exist *** algo *** size ** imp * -- .ta (tab settings) - #1 most important issue naddy@ Mon, 16 Feb 2015 20:59:17 +0100 - ircbug(1) gnats(1) reported by brad@ Sat, 15 Jan 2011 15:50:51 -0500 - also Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 - also posix2time(3) Carsten Kunze Mon, 1 Dec 2014 13:03:10 +0100 - loc ** exist *** algo ** size ** imp *** - -- .ti (temporary indent) - found by naddy@ in xloadimage(1) [devel/libvstr] vstr(3) - found by bentley@ in nmh(1) Mon, 23 Apr 2012 13:38:28 -0600 - loc ** exist ** algo ** size * imp ** (parser reorg helps a lot) - - .while and .shift found by jca@ in ratpoison(1) Sun, 30 Jun 2013 12:01:09 +0200 loc * exist ** algo ** size ** imp ** @@ -273,12 +261,6 @@ are mere guesses, and some may be wrong. - kettenis wants base roff, ms, and me Fri, 1 Jan 2010 22:13:15 +0100 (CET) loc ** exist ** algo ** size *** imp * -- Vsevolod Stakhov (FreeBSD) needs either a markdown output formatter - for mandoc -mdoc or a markdown to mdoc converter because they - have to maintain manuals needed both in markdown and mdoc format. - Look at the libsoldout (markdown -> whatever) - loc * exist * algo * size ** imp ** - --- compatibility checks ----------------------------------------------- - is .Bk implemented correctly in modern groff? @@ -566,8 +548,6 @@ are mere guesses, and some may be wrong. Several areas can be cleaned up to make mandoc even faster. These are -- improve hashing mechanism for macros (quite important: performance) - - the PDF file is HUGE: this can be reduced by using relative offsets ************************************************************************ @@ -613,3 +593,10 @@ Several areas can be cleaned up to make mandoc even fa - use uname(1) to set doc-default-operating-system at install time tobimensch Mon, 1 Dec 2014 00:25:07 +0100 + +- apostrophe (39), circumflex (94), grave (96), tilde (126) + in manuals: \(aq, \(ha, \`, \(ti + Re: [Groff] ASCII Minus Sign in man Pages. + bentley@ 26 Apr 2017 10:02:06 -0600 + Do we need to fix existing manuals? + Do we need to fix the definition of the mdoc(7) language? Modified: vendor/mdocml/dist/apropos.1 ============================================================================== --- vendor/mdocml/dist/apropos.1 Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/apropos.1 Thu Jun 8 19:29:07 2017 (r319715) @@ -1,7 +1,7 @@ -.\" $Id: apropos.1,v 1.40 2017/01/31 19:44:04 schwarze Exp $ +.\" $Id: apropos.1,v 1.45 2017/03/27 18:51:36 schwarze Exp $ .\" .\" Copyright (c) 2011, 2012 Kristaps Dzonsons -.\" Copyright (c) 2011, 2012, 2014 Ingo Schwarze +.\" Copyright (c) 2011, 2012, 2014, 2017 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 31 2017 $ +.Dd $Mdocdate: March 27 2017 $ .Dt APROPOS 1 .Os .Sh NAME @@ -24,7 +24,7 @@ .Nd search manual page databases .Sh SYNOPSIS .Nm -.Op Fl acfhklw +.Op Fl afk .Op Fl C Ar file .Op Fl M Ar path .Op Fl m Ar path @@ -89,12 +89,6 @@ Specify an alternative configuration in .Xr man.conf 5 format. -.It Fl c -In -.Fl a -mode, copy the formatted manual pages to the standard output without using -.Xr more 1 -to paginate them. .It Fl f Search for all words in .Ar expression @@ -102,37 +96,12 @@ in manual page names only. The search is case insensitive and matches whole words only. In this mode, macro keys, comparison operators, and logical operators are not available. -This overrides any earlier -.Fl k -and -.Fl l -options. -.It Fl h -Instead of showing the title lines, show the SYNOPSIS sections, just like -.Xr man 1 -.Fl h -would. .It Fl k Support the full .Ar expression syntax. -This overrides any earlier -.Fl f -and -.Fl l -options. It is the default for .Nm . -.It Fl l -An alias for -.Xr mandoc 1 -.Fl a . -This overrides any earlier -.Fl f , -.Fl k , -and -.Fl w -options. .It Fl M Ar path Use the colon-separated path instead of the default list of paths searched for @@ -162,14 +131,16 @@ By default, pages from all sections are shown. See .Xr man 1 for a listing of sections. -.It Fl w -Instead of showing title lines, show the pathnames of the matching -manual pages, just like -.Xr man 1 -.Fl w -would. .El .Pp +The options +.Fl chlw +are also supported and are documented in +.Xr man 1 . +The options +.Fl fkl +are mutually exclusive and override each other. +.Pp An .Ar expression consists of search terms joined by logical operators @@ -237,8 +208,29 @@ is evaluated case-insensitively. Has no effect on substring terms. .El .Pp -Results are sorted by manual sections and names, with output formatted as +Results are sorted according to the following criteria: +.Bl -enum +.It +The manpath directory tree the page is found in, according to the +order specified with +.Fl M , +.Fl m , +the +.Ev MANPATH +environment variable, the +.Xr man.conf 5 +configuration file, or the default documented in +.Xr man.conf 5 . +.It +The section number in ascending numerical order. +.It +The page name in ascending +.Xr ascii 7 +alphabetical order, case-insensitive. +.El .Pp +Each output line is formatted as +.Pp .D1 name[, name...](sec) \- description .Pp Where @@ -341,25 +333,25 @@ Text production: .It Ev MANPAGER Any non-empty value of the environment variable .Ev MANPAGER -will be used instead of the standard pagination program, -.Xr more 1 . +is used instead of the standard pagination program, +.Xr more 1 ; +see +.Xr man 1 +for details. +Only used if +.Fl a +or +.Fl l +is specified. .It Ev MANPATH -The standard search path used by +A colon-separated list of directories to search for manual pages; see .Xr man 1 -may be changed by specifying a path in the -.Ev MANPATH -environment variable. -Invalid paths, or paths without manual databases, are ignored. +for details. Overridden by -.Fl M . -If -.Ev MANPATH -begins with a colon, it is appended to the default list; -if it ends with a colon, it is prepended to the default list; -or if it contains two adjacent colons, -the standard search path is inserted between the colons. -If none of these conditions are met, it overrides the -standard search path. +.Fl M , +ignored if +.Fl l +is specified. .It Ev PAGER Specifies the pagination program to use when .Ev MANPAGER @@ -367,7 +359,12 @@ is not defined. If neither PAGER nor MANPAGER is defined, .Xr more 1 .Fl s -will be used. +is used. +Only used if +.Fl a +or +.Fl l +is specified. .El .Sh FILES .Bl -tag -width "/etc/man.conf" -compact Modified: vendor/mdocml/dist/catman.8 ============================================================================== --- vendor/mdocml/dist/catman.8 Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/catman.8 Thu Jun 8 19:29:07 2017 (r319715) @@ -1,4 +1,4 @@ -.\" $Id: catman.8,v 1.7 2017/02/06 19:04:21 schwarze Exp $ +.\" $Id: catman.8,v 1.8 2017/03/18 19:56:01 schwarze Exp $ .\" .\" Copyright (c) 2017 Ingo Schwarze .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: February 6 2017 $ +.Dd $Mdocdate: March 18 2017 $ .Dt CATMAN 8 .Os .Sh NAME @@ -49,7 +49,7 @@ Override the default operating system .Ar name for the .Xr mdoc 7 -.Ic Os +.Ic \&Os and for the .Xr man 7 .Ic TH Modified: vendor/mdocml/dist/cgi.c ============================================================================== --- vendor/mdocml/dist/cgi.c Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/cgi.c Thu Jun 8 19:29:07 2017 (r319715) @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.147 2017/02/08 13:34:27 schwarze Exp $ */ +/* $Id: cgi.c,v 1.154 2017/04/19 01:00:03 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze @@ -76,11 +76,12 @@ static void pg_error_badrequest(const char *); static void pg_error_internal(void); static void pg_index(const struct req *); static void pg_noresult(const struct req *, const char *); +static void pg_redirect(const struct req *, const char *); static void pg_search(const struct req *); static void pg_searchres(const struct req *, struct manpage *, size_t); static void pg_show(struct req *, const char *); -static void resp_begin_html(int, const char *); +static void resp_begin_html(int, const char *, const char *); static void resp_begin_http(int, const char *); static void resp_catman(const struct req *, const char *); static void resp_copy(const char *); @@ -345,8 +346,9 @@ resp_copy(const char *filename) } static void -resp_begin_html(int code, const char *msg) +resp_begin_html(int code, const char *msg, const char *file) { + char *cp; resp_begin_http(code, msg); @@ -356,10 +358,20 @@ resp_begin_html(int code, const char *msg) " \n" " \n" - " %s\n" + " ", + CSS_DIR); + if (file != NULL) { + if ((cp = strrchr(file, '/')) != NULL) + file = cp + 1; + if ((cp = strrchr(file, '.')) != NULL) { + printf("%.*s(%s) - ", (int)(cp - file), file, cp + 1); + } else + printf("%s - ", file); + } + printf("%s\n" "\n" "\n", - CSS_DIR, CUSTOMIZE_TITLE); + CUSTOMIZE_TITLE); resp_copy(MAN_DIR "/header.html"); } @@ -492,7 +504,7 @@ static void pg_index(const struct req *req) { - resp_begin_html(200, NULL); + resp_begin_html(200, NULL, NULL); resp_searchform(req, FOCUS_QUERY); printf("

      \n" "This web interface is documented in the\n" @@ -509,7 +521,7 @@ pg_index(const struct req *req) static void pg_noresult(const struct req *req, const char *msg) { - resp_begin_html(200, NULL); + resp_begin_html(200, NULL, NULL); resp_searchform(req, FOCUS_QUERY); puts("

      "); puts(msg); @@ -521,7 +533,7 @@ static void pg_error_badrequest(const char *msg) { - resp_begin_html(400, "Bad Request"); + resp_begin_html(400, "Bad Request", NULL); puts("

      Bad Request

      \n" "

      \n"); puts(msg); @@ -534,12 +546,29 @@ pg_error_badrequest(const char *msg) static void pg_error_internal(void) { - resp_begin_html(500, "Internal Server Error"); + resp_begin_html(500, "Internal Server Error", NULL); puts("

      Internal Server Error

      "); resp_end_html(); } static void +pg_redirect(const struct req *req, const char *name) +{ + printf("Status: 303 See Other\r\n" + "Location: /"); + if (*scriptname != '\0') + printf("%s/", scriptname); + if (strcmp(req->q.manpath, req->p[0])) + printf("%s/", req->q.manpath); + if (req->q.arch != NULL) + printf("%s/", req->q.arch); + printf("%s", name); + if (req->q.sec != NULL) + printf(".%s", req->q.sec); + printf("\r\nContent-Type: text/html; charset=utf-8\r\n\r\n"); +} + +static void pg_searchres(const struct req *req, struct manpage *r, size_t sz) { char *arch, *archend; @@ -562,47 +591,25 @@ pg_searchres(const struct req *req, struct manpage *r, * If we have just one result, then jump there now * without any delay. */ - printf("Status: 303 See Other\r\n"); - printf("Location: http://%s/%s%s%s/%s", - HTTP_HOST, scriptname, - *scriptname == '\0' ? "" : "/", - req->q.manpath, r[0].file); - printf("\r\n" - "Content-Type: text/html; charset=utf-8\r\n" - "\r\n"); + printf("Status: 303 See Other\r\n" + "Location: /"); + if (*scriptname != '\0') + printf("%s/", scriptname); + if (strcmp(req->q.manpath, req->p[0])) + printf("%s/", req->q.manpath); + printf("%s\r\n" + "Content-Type: text/html; charset=utf-8\r\n\r\n", + r[0].file); return; } - resp_begin_html(200, NULL); - resp_searchform(req, - req->q.equal || sz == 1 ? FOCUS_NONE : FOCUS_QUERY); - - if (sz > 1) { - puts(""); - for (i = 0; i < sz; i++) { - printf(" \n" - " \n" - " \n" - " "); - } - puts("
      " - "", - scriptname, *scriptname == '\0' ? "" : "/", - req->q.manpath, r[i].file); - html_print(r[i].names); - printf(""); - html_print(r[i].output); - puts("
      "); - } - /* * In man(1) mode, show one of the pages * even if more than one is found. */ + iuse = 0; if (req->q.equal || sz == 1) { - puts("
      "); - iuse = 0; priouse = 20; archpriouse = 3; for (i = 0; i < sz; i++) { @@ -635,6 +642,36 @@ pg_searchres(const struct req *req, struct manpage *r, priouse = prio; iuse = i; } + resp_begin_html(200, NULL, r[iuse].file); + } else + resp_begin_html(200, NULL, NULL); + + resp_searchform(req, + req->q.equal || sz == 1 ? FOCUS_NONE : FOCUS_QUERY); + + if (sz > 1) { + puts(""); + for (i = 0; i < sz; i++) { + printf(" \n" + " \n" + " \n" + " "); + } + puts("
      " + "q.manpath, req->p[0])) + printf("%s/", req->q.manpath); + printf("%s\">", r[i].file); + html_print(r[i].names); + printf(""); + html_print(r[i].output); + puts("
      "); + } + + if (req->q.equal || sz == 1) { + puts("
      "); resp_show(req, r[iuse].file); } @@ -803,7 +840,8 @@ resp_format(const struct req *req, const char *file) conf.fragment = 1; conf.style = mandoc_strdup(CSS_DIR "/mandoc.css"); usepath = strcmp(req->q.manpath, req->p[0]); - mandoc_asprintf(&conf.man, "/%s%s%%N.%%S", + mandoc_asprintf(&conf.man, "/%s%s%s%s%%N.%%S", + scriptname, *scriptname == '\0' ? "" : "/", usepath ? req->q.manpath : "", usepath ? "/" : ""); mparse_result(mp, &man, NULL); @@ -886,7 +924,7 @@ pg_show(struct req *req, const char *fullpath) return; } - resp_begin_html(200, NULL); + resp_begin_html(200, NULL, file); resp_searchform(req, FOCUS_NONE); resp_show(req, file); resp_end_html(); @@ -956,9 +994,13 @@ pg_search(const struct req *req) } } - if (0 == mansearch(&search, &paths, argc, argv, &res, &ressz)) + res = NULL; + ressz = 0; + if (req->isquery && req->q.equal && argc == 1) + pg_redirect(req, argv[0]); + else if (mansearch(&search, &paths, argc, argv, &res, &ressz) == 0) pg_noresult(req, "You entered an invalid query."); - else if (0 == ressz) + else if (ressz == 0) pg_noresult(req, "No results found."); else pg_searchres(req, res, ressz); @@ -978,6 +1020,22 @@ main(void) const char *querystring; int i; +#if HAVE_PLEDGE + /* + * The "rpath" pledge could be revoked after mparse_readfd() + * if the file desciptor to "/footer.html" would be opened + * up front, but it's probably not worth the complication + * of the code it would cause: it would require scattering + * pledge() calls in multiple low-level resp_*() functions. + */ + + if (pledge("stdio rpath", NULL) == -1) { + warn("pledge"); + pg_error_internal(); + return EXIT_FAILURE; + } +#endif + /* Poor man's ReDoS mitigation. */ itimer.it_value.tv_sec = 2; @@ -1015,7 +1073,8 @@ main(void) if (*path != '\0') { parse_path_info(&req, path); - if (req.q.manpath == NULL || access(path, F_OK) == -1) + if (req.q.manpath == NULL || req.q.sec == NULL || + *req.q.query == '\0' || access(path, F_OK) == -1) path = ""; } else if ((querystring = getenv("QUERY_STRING")) != NULL) parse_query_string(&req, querystring); Modified: vendor/mdocml/dist/cgi.h.example ============================================================================== --- vendor/mdocml/dist/cgi.h.example Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/cgi.h.example Thu Jun 8 19:29:07 2017 (r319715) @@ -1,6 +1,5 @@ /* Example compile-time configuration file for man.cgi(8). */ -#define HTTP_HOST "mdocml.bsd.lv" #define SCRIPT_NAME "cgi-bin/man.cgi" #define MAN_DIR "/man" #define CSS_DIR "" Modified: vendor/mdocml/dist/chars.c ============================================================================== --- vendor/mdocml/dist/chars.c Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/chars.c Thu Jun 8 19:29:07 2017 (r319715) @@ -1,7 +1,7 @@ -/* $Id: chars.c,v 1.69 2017/02/17 18:28:06 schwarze Exp $ */ +/* $Id: chars.c,v 1.70 2017/06/02 12:43:52 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2011, 2014, 2015 Ingo Schwarze + * Copyright (c) 2011, 2014, 2015, 2017 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -81,6 +81,10 @@ static struct ln lines[] = { { "sh", "#", 0x0023 }, { "CR", "_|", 0x21b5 }, { "OK", "\\/", 0x2713 }, + { "CL", "", 0x2663 }, + { "SP", "", 0x2660 }, + { "HE", "", 0x2665 }, + { "DI", "", 0x2666 }, /* Legal symbols. */ { "co", "(C)", 0x00a9 }, @@ -161,6 +165,7 @@ static struct ln lines[] = { { "uA", "=\b^", 0x21d1 }, { "dA", "=\bv", 0x21d3 }, { "vA", "^=v", 0x21d5 }, + { "an", "-", 0x23af }, /* Logic. */ { "AN", "^", 0x2227 }, @@ -234,11 +239,20 @@ static struct ln lines[] = { { "Ah", "N", 0x2135 }, { "Im", "I", 0x2111 }, { "Re", "R", 0x211c }, + { "wp", "P", 0x2118 }, { "pd", "a", 0x2202 }, { "-h", "/h", 0x210f }, + { "hbar", "/h", 0x210f }, { "12", "1/2", 0x00bd }, { "14", "1/4", 0x00bc }, { "34", "3/4", 0x00be }, + { "18", "1/8", 0x215B }, + { "38", "3/8", 0x215C }, + { "58", "5/8", 0x215D }, + { "78", "7/8", 0x215E }, + { "S1", "1", 0x00B9 }, + { "S2", "2", 0x00B2 }, + { "S3", "3", 0x00B3 }, /* Ligatures. */ { "ff", "ff", 0xfb00 }, @@ -354,6 +368,8 @@ static struct ln lines[] = { { "fm", "\'", 0x2032 }, { "sd", "''", 0x2033 }, { "mc", ",\bu", 0x00b5 }, + { "Of", "_\ba", 0x00aa }, + { "Om", "_\bo", 0x00ba }, /* Greek characters. */ { "*A", "A", 0x0391 }, Modified: vendor/mdocml/dist/configure ============================================================================== --- vendor/mdocml/dist/configure Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/configure Thu Jun 8 19:29:07 2017 (r319715) @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: configure,v 1.61 2017/02/18 12:24:24 schwarze Exp $ +# $Id: configure,v 1.62 2017/03/04 16:36:29 schwarze Exp $ # # Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze # @@ -91,6 +91,7 @@ HAVE_WCHAR= PREFIX="/usr/local" BINDIR= SBINDIR= +BIN_FROM_SBIN= INCLUDEDIR= LIBDIR= MANDIR= @@ -458,14 +459,15 @@ echo "config.h: written" 1>&3 exec > Makefile.local -[ -z "${BINDIR}" ] && BINDIR="${PREFIX}/bin" -[ -z "${SBINDIR}" ] && SBINDIR="${PREFIX}/sbin" -[ -z "${INCLUDEDIR}" ] && INCLUDEDIR="${PREFIX}/include/mandoc" -[ -z "${LIBDIR}" ] && LIBDIR="${PREFIX}/lib/mandoc" -[ -z "${MANDIR}" ] && MANDIR="${PREFIX}/man" +[ -z "${BINDIR}" ] && BINDIR="${PREFIX}/bin" +[ -z "${SBINDIR}" ] && SBINDIR="${PREFIX}/sbin" +[ -z "${BIN_FROM_SBIN}" ] && BIN_FROM_SBIN="../bin" +[ -z "${INCLUDEDIR}" ] && INCLUDEDIR="${PREFIX}/include/mandoc" +[ -z "${LIBDIR}" ] && LIBDIR="${PREFIX}/lib/mandoc" +[ -z "${MANDIR}" ] && MANDIR="${PREFIX}/man" -[ -z "${HTDOCDIR}" ] && HTDOCDIR="${WWWPREFIX}/htdocs" -[ -z "${CGIBINDIR}" ] && CGIBINDIR="${WWWPREFIX}/cgi-bin" +[ -z "${HTDOCDIR}" ] && HTDOCDIR="${WWWPREFIX}/htdocs" +[ -z "${CGIBINDIR}" ] && CGIBINDIR="${WWWPREFIX}/cgi-bin" [ -z "${INSTALL_PROGRAM}" ] && INSTALL_PROGRAM="${INSTALL} -m 0555" [ -z "${INSTALL_LIB}" ] && INSTALL_LIB="${INSTALL} -m 0444" @@ -493,6 +495,7 @@ STATIC = ${STATIC} PREFIX = ${PREFIX} BINDIR = ${BINDIR} SBINDIR = ${SBINDIR} +BIN_FROM_SBIN = ${BIN_FROM_SBIN} INCLUDEDIR = ${INCLUDEDIR} LIBDIR = ${LIBDIR} MANDIR = ${MANDIR} Modified: vendor/mdocml/dist/configure.local.example ============================================================================== --- vendor/mdocml/dist/configure.local.example Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/configure.local.example Thu Jun 8 19:29:07 2017 (r319715) @@ -1,4 +1,4 @@ -# $Id: configure.local.example,v 1.29 2017/02/18 12:24:24 schwarze Exp $ +# $Id: configure.local.example,v 1.30 2017/03/04 16:36:29 schwarze Exp $ # # Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze # @@ -84,6 +84,13 @@ PREFIX="/usr/local" BINDIR="${PREFIX}/bin" SBINDIR="${PREFIX}/sbin" MANDIR="${PREFIX}/man" + +# If BINDIR and SBINDIR are not subdirectories of the same parent +# directory or if the basename(1) of BINDIR differs from "bin", +# the relative path from SBINDIR to BINDIR is also needed. +# The default is: + +BIN_FROM_SBIN="../bin" # Some distributions may want to avoid naming conflicts # with the configuration files of other man(1) implementations. Modified: vendor/mdocml/dist/eqn.c ============================================================================== --- vendor/mdocml/dist/eqn.c Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/eqn.c Thu Jun 8 19:29:07 2017 (r319715) @@ -1,4 +1,4 @@ -/* $Id: eqn.c,v 1.61 2016/01/08 00:50:45 schwarze Exp $ */ +/* $Id: eqn.c,v 1.62 2017/03/11 15:43:04 schwarze Exp $ */ /* * Copyright (c) 2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -366,15 +366,19 @@ eqn_def_find(struct eqn_node *ep, const char *key, siz static const char * eqn_next(struct eqn_node *ep, char quote, size_t *sz, int repl) { + static size_t last_len; + static int lim; + char *start, *next; - int q, diff, lim; + int q, diff; size_t ssz, dummy; struct eqn_def *def; if (NULL == sz) sz = &dummy; - lim = 0; + if (ep->cur >= last_len) + lim = 0; ep->rew = ep->cur; again: /* Prevent self-definitions. */ @@ -448,6 +452,7 @@ again: memmove(start + *sz + diff, start + *sz, (strlen(start) - *sz) + 1); memcpy(start, def->val, def->valsz); + last_len = start - ep->data + def->valsz; lim++; goto again; } Modified: vendor/mdocml/dist/gmdiff ============================================================================== --- vendor/mdocml/dist/gmdiff Thu Jun 8 19:09:55 2017 (r319714) +++ vendor/mdocml/dist/gmdiff Thu Jun 8 19:29:07 2017 (r319715) @@ -29,21 +29,24 @@ if [ "X$1" = "X-h" ]; then EQN="neqn" ROFF="nroff" MOPT="-Omdoc $MOPT" +elif [ "X$1" = "X-u" ]; then + shift + ROFF="groff -ket -ww -Tutf8 -P -c" + MOPT="-Werror -Tutf8 $MOPT" else - EQN="eqn -Tascii" - ROFF="groff -ww -Tascii -P -c" + ROFF="groff -et -ww -Tascii -P -c" + MOPT="-Werror -Tascii $MOPT" fi -MOPT="-Werror -Tascii $MOPT" while [ -n "$1" ]; do file=$1 shift echo " ========== $file ========== " - tbl $file | $EQN | $ROFF -mandoc 2> /tmp/roff.err > /tmp/roff.out + $ROFF -mandoc $file 2> /tmp/roff.err > /tmp/roff.out ${MANDOC:=mandoc} -Ios='OpenBSD ports' $MOPT $file \ 2> /tmp/mandoc.err > /tmp/mandoc.out for i in roff mandoc; do - [[ -s /tmp/$i.err ]] && echo "$i errors:" && cat /tmp/$i.err + [ -s /tmp/$i.err ] && echo "$i errors:" && cat /tmp/$i.err done diff -au /tmp/roff.out /tmp/mandoc.out 2>&1 done Modified: vendor/mdocml/dist/html.c ============================================================================== --- vendor/mdocml/dist/html.c Thu Jun 8 19:09:55 2017 (r319714) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Thu Jun 8 19:30:49 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1F9EC78592; Thu, 8 Jun 2017 19:30:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CF936E865; Thu, 8 Jun 2017 19:30:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58JUmv2045687; Thu, 8 Jun 2017 19:30:48 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58JUmHc045681; Thu, 8 Jun 2017 19:30:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201706081930.v58JUmHc045681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 8 Jun 2017 19:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319716 - vendor/mdocml/20170608 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 08 Jun 2017 19:30:49 -0000 Author: bapt Date: Thu Jun 8 19:30:47 2017 New Revision: 319716 URL: https://svnweb.freebsd.org/changeset/base/319716 Log: tag import of mandoc snapshot 20170608 Added: vendor/mdocml/20170608/ - copied from r313954, vendor/mdocml/dist/ vendor/mdocml/20170608/catman.8 - copied unchanged from r319715, vendor/mdocml/dist/catman.8 vendor/mdocml/20170608/catman.c - copied unchanged from r313956, vendor/mdocml/dist/catman.c vendor/mdocml/20170608/man.options.1 - copied unchanged from r313956, vendor/mdocml/dist/man.options.1 vendor/mdocml/20170608/mandocd.8 - copied unchanged from r319715, vendor/mdocml/dist/mandocd.8 vendor/mdocml/20170608/mandocd.c - copied unchanged from r313956, vendor/mdocml/dist/mandocd.c vendor/mdocml/20170608/mdoc_markdown.c - copied unchanged from r319715, vendor/mdocml/dist/mdoc_markdown.c vendor/mdocml/20170608/roff_html.c - copied unchanged from r319715, vendor/mdocml/dist/roff_html.c vendor/mdocml/20170608/roff_term.c - copied unchanged from r319715, vendor/mdocml/dist/roff_term.c vendor/mdocml/20170608/roff_validate.c - copied unchanged from r319715, vendor/mdocml/dist/roff_validate.c vendor/mdocml/20170608/term_tab.c - copied unchanged from r319715, vendor/mdocml/dist/term_tab.c vendor/mdocml/20170608/test-O_DIRECTORY.c - copied unchanged from r313956, vendor/mdocml/dist/test-O_DIRECTORY.c vendor/mdocml/20170608/test-cmsg.c - copied unchanged from r313956, vendor/mdocml/dist/test-cmsg.c vendor/mdocml/20170608/test-recvmsg.c - copied unchanged from r313956, vendor/mdocml/dist/test-recvmsg.c Replaced: vendor/mdocml/20170608/INSTALL - copied unchanged from r313956, vendor/mdocml/dist/INSTALL vendor/mdocml/20170608/LICENSE - copied unchanged from r319715, vendor/mdocml/dist/LICENSE vendor/mdocml/20170608/Makefile - copied unchanged from r319715, vendor/mdocml/dist/Makefile vendor/mdocml/20170608/Makefile.depend - copied unchanged from r319715, vendor/mdocml/dist/Makefile.depend vendor/mdocml/20170608/NEWS - copied unchanged from r319715, vendor/mdocml/dist/NEWS vendor/mdocml/20170608/TODO - copied unchanged from r319715, vendor/mdocml/dist/TODO vendor/mdocml/20170608/apropos.1 - copied unchanged from r319715, vendor/mdocml/dist/apropos.1 vendor/mdocml/20170608/cgi.c - copied unchanged from r319715, vendor/mdocml/dist/cgi.c vendor/mdocml/20170608/cgi.h.example - copied unchanged from r319715, vendor/mdocml/dist/cgi.h.example vendor/mdocml/20170608/chars.c - copied unchanged from r319715, vendor/mdocml/dist/chars.c vendor/mdocml/20170608/compat_fts.c - copied unchanged from r313956, vendor/mdocml/dist/compat_fts.c vendor/mdocml/20170608/configure - copied unchanged from r319715, vendor/mdocml/dist/configure vendor/mdocml/20170608/configure.local.example - copied unchanged from r319715, vendor/mdocml/dist/configure.local.example vendor/mdocml/20170608/dba.c - copied unchanged from r313956, vendor/mdocml/dist/dba.c vendor/mdocml/20170608/dbm_map.c - copied unchanged from r313956, vendor/mdocml/dist/dbm_map.c vendor/mdocml/20170608/eqn.c - copied unchanged from r319715, vendor/mdocml/dist/eqn.c vendor/mdocml/20170608/eqn_term.c - copied unchanged from r313956, vendor/mdocml/dist/eqn_term.c vendor/mdocml/20170608/gmdiff - copied unchanged from r319715, vendor/mdocml/dist/gmdiff vendor/mdocml/20170608/html.c - copied unchanged from r319715, vendor/mdocml/dist/html.c vendor/mdocml/20170608/html.h - copied unchanged from r319715, vendor/mdocml/dist/html.h vendor/mdocml/20170608/libman.h - copied unchanged from r319715, vendor/mdocml/dist/libman.h vendor/mdocml/20170608/libmandoc.h - copied unchanged from r319715, vendor/mdocml/dist/libmandoc.h vendor/mdocml/20170608/libmdoc.h - copied unchanged from r319715, vendor/mdocml/dist/libmdoc.h vendor/mdocml/20170608/main.c - copied unchanged from r319715, vendor/mdocml/dist/main.c vendor/mdocml/20170608/main.h - copied unchanged from r319715, vendor/mdocml/dist/main.h vendor/mdocml/20170608/makewhatis.8 - copied unchanged from r319715, vendor/mdocml/dist/makewhatis.8 vendor/mdocml/20170608/man.1 - copied unchanged from r319715, vendor/mdocml/dist/man.1 vendor/mdocml/20170608/man.7 - copied unchanged from r319715, vendor/mdocml/dist/man.7 vendor/mdocml/20170608/man.c - copied unchanged from r319715, vendor/mdocml/dist/man.c vendor/mdocml/20170608/man.cgi.3 - copied unchanged from r319715, vendor/mdocml/dist/man.cgi.3 vendor/mdocml/20170608/man.cgi.8 - copied unchanged from r319715, vendor/mdocml/dist/man.cgi.8 vendor/mdocml/20170608/man.h - copied unchanged from r319715, vendor/mdocml/dist/man.h vendor/mdocml/20170608/man_html.c - copied unchanged from r319715, vendor/mdocml/dist/man_html.c vendor/mdocml/20170608/man_macro.c - copied unchanged from r319715, vendor/mdocml/dist/man_macro.c vendor/mdocml/20170608/man_term.c - copied unchanged from r319715, vendor/mdocml/dist/man_term.c vendor/mdocml/20170608/man_validate.c - copied unchanged from r319715, vendor/mdocml/dist/man_validate.c vendor/mdocml/20170608/manconf.h - copied unchanged from r313956, vendor/mdocml/dist/manconf.h vendor/mdocml/20170608/mandoc.1 - copied unchanged from r319715, vendor/mdocml/dist/mandoc.1 vendor/mdocml/20170608/mandoc.3 - copied unchanged from r319715, vendor/mdocml/dist/mandoc.3 vendor/mdocml/20170608/mandoc.c - copied unchanged from r319715, vendor/mdocml/dist/mandoc.c vendor/mdocml/20170608/mandoc.css - copied unchanged from r319715, vendor/mdocml/dist/mandoc.css vendor/mdocml/20170608/mandoc.h - copied unchanged from r319715, vendor/mdocml/dist/mandoc.h vendor/mdocml/20170608/mandoc_aux.h - copied unchanged from r313956, vendor/mdocml/dist/mandoc_aux.h vendor/mdocml/20170608/mandoc_char.7 - copied unchanged from r319715, vendor/mdocml/dist/mandoc_char.7 vendor/mdocml/20170608/mandoc_headers.3 - copied unchanged from r319715, vendor/mdocml/dist/mandoc_headers.3 vendor/mdocml/20170608/mandoc_html.3 - copied unchanged from r319715, vendor/mdocml/dist/mandoc_html.3 vendor/mdocml/20170608/mandocdb.c - copied unchanged from r319715, vendor/mdocml/dist/mandocdb.c vendor/mdocml/20170608/manpath.c - copied unchanged from r313956, vendor/mdocml/dist/manpath.c vendor/mdocml/20170608/mansearch.3 - copied unchanged from r319715, vendor/mdocml/dist/mansearch.3 vendor/mdocml/20170608/mansearch.c - copied unchanged from r319715, vendor/mdocml/dist/mansearch.c vendor/mdocml/20170608/mansearch.h - copied unchanged from r319715, vendor/mdocml/dist/mansearch.h vendor/mdocml/20170608/mdoc.7 - copied unchanged from r319715, vendor/mdocml/dist/mdoc.7 vendor/mdocml/20170608/mdoc.c - copied unchanged from r319715, vendor/mdocml/dist/mdoc.c vendor/mdocml/20170608/mdoc.h - copied unchanged from r319715, vendor/mdocml/dist/mdoc.h vendor/mdocml/20170608/mdoc_argv.c - copied unchanged from r319715, vendor/mdocml/dist/mdoc_argv.c vendor/mdocml/20170608/mdoc_html.c - copied unchanged from r319715, vendor/mdocml/dist/mdoc_html.c vendor/mdocml/20170608/mdoc_macro.c - copied unchanged from r319715, vendor/mdocml/dist/mdoc_macro.c vendor/mdocml/20170608/mdoc_man.c - copied unchanged from r319715, vendor/mdocml/dist/mdoc_man.c vendor/mdocml/20170608/mdoc_state.c - copied unchanged from r319715, vendor/mdocml/dist/mdoc_state.c vendor/mdocml/20170608/mdoc_term.c - copied unchanged from r319715, vendor/mdocml/dist/mdoc_term.c vendor/mdocml/20170608/mdoc_validate.c - copied unchanged from r319715, vendor/mdocml/dist/mdoc_validate.c vendor/mdocml/20170608/out.c - copied unchanged from r319715, vendor/mdocml/dist/out.c vendor/mdocml/20170608/out.h - copied unchanged from r319715, vendor/mdocml/dist/out.h vendor/mdocml/20170608/preconv.c - copied unchanged from r313956, vendor/mdocml/dist/preconv.c vendor/mdocml/20170608/read.c - copied unchanged from r319715, vendor/mdocml/dist/read.c vendor/mdocml/20170608/roff.7 - copied unchanged from r319715, vendor/mdocml/dist/roff.7 vendor/mdocml/20170608/roff.c - copied unchanged from r319715, vendor/mdocml/dist/roff.c vendor/mdocml/20170608/roff.h - copied unchanged from r319715, vendor/mdocml/dist/roff.h vendor/mdocml/20170608/soelim.1 - copied unchanged from r319715, vendor/mdocml/dist/soelim.1 vendor/mdocml/20170608/tag.c - copied unchanged from r313956, vendor/mdocml/dist/tag.c vendor/mdocml/20170608/tbl.7 - copied unchanged from r319715, vendor/mdocml/dist/tbl.7 vendor/mdocml/20170608/tbl.c - copied unchanged from r319715, vendor/mdocml/dist/tbl.c vendor/mdocml/20170608/tbl_data.c - copied unchanged from r319715, vendor/mdocml/dist/tbl_data.c vendor/mdocml/20170608/tbl_html.c - copied unchanged from r319715, vendor/mdocml/dist/tbl_html.c vendor/mdocml/20170608/tbl_layout.c - copied unchanged from r319715, vendor/mdocml/dist/tbl_layout.c vendor/mdocml/20170608/tbl_term.c - copied unchanged from r319715, vendor/mdocml/dist/tbl_term.c vendor/mdocml/20170608/term.c - copied unchanged from r319715, vendor/mdocml/dist/term.c vendor/mdocml/20170608/term.h - copied unchanged from r319715, vendor/mdocml/dist/term.h vendor/mdocml/20170608/term_ascii.c - copied unchanged from r319715, vendor/mdocml/dist/term_ascii.c vendor/mdocml/20170608/term_ps.c - copied unchanged from r319715, vendor/mdocml/dist/term_ps.c vendor/mdocml/20170608/tree.c - copied unchanged from r319715, vendor/mdocml/dist/tree.c Deleted: vendor/mdocml/20170608/man_hash.c vendor/mdocml/20170608/manpage.c vendor/mdocml/20170608/mdoc_hash.c Copied: vendor/mdocml/20170608/INSTALL (from r313956, vendor/mdocml/dist/INSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20170608/INSTALL Thu Jun 8 19:30:47 2017 (r319716, copy of r313956, vendor/mdocml/dist/INSTALL) @@ -0,0 +1,157 @@ +$Id: INSTALL,v 1.18 2017/02/08 12:24:10 schwarze Exp $ + +About mdocml, the portable mandoc distribution +---------------------------------------------- +The mandoc manpage compiler toolset is a suite of tools compiling +mdoc(7), the roff(7) macro language of choice for BSD manual pages, +and man(7), the predominant historical language for UNIX manuals. +It includes a man(1) manual viewer and additional tools. +For general information, see . + +In case you have questions or want to provide feedback, read +. Consider subscribing to the +discuss@ mailing list mentioned on that page. If you intend to +help with the development of mandoc, consider subscribing to the +tech@ mailing list, too. + +Enjoy using the mandoc toolset! + +Ingo Schwarze, Karlsruhe, February 2017 + + +Installation +------------ +Before manually installing mandoc on your system, please check +whether the newest version of mandoc is already installed by default +or available via a binary package or a ports system. A list of the +latest bundled and ported versions of mandoc for various operating +systems is maintained at . + +Regarding how packages and ports are maintained for your operating +system, please consult your operating system documentation. +To install mandoc manually, the following steps are needed: + +1. If you want to build the CGI program, man.cgi(8), too, +run the command "echo BUILD_CGI=1 >> configure.local". +Then run "cp cgi.h.example cgi.h" and edit cgi.h as desired. + +2. If you also want to build the new catman(8) utility, run the +command "echo BUILD_CATMAN=1 >> configure.local". Note that it +is unlikely to be a drop-in replacement providing the same +functionality as your system's "catman", if your operating +system contains one. + +3. Define MANPATH_DEFAULT in configure.local +if /usr/share/man:/usr/X11R6/man:/usr/local/man is not appropriate +for your operating system. + +4. Run "./configure". +This script attempts autoconfiguration of mandoc for your system. +Read both its standard output and the file "Makefile.local" it +generates. If anything looks wrong or different from what you +wish, read the file "configure.local.example", create and edit +a file "configure.local", and re-run "./configure" until the +result seems right to you. +On Solaris 10 and earlier, you may have to run "ksh ./configure" +because the native /bin/sh lacks some POSIX features. + +5. Run "make". +Any POSIX-compatible make, in particular both BSD make and GNU make, +should work. If the build fails, look at "configure.local.example" +and go back to step 2. + +6. Run "make -n install" and check whether everything will be +installed to the intended places. Otherwise, put some *DIR or *NM* +variables into "configure.local" and go back to step 4. + +7. Optionally run the regression suite. +Basically, that amounts to "cd regress && ./regress.pl". +But you should probably look at "./mandoc -l regress/regress.pl.1" +first. + +8. Run "sudo make install". If you intend to build a binary +package using some kind of fake root mechanism, you may need a +command like "make DESTDIR=... install". Read the *-install targets +in the "Makefile" to understand how DESTDIR is used. + +9. Run the command "sudo makewhatis" to build mandoc.db(5) databases +in all the directory trees configured in step 6. Whenever installing +new manual pages, re-run makewhatis(8) to update the databases, or +apropos(1) will not find the new pages. + +10. To set up a man.cgi(8) server, read its manual page. + +Note that some man(7) pages may contain low-level roff(7) markup +that mandoc does not yet understand. On some BSD systems using +mandoc, third-party software is vetted on whether it may be formatted +with mandoc. If not, groff(1) is pulled in as a dependency and +used to install a pre-formatted "catpage" instead of directly as +manual page source. + + +Understanding mandoc dependencies +--------------------------------- +The following libraries are required: + +1. zlib for decompressing gzipped manual pages. + +2. The fts(3) directory traversion functions. +If your system does not have them, the bundled compatibility version +will be used, so you need not worry in that case. But be careful: old +glibc versions of fts(3) were known to be broken on 32bit platforms, +see . +That was presumably fixed in glibc-2.23. +If you run into that problem, set "HAVE_FTS=0" in configure.local. + +3. Marc Espie's ohash(3) library. +If your system does not have it, the bundled compatibility version +will be used, so you probably need not worry about it. + +One of the chief design goals of the mandoc toolbox is to make +sure that nothing related to documentation requires C++. +Consequently, linking mandoc against any kind of C++ program +would defeat the purpose and is not supported. + + +Checking autoconfiguration quality +---------------------------------- +If you want to check whether automatic configuration works well +on your platform, consider the following: + +The mandoc package intentionally does not use GNU autoconf because +we consider that toolset a blatant example of overengineering that +is obsolete nowadays, since all modern operating systems are now +reasonably close to POSIX and do not need arcane shell magic any +longer. If your system does need such magic, consider upgrading +to reasonably modern POSIX-compliant tools rather than asking for +autoconf-style workarounds. + +As far as mandoc is using any features not mandated by ANSI X3.159-1989 +("ANSI C") or IEEE Std 1003.1-2008 ("POSIX") that some modern systems +do not have, we intend to provide autoconfiguration tests and +compat_*.c implementations. Please report any that turn out to be +missing. Note that while we do strive to produce portable code, +we do not slavishly restrict ourselves to POSIX-only interfaces. +For improved security and readability, we do use well-designed, +modern interfaces like reallocarray(3) even if they are still rather +uncommon, of course bundling compat_*.c implementations as needed. + +Where mandoc is using ANSI C or POSIX features that some systems +still lack and that compat_*.c implementations can be provided for +without too much hassle, we will consider adding them, too, so +please report whatever is missing on your platform. + +The following steps can be used to manually check the automatic +configuration on your platform: + +1. Run "make distclean". + +2. Run "./configure" + +3. Read the file "config.log". It shows the compiler commands used +to test the libraries installed on your system and the standard +output and standard error output these commands produce. Watch out +for unexpected failures. Those are most likely to happen if headers +or libraries are installed in unusual places or interfaces defined +in unusual headers. You can also look at the file "config.h" and +check that no "#define HAVE_*" differ from your expectations. Copied: vendor/mdocml/20170608/LICENSE (from r319715, vendor/mdocml/dist/LICENSE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20170608/LICENSE Thu Jun 8 19:30:47 2017 (r319716, copy of r319715, vendor/mdocml/dist/LICENSE) @@ -0,0 +1,54 @@ +$Id: LICENSE,v 1.15 2017/02/21 00:37:03 schwarze Exp $ + +With the exceptions noted below, all code and documentation +contained in the mdocml toolkit is protected by the Copyright +of the following developers: + +Copyright (c) 2008-2012, 2014 Kristaps Dzonsons +Copyright (c) 2010-2017 Ingo Schwarze +Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger +Copyright (c) 2013 Franco Fichtner +Copyright (c) 2014 Baptiste Daroussin +Copyright (c) 2016 Ed Maste +Copyright (c) 2017 Michael Stapelberg +Copyright (c) 1999, 2004 Marc Espie +Copyright (c) 1998, 2004, 2010 Todd C. Miller +Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2004 Ted Unangst +Copyright (c) 1994 Christos Zoulas +Copyright (c) 2003, 2007, 2008, 2014 Jason McIntyre + +See the individual source files for information about who contributed +to which file during which years. + + +The mdocml distribution as a whole is distributed by its developers +under the following license: + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +The following files included from outside sources are protected by +other people's Copyright and are distributed under various 2-clause +and 3-clause BSD licenses; see these individual files for details. + +soelim.c, soelim.1: +Copyright (c) 2014 Baptiste Daroussin + +compat_err.c, compat_fts.c, compat_fts.h, +compat_getsubopt.c, compat_strcasestr.c, compat_strsep.c, +man.1: +Copyright (c) 1989,1990,1993,1994 The Regents of the University of California + +compat_stringlist.c, compat_stringlist.h: +Copyright (c) 1994 Christos Zoulas Copied: vendor/mdocml/20170608/Makefile (from r319715, vendor/mdocml/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20170608/Makefile Thu Jun 8 19:30:47 2017 (r319716, copy of r319715, vendor/mdocml/dist/Makefile) @@ -0,0 +1,575 @@ +# $Id: Makefile,v 1.512 2017/05/07 17:31:45 schwarze Exp $ +# +# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons +# Copyright (c) 2011, 2013-2017 Ingo Schwarze +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +VERSION = 1.14.1 + +# === LIST OF FILES ==================================================== + +TESTSRCS = test-be32toh.c \ + test-cmsg.c \ + test-dirent-namlen.c \ + test-EFTYPE.c \ + test-err.c \ + test-fts.c \ + test-getline.c \ + test-getsubopt.c \ + test-isblank.c \ + test-mkdtemp.c \ + test-nanosleep.c \ + test-ntohl.c \ + test-O_DIRECTORY.c \ + test-ohash.c \ + test-PATH_MAX.c \ + test-pledge.c \ + test-progname.c \ + test-recvmsg.c \ + test-reallocarray.c \ + test-rewb-bsd.c \ + test-rewb-sysv.c \ + test-sandbox_init.c \ + test-strcasestr.c \ + test-stringlist.c \ + test-strlcat.c \ + test-strlcpy.c \ + test-strptime.c \ + test-strsep.c \ + test-strtonum.c \ + test-vasprintf.c \ + test-wchar.c + +SRCS = att.c \ + catman.c \ + cgi.c \ + chars.c \ + compat_err.c \ + compat_fts.c \ + compat_getline.c \ + compat_getsubopt.c \ + compat_isblank.c \ + compat_mkdtemp.c \ + compat_ohash.c \ + compat_progname.c \ + compat_reallocarray.c \ + compat_strcasestr.c \ + compat_stringlist.c \ + compat_strlcat.c \ + compat_strlcpy.c \ + compat_strsep.c \ + compat_strtonum.c \ + compat_vasprintf.c \ + dba.c \ + dba_array.c \ + dba_read.c \ + dba_write.c \ + dbm.c \ + dbm_map.c \ + demandoc.c \ + eqn.c \ + eqn_html.c \ + eqn_term.c \ + html.c \ + lib.c \ + main.c \ + man.c \ + man_html.c \ + man_macro.c \ + man_term.c \ + man_validate.c \ + mandoc.c \ + mandoc_aux.c \ + mandoc_ohash.c \ + mandocd.c \ + mandocdb.c \ + manpath.c \ + mansearch.c \ + mdoc.c \ + mdoc_argv.c \ + mdoc_html.c \ + mdoc_macro.c \ + mdoc_man.c \ + mdoc_markdown.c \ + mdoc_state.c \ + mdoc_term.c \ + mdoc_validate.c \ + msec.c \ + out.c \ + preconv.c \ + read.c \ + roff.c \ + roff_html.c \ + roff_term.c \ + roff_validate.c \ + soelim.c \ + st.c \ + tag.c \ + tbl.c \ + tbl_data.c \ + tbl_html.c \ + tbl_layout.c \ + tbl_opts.c \ + tbl_term.c \ + term.c \ + term_ascii.c \ + term_ps.c \ + term_tab.c \ + tree.c + +DISTFILES = INSTALL \ + LICENSE \ + Makefile \ + Makefile.depend \ + NEWS \ + TODO \ + apropos.1 \ + catman.8 \ + cgi.h.example \ + compat_fts.h \ + compat_ohash.h \ + compat_stringlist.h \ + configure \ + configure.local.example \ + dba.h \ + dba_array.h \ + dba_write.h \ + dbm.h \ + dbm_map.h \ + demandoc.1 \ + eqn.7 \ + gmdiff \ + html.h \ + lib.in \ + libman.h \ + libmandoc.h \ + libmdoc.h \ + libroff.h \ + main.h \ + makewhatis.8 \ + man.1 \ + man.7 \ + man.cgi.3 \ + man.cgi.8 \ + man.conf.5 \ + man.h \ + man.options.1 \ + manconf.h \ + mandoc.1 \ + mandoc.3 \ + mandoc.css \ + mandoc.db.5 \ + mandoc.h \ + mandoc_aux.h \ + mandoc_char.7 \ + mandoc_escape.3 \ + mandoc_headers.3 \ + mandoc_html.3 \ + mandoc_malloc.3 \ + mandoc_ohash.h \ + mandocd.8 \ + mansearch.3 \ + mansearch.h \ + mchars_alloc.3 \ + mdoc.7 \ + mdoc.h \ + msec.in \ + out.h \ + predefs.in \ + roff.7 \ + roff.h \ + roff_int.h \ + soelim.1 \ + st.in \ + tag.h \ + tbl.3 \ + tbl.7 \ + term.h \ + $(SRCS) \ + $(TESTSRCS) + +LIBMAN_OBJS = man.o \ + man_macro.o \ + man_validate.o + +LIBMDOC_OBJS = att.o \ + lib.o \ + mdoc.o \ + mdoc_argv.o \ + mdoc_macro.o \ + mdoc_state.o \ + mdoc_validate.o \ + st.o + +LIBROFF_OBJS = eqn.o \ + roff.o \ + roff_validate.o \ + tbl.o \ + tbl_data.o \ + tbl_layout.o \ + tbl_opts.o + +LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ + $(LIBMDOC_OBJS) \ + $(LIBROFF_OBJS) \ + chars.o \ + mandoc.o \ + mandoc_aux.o \ + mandoc_ohash.o \ + msec.o \ + preconv.o \ + read.o + +COMPAT_OBJS = compat_err.o \ + compat_fts.o \ + compat_getline.o \ + compat_getsubopt.o \ + compat_isblank.o \ + compat_mkdtemp.o \ + compat_ohash.o \ + compat_progname.o \ + compat_reallocarray.o \ + compat_strcasestr.o \ + compat_strlcat.o \ + compat_strlcpy.o \ + compat_strsep.o \ + compat_strtonum.o \ + compat_vasprintf.o + +MANDOC_HTML_OBJS = eqn_html.o \ + html.o \ + man_html.o \ + mdoc_html.o \ + roff_html.o \ + tbl_html.o + +MANDOC_TERM_OBJS = eqn_term.o \ + man_term.o \ + mdoc_term.o \ + roff_term.o \ + term.o \ + term_ascii.o \ + term_ps.o \ + term_tab.o \ + tbl_term.o + +DBM_OBJS = dbm.o \ + dbm_map.o \ + mansearch.o + +DBA_OBJS = dba.o \ + dba_array.o \ + dba_read.o \ + dba_write.o \ + mandocdb.o + +MAIN_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_MAN_OBJS) \ + $(MANDOC_TERM_OBJS) \ + $(DBM_OBJS) \ + $(DBA_OBJS) \ + main.o \ + manpath.o \ + mdoc_man.o \ + mdoc_markdown.o \ + out.o \ + tag.o \ + tree.o + +CGI_OBJS = $(MANDOC_HTML_OBJS) \ + $(DBM_OBJS) \ + cgi.o \ + out.o + +MANDOCD_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_TERM_OBJS) \ + mandocd.o \ + out.o \ + tag.o + +DEMANDOC_OBJS = demandoc.o + +SOELIM_OBJS = soelim.o \ + compat_err.o \ + compat_getline.o \ + compat_progname.o \ + compat_reallocarray.o \ + compat_stringlist.o + +WWW_MANS = apropos.1.html \ + demandoc.1.html \ + man.1.html \ + mandoc.1.html \ + soelim.1.html \ + man.cgi.3.html \ + mandoc.3.html \ + mandoc_escape.3.html \ + mandoc_headers.3.html \ + mandoc_html.3.html \ + mandoc_malloc.3.html \ + mansearch.3.html \ + mchars_alloc.3.html \ + tbl.3.html \ + man.conf.5.html \ + mandoc.db.5.html \ + eqn.7.html \ + man.7.html \ + mandoc_char.7.html \ + mandocd.8.html \ + mdoc.7.html \ + roff.7.html \ + tbl.7.html \ + catman.8.html \ + makewhatis.8.html \ + man.cgi.8.html \ + man.h.html \ + manconf.h.html \ + mandoc.h.html \ + mandoc_aux.h.html \ + mansearch.h.html \ + mdoc.h.html \ + roff.h.html + +WWW_OBJS = mdocml.tar.gz \ + mdocml.sha256 + +# === USER CONFIGURATION =============================================== + +include Makefile.local + +# === DEPENDENCY HANDLING ============================================== + +all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local + +install: base-install $(INSTALL_TARGETS) + +www: $(WWW_OBJS) $(WWW_MANS) + +$(WWW_MANS): mandoc + +.PHONY: base-install cgi-install install www-install +.PHONY: clean distclean depend + +include Makefile.depend + +# === TARGETS CONTAINING SHELL COMMANDS ================================ + +distclean: clean + rm -f Makefile.local config.h config.h.old config.log config.log.old + +clean: + rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) + rm -f mandoc $(MAIN_OBJS) + rm -f man.cgi $(CGI_OBJS) + rm -f mandocd catman $(MANDOCD_OBJS) + rm -f demandoc $(DEMANDOC_OBJS) + rm -f soelim $(SOELIM_OBJS) + rm -f $(WWW_MANS) $(WWW_OBJS) + rm -rf *.dSYM + +base-install: mandoc demandoc soelim + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man1 + mkdir -p $(DESTDIR)$(MANDIR)/man5 + mkdir -p $(DESTDIR)$(MANDIR)/man7 + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS) + cd $(DESTDIR)$(SBINDIR) && \ + $(LN) ${BIN_FROM_SBIN}/mandoc $(BINM_MAKEWHATIS) + $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 + $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1 + $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 + $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 + $(INSTALL_MAN) makewhatis.8 \ + $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + +lib-install: libmandoc.a + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(INCLUDEDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) + $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \ + $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ + mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 + +cgi-install: man.cgi + mkdir -p $(DESTDIR)$(CGIBINDIR) + mkdir -p $(DESTDIR)$(HTDOCDIR) + $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) + $(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR) + +catman-install: mandocd catman + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR) + $(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + $(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/mandoc + rm -f $(DESTDIR)$(BINDIR)/demandoc + rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 + rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi + rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css + rm -f $(DESTDIR)$(SBINDIR)/mandocd + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3 + rm -f $(DESTDIR)$(INCLUDEDIR)/man.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h + [ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR) + +regress: all + cd regress && ./regress.pl + +regress-clean: + cd regress && ./regress.pl . clean + +Makefile.local config.h: configure $(TESTSRCS) + @echo "$@ is out of date; please run ./configure" + @exit 1 + +libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) + ar rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) + +mandoc: $(MAIN_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD) + +man.cgi: $(CGI_OBJS) libmandoc.a + $(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD) + +mandocd: $(MANDOCD_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD) + +catman: catman.o libmandoc.a + $(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD) + +demandoc: $(DEMANDOC_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD) + +soelim: $(SOELIM_OBJS) + $(CC) -o $@ $(LDFLAGS) $(SOELIM_OBJS) + +# --- maintainer targets --- + +www-install: www + mkdir -p $(HTDOCDIR)/snapshots + $(INSTALL_DATA) $(WWW_MANS) mandoc.css $(HTDOCDIR) + $(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots + $(INSTALL_DATA) mdocml.tar.gz \ + $(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz + $(INSTALL_DATA) mdocml.sha256 \ + $(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 + +depend: config.h + mkdep -f Makefile.depend $(CFLAGS) $(SRCS) + perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ + s|\\\n||g; s| +| |g; s| $$||mg; print;' \ + Makefile.depend > Makefile.tmp + mv Makefile.tmp Makefile.depend + +regress-distclean: + @find regress \ + -name '.#*' -o \ + -name '*.orig' -o \ + -name '*.rej' -o \ + -name '*.core' \ + -exec rm -i {} \; + +regress-distcheck: + @find regress ! -type d ! -type f + @find regress -type f \ + ! -path '*/CVS/*' \ + ! -name Makefile \ + ! -name Makefile.inc \ + ! -name '*.in' \ + ! -name '*.out_ascii' \ + ! -name '*.out_utf8' \ + ! -name '*.out_html' \ + ! -name '*.out_lint' \ + ! -path regress/regress.pl \ + ! -path regress/regress.pl.1 + +dist: mdocml.sha256 + +mdocml.sha256: mdocml.tar.gz + sha256 mdocml.tar.gz > $@ + +mdocml.tar.gz: $(DISTFILES) + ls regress/*/*/*.mandoc_* && exit 1 || true + mkdir -p .dist/mdocml-$(VERSION)/ + $(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION) + cp -pR regress .dist/mdocml-$(VERSION) + find .dist/mdocml-$(VERSION)/regress \ + -type d -name CVS -print0 | xargs -0 rm -rf + chmod 755 .dist/mdocml-$(VERSION)/configure + ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) + rm -rf .dist/ + +# === SUFFIX RULES ===================================================== + +.SUFFIXES: .1 .3 .5 .7 .8 .h +.SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html + +.h.h.html: + highlight -I $< > $@ + +.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc + ./mandoc -Thtml -Wall,stop \ + -Ostyle=mandoc.css,man=%N.%S.html,includes=%I.html $< > $@ Copied: vendor/mdocml/20170608/Makefile.depend (from r319715, vendor/mdocml/dist/Makefile.depend) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20170608/Makefile.depend Thu Jun 8 19:30:47 2017 (r319716, copy of r319715, vendor/mdocml/dist/Makefile.depend) @@ -0,0 +1,76 @@ +att.o: att.c config.h roff.h mdoc.h libmdoc.h +catman.o: catman.c config.h compat_fts.h +cgi.o: cgi.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mansearch.h cgi.h +chars.o: chars.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h libmandoc.h +compat_err.o: compat_err.c config.h +compat_fts.o: compat_fts.c config.h compat_fts.h +compat_getline.o: compat_getline.c config.h +compat_getsubopt.o: compat_getsubopt.c config.h +compat_isblank.o: compat_isblank.c config.h +compat_mkdtemp.o: compat_mkdtemp.c config.h +compat_ohash.o: compat_ohash.c config.h compat_ohash.h +compat_progname.o: compat_progname.c config.h +compat_reallocarray.o: compat_reallocarray.c config.h +compat_strcasestr.o: compat_strcasestr.c config.h +compat_stringlist.o: compat_stringlist.c config.h compat_stringlist.h +compat_strlcat.o: compat_strlcat.c config.h +compat_strlcpy.o: compat_strlcpy.c config.h +compat_strsep.o: compat_strsep.c config.h +compat_strtonum.o: compat_strtonum.c config.h +compat_vasprintf.o: compat_vasprintf.c config.h +dba.o: dba.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mansearch.h dba_write.h dba_array.h dba.h +dba_array.o: dba_array.c mandoc_aux.h dba_write.h dba_array.h +dba_read.o: dba_read.c mandoc_aux.h mansearch.h dba_array.h dba.h dbm.h +dba_write.o: dba_write.c config.h dba_write.h +dbm.o: dbm.c config.h mansearch.h dbm_map.h dbm.h +dbm_map.o: dbm_map.c config.h mansearch.h dbm_map.h dbm.h +demandoc.o: demandoc.c config.h roff.h man.h mdoc.h mandoc.h +eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h +eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h +html.o: html.c config.h mandoc_aux.h mandoc.h roff.h out.h html.h manconf.h main.h +lib.o: lib.c config.h roff.h mdoc.h libmdoc.h lib.in +main.o: main.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h tag.h main.h manconf.h mansearch.h +man.o: man.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h +man_html.o: man_html.c config.h mandoc_aux.h roff.h man.h out.h html.h main.h +man_macro.o: man_macro.c config.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h +man_term.o: man_term.c config.h mandoc_aux.h mandoc.h roff.h man.h out.h term.h main.h +man_validate.o: man_validate.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h +mandoc.o: mandoc.c config.h mandoc.h mandoc_aux.h libmandoc.h +mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h +mandoc_ohash.o: mandoc_ohash.c mandoc_aux.h mandoc_ohash.h compat_ohash.h +mandocd.o: mandocd.c config.h mandoc.h roff.h mdoc.h man.h main.h manconf.h +mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h dba_array.h dba.h +manpath.o: manpath.c config.h mandoc_aux.h manconf.h +mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h dbm.h +mdoc.o: mdoc.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_html.o: mdoc_html.c config.h mandoc_aux.h roff.h mdoc.h out.h html.h main.h +mdoc_macro.o: mdoc_macro.c config.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_man.o: mdoc_man.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h out.h main.h +mdoc_markdown.o: mdoc_markdown.c mandoc_aux.h mandoc.h roff.h mdoc.h main.h +mdoc_state.o: mdoc_state.c mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h +mdoc_term.o: mdoc_term.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h out.h term.h tag.h main.h +mdoc_validate.o: mdoc_validate.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +msec.o: msec.c config.h mandoc.h libmandoc.h msec.in +out.o: out.c config.h mandoc_aux.h mandoc.h out.h +preconv.o: preconv.c config.h mandoc.h libmandoc.h +read.o: read.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h libmandoc.h roff_int.h +roff.o: roff.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h roff.h libmandoc.h roff_int.h libroff.h predefs.in +roff_html.o: roff_html.c roff.h out.h html.h +roff_term.o: roff_term.c roff.h out.h term.h +roff_validate.o: roff_validate.c mandoc.h roff.h libmandoc.h roff_int.h +soelim.o: soelim.c config.h compat_stringlist.h +st.o: st.c config.h roff.h mdoc.h libmdoc.h st.in +tag.o: tag.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h tag.h +tbl.o: tbl.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_data.o: tbl_data.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_html.o: tbl_html.c config.h mandoc.h out.h html.h +tbl_layout.o: tbl_layout.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_opts.o: tbl_opts.c config.h mandoc.h libmandoc.h libroff.h +tbl_term.o: tbl_term.c config.h mandoc.h out.h term.h +term.o: term.c config.h mandoc.h mandoc_aux.h out.h term.h main.h +term_ascii.o: term_ascii.c config.h mandoc.h mandoc_aux.h out.h term.h manconf.h main.h +term_ps.o: term_ps.c config.h mandoc_aux.h out.h term.h manconf.h main.h +term_tab.o: term_tab.c mandoc_aux.h out.h term.h +tree.o: tree.c config.h mandoc.h roff.h mdoc.h man.h main.h Copied: vendor/mdocml/20170608/NEWS (from r319715, vendor/mdocml/dist/NEWS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20170608/NEWS Thu Jun 8 19:30:47 2017 (r319716, copy of r319715, vendor/mdocml/dist/NEWS) @@ -0,0 +1,892 @@ +$Id: NEWS,v 1.21 2017/02/21 00:37:03 schwarze Exp $ + +This file lists the most important changes in the mdocml.bsd.lv distribution. + +Changes in version 1.14.1, released on February 21, 2017 + + --- MAJOR NEW FEATURES --- + * apropos(1): Reimplement complete semantic search functionality + without the dependency on SQLite3, using only POSIX APIs. + This comes with a completely new mandoc.db(5) file format. + * man(1): Support more than one tag entry for the same search term, + plus some minor improvements to the less(1) :t support. + * -Thtml: Use real macro names for CSS classes. + Systematic cleanup of and many improvements to mandoc.css. + * -Thtml: Produce human readable HTML code by using indentation + and better line breaks. Improve various HTML elements, + and trim several useless ones. + * New catman(8) utility, still somewhat experimental. + * Now includes a portable version of the OpenBSD mandoc regression + suite, see regress/regress.pl.1 for details. + --- REMOVED FUNCTIONALITY --- + * Operating systems that don't provide mmap(3) are no longer supported. + * Drop support for manpath(1). Even if your system has manpath(1), + it is simpler to use MANPATH_DEFAULT in configure.local for + operating system defaults, man.conf(5) for machine-specific + modifications, and ${MANPATH}, -m, and -M for user preferences + than to bother with the complexity of manpath(1). + * makewhatis(8) -p: No longer warn about missing MLINKS since these + are no longer needed for anything. + --- MINOR NEW FEATURES --- + * mdoc(7): Warn about invalid punctuation and content below NAME. + * mdoc(7): Warn about .Xr lacking the second argument (section). + * mdoc(7): Warn about violations of the rule "new sentence, new line". + * roff(7): Warn about trailing whitespace at the end of comments. + * mdoc(7): Improve rendering of double quotes. + * mdoc(7): Always do text production in the validator, never in the + formatters. Cleaner, simpler, shorter, helps NetBSD apropos(1) + and also makes -Ttree output more useful. + * -Ttree: Show metadata and some additional node flags. + New -Onoval output option to show the unvalidated tree. + --- RELIABILITY BUGFIXES --- + * man(1): Make "man -l" work with standard input from a pipe or file, + as long as standard output is a terminal. + * man(7): Fix out of bounds read access if a text node immediately + preceded the first .SH header. + * mdoc(7): Fix out of bounds read access for .Bl without a type + but with a width. + * mdoc(7): Fix out of bounds read access for .Bl -column starting + with a tab character instead of a child .It macro. + * mdoc(7): Fix syntax tree corruption leading to segfaults caused + by stray block end macros in nested blocks of mismatching type. + * man(1): Fix NULL dereference when the first of multiple pages + shown was preformatted. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + caused by partial implicit macros inside .Bl -column table cells. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + for macro sequences like .Bl .Bl .It Bo .El .It. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + caused by .Ta following a nested .Bl -column breaking another block. + * mdoc(7): Fix syntax tree corruption sometimes leading to NULL + dereference caused by indirectly broken .Nd or .Nm blocks. + * mdoc(7) -Thtml: Fix a NULL dereference for .Bl -column with 0 columns. + * mdoc(7): Fix NULL dereference in some specific cases of a + block-end macro calling another block-end macro. + * mdoc(7): Fix NULL dereference if the only child of the head + of the first .Sh was an empty in-line macro. + * eqn(7): Fix NULL dereference in the terminal formatter + for empty matrices and empty square roots. + * mdoc(7): Fix an assertion failure for a .Bd without a type that + breaks another block. + * mdoc(7): Fix an assertion failure that happened for some .Bl -column + lists containing a column width of "-4n", "-3n", or "-2n". + * mdoc(7): Fix an assertion failure caused by .Bl -column without .It + but containing eqn(7) or tbl(7) code. + * roff(7): Fix an assertion failure caused by \z\[u00FF] with -Tps/-Tpdf. + * roff(7): Fix an assertion failures caused by whitespace inside \o'' + (overstrike) sequences. + * -Thtml: Fix an assertion failure caused by -Oman or -Oincludes of + excessive length. + --- PORTABILITY IMPROVEMENTS --- + * man(1): Do not mix stdio narrow and wide stream orientation + on stdout, which could cause output corruption on glibc. + * mandoc(1): Autodetect a suitable locale for -Tutf8 mode. + * ./configure: Autodetect whether PATH_MAX and O_DIRECTORY are defined. + * ./configure: Autodetect if nanosleep(3) needs -lrt. + * ./configure: Provide an ${LN} configuration variable. + * ./configure: Put compiler arguments that may contain -l at the end. + --- MINOR BUGFIXES --- + * mdoc(7): Fix SYNOPSIS output if the first child of .Nm is a macro. + * mdoc(7) -Thtml: Improve formatting of .Bl -tag with short tags. + * man(7) -Thtml: Preserve whitespace in .nf (nofill) mode. + * mandoc(1): Error out on invalid output options on the command line. + --- STRUCTURAL CHANGES, no functional change --- + * Redesign part of the mandoc_html(3) interfaces, making them much + easier to use and reducing the amount of code by a few hundred lines. + --- THANKS TO --- + * Michael Stapelberg (Debian) for designing the new mandocd(8) + and parts of the new catman(8), for release testing, and for a + number of patches and bug reports. + * Baptiste Daroussin (FreeBSD) for profiling the new makewhatis(8) + implementation and suggesting an algorithmic improvement which + more than doubled performance, and for a few bug reports. + * Ed Maste (FreeBSD) for an important patch improving reproducibility + of builds in makewhatis(8), and for a few bug reports. + * Theo Buehler (OpenBSD) for almost twenty important bug reports, + most of them found by systematic afl(1) fuzzing. + * Benny Lofgren, David Dahlberg, and in particular Vadim Zhukov + for crucial help in getting .Bl -tag CSS formatting fixed. + * Svyatoslav Mishyn (Crux Linux) for an initial version of the + patch to autodetect a suitable locale for -Tutf8 mode + and for release testing. + * Jason McIntyre (OpenBSD) for multiple useful discussions + and a number of bug reports. + * Sevan Janiyan (NetBSD) for extensive release testing and multiple + bug reports. + * Thomas Klausner and Christos Zoulas (NetBSD), Yuri Pankov (illumos), + and Leah Neukirchen (Void Linux) for release testing and bug reports. + * Ulrich Spoerlein (FreeBSD) for release testing. + * Alexander Bluhm, Andrew Fresh, Antoine Jacoutot, Antony Bentley, + Christian Weisgerber, Jonathan Gray, Marc Espie, Martijn van Duren, + Stuart Henderson, Ted Unangst, Theo de Raadt (OpenBSD), Abhinav + Upadhyay, Kamil Rytarowski (NetBSD), Aaron M. Ucko, Bdale Garbee, + Reiner Herrmann, Shane Kerr (Debian), Daniel Sabogal (Alpine Linux), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Fri Jun 9 03:30:09 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E81ED89DB1; Fri, 9 Jun 2017 03:30:09 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 296477C1F8; Fri, 9 Jun 2017 03:30:09 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v593U8iH043093; Fri, 9 Jun 2017 03:30:08 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v593U8Yd043090; Fri, 9 Jun 2017 03:30:08 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201706090330.v593U8Yd043090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Fri, 9 Jun 2017 03:30:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319729 - in vendor/Juniper/libxo/dist: . doc libxo X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 03:30:09 -0000 Author: phil Date: Fri Jun 9 03:30:07 2017 New Revision: 319729 URL: https://svnweb.freebsd.org/changeset/base/319729 Log: Import libxo 0.8.1 Modified: vendor/Juniper/libxo/dist/configure.ac vendor/Juniper/libxo/dist/doc/libxo-manual.html vendor/Juniper/libxo/dist/libxo/libxo.c Modified: vendor/Juniper/libxo/dist/configure.ac ============================================================================== --- vendor/Juniper/libxo/dist/configure.ac Thu Jun 8 23:56:23 2017 (r319728) +++ vendor/Juniper/libxo/dist/configure.ac Fri Jun 9 03:30:07 2017 (r319729) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.8.0], [phil@juniper.net]) +AC_INIT([libxo], [0.8.1], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. Modified: vendor/Juniper/libxo/dist/doc/libxo-manual.html ============================================================================== --- vendor/Juniper/libxo/dist/doc/libxo-manual.html Thu Jun 8 23:56:23 2017 (r319728) +++ vendor/Juniper/libxo/dist/doc/libxo-manual.html Fri Jun 9 03:30:07 2017 (r319729) @@ -22011,7 +22011,7 @@ jQuery(function ($) { -June 3, 2017 +June 8, 2017

      libxo: The Easy Way to Generate text, XML, JSON, and HTML output
      libxo-manual

      Modified: vendor/Juniper/libxo/dist/libxo/libxo.c ============================================================================== --- vendor/Juniper/libxo/dist/libxo/libxo.c Thu Jun 8 23:56:23 2017 (r319728) +++ vendor/Juniper/libxo/dist/libxo/libxo.c Fri Jun 9 03:30:07 2017 (r319729) @@ -239,7 +239,6 @@ typedef uint8_t xo_color_t; #define XO_EFF_CLEAR_BITS XO_EFF_RESET /* Reset gets reset, surprisingly */ typedef uint8_t xo_effect_t; -typedef uint8_t xo_color_t; typedef struct xo_colors_s { xo_effect_t xoc_effects; /* Current effect set */ xo_color_t xoc_col_fg; /* Foreground color */ @@ -685,6 +684,7 @@ xo_default_init (void) #if !defined(NO_LIBXO_OPTIONS) if (!XOF_ISSET(xop, XOF_NO_ENV)) { char *env = getenv("LIBXO_OPTIONS"); + if (env) xo_set_options_simple(xop, env); @@ -1158,7 +1158,7 @@ xo_utf8_emit_len (wchar_t wc) } /* - * Emit a single wide character into the given buffer + * Emit one wide character into the given buffer */ static void xo_utf8_emit_char (char *buf, ssize_t len, wchar_t wc) @@ -1170,7 +1170,7 @@ xo_utf8_emit_char (char *buf, ssize_t len, wchar_t wc) return; } - /* Start with the low bits and insert them, six bits as a time */ + /* Start with the low bits and insert them, six bits at a time */ for (i = len - 1; i >= 0; i--) { buf[i] = 0x80 | (wc & 0x3f); wc >>= 6; /* Drop the low six bits */ @@ -1178,7 +1178,7 @@ xo_utf8_emit_char (char *buf, ssize_t len, wchar_t wc) /* Finish off the first byte with the length bits */ buf[0] &= xo_utf8_data_bits[len]; /* Clear out the length bits */ - buf[0] |= xo_utf8_len_bits[len]; /* Drop in new length bits */ + buf[0] |= xo_utf8_len_bits[len]; /* Drop in new length bits */ } /* @@ -1518,6 +1518,7 @@ xo_warn_hcv (xo_handle_t *xop, int code, int check_war newfmt[plen++] = ':'; newfmt[plen++] = ' '; } + memcpy(newfmt + plen, fmt, len); newfmt[len + plen] = '\0'; @@ -1537,6 +1538,7 @@ xo_warn_hcv (xo_handle_t *xop, int code, int check_war ssize_t left = xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); ssize_t rc = vsnprintf(xbp->xb_curp, left, newfmt, vap); + if (rc >= left) { if (!xo_buf_has_room(xbp, rc)) { va_end(va_local); @@ -1549,6 +1551,7 @@ xo_warn_hcv (xo_handle_t *xop, int code, int check_war left = xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); rc = vsnprintf(xbp->xb_curp, left, fmt, vap); } + va_end(va_local); rc = xo_escape_xml(xbp, rc, 1); @@ -1559,6 +1562,7 @@ xo_warn_hcv (xo_handle_t *xop, int code, int check_war if (code >= 0) { const char *msg = strerror(code); + if (msg) { xo_buf_append(xbp, ": ", 2); xo_buf_append(xbp, msg, strlen(msg)); @@ -1572,6 +1576,7 @@ xo_warn_hcv (xo_handle_t *xop, int code, int check_war vfprintf(stderr, newfmt, vap); if (code >= 0) { const char *msg = strerror(code); + if (msg) fprintf(stderr, ": %s", msg); } @@ -1688,6 +1693,7 @@ xo_message_hcv (xo_handle_t *xop, int code, const char va_copy(va_local, vap); ssize_t left = xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); + rc = vsnprintf(xbp->xb_curp, left, fmt, vap); if (rc >= left) { if (!xo_buf_has_room(xbp, rc)) { @@ -1701,6 +1707,7 @@ xo_message_hcv (xo_handle_t *xop, int code, const char left = xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); rc = vsnprintf(xbp->xb_curp, left, fmt, vap); } + va_end(va_local); rc = xo_escape_xml(xbp, rc, 0); @@ -1708,6 +1715,7 @@ xo_message_hcv (xo_handle_t *xop, int code, const char if (need_nl && code > 0) { const char *msg = strerror(code); + if (msg) { xo_buf_append(xbp, ": ", 2); xo_buf_append(xbp, msg, strlen(msg)); @@ -1741,6 +1749,7 @@ xo_message_hcv (xo_handle_t *xop, int code, const char va_copy(va_local, vap); rc = vsnprintf(bp, bufsiz, fmt, va_local); } + va_end(va_local); cp = bp + rc; @@ -1776,6 +1785,7 @@ xo_message_hcv (xo_handle_t *xop, int code, const char if (need_nl && code > 0) { const char *msg = strerror(code); + if (msg) { xo_printf(xop, ": %s", msg); } @@ -1790,6 +1800,7 @@ xo_message_hcv (xo_handle_t *xop, int code, const char case XO_STYLE_HTML: if (XOIF_ISSET(xop, XOIF_DIV_OPEN)) { static char div_close[] = ""; + XOIF_CLEAR(xop, XOIF_DIV_OPEN); xo_data_append(xop, div_close, sizeof(div_close) - 1); @@ -2158,6 +2169,7 @@ xo_set_style_name (xo_handle_t *xop, const char *name) return -1; int style = xo_name_to_style(name); + if (style < 0) return -1; From owner-svn-src-vendor@freebsd.org Fri Jun 9 03:30:41 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9705CD89E02; Fri, 9 Jun 2017 03:30:41 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E6247C330; Fri, 9 Jun 2017 03:30:41 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v593UeEx043154; Fri, 9 Jun 2017 03:30:40 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v593Uenq043153; Fri, 9 Jun 2017 03:30:40 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201706090330.v593Uenq043153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Fri, 9 Jun 2017 03:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319730 - vendor/Juniper/libxo/0.8.1 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 03:30:41 -0000 Author: phil Date: Fri Jun 9 03:30:40 2017 New Revision: 319730 URL: https://svnweb.freebsd.org/changeset/base/319730 Log: Tag libxo 0.8.1 Added: - copied from r319729, vendor/Juniper/libxo/dist/ Directory Properties: vendor/Juniper/libxo/0.8.1/ (props changed) From owner-svn-src-vendor@freebsd.org Fri Jun 9 03:34:39 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0365D8A02F; Fri, 9 Jun 2017 03:34:39 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80D237C801; Fri, 9 Jun 2017 03:34:39 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v593YcGV047128; Fri, 9 Jun 2017 03:34:38 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v593YcnR047127; Fri, 9 Jun 2017 03:34:38 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201706090334.v593YcnR047127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Fri, 9 Jun 2017 03:34:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319732 - vendor/Juniper/libxo X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 03:34:39 -0000 Author: phil Date: Fri Jun 9 03:34:38 2017 New Revision: 319732 URL: https://svnweb.freebsd.org/changeset/base/319732 Log: Fix import.sh w/ new $BUILDWORLD Submitted by: phil Modified: vendor/Juniper/libxo/import.sh Modified: vendor/Juniper/libxo/import.sh ============================================================================== --- vendor/Juniper/libxo/import.sh Fri Jun 9 03:32:49 2017 (r319731) +++ vendor/Juniper/libxo/import.sh Fri Jun 9 03:34:38 2017 (r319732) @@ -14,6 +14,8 @@ PROJECT=libxo +BUILDWORLD="make -j8 buildworld -DWITH_META_MODE -DNO_CLEAN -DWITHOUT_TESTS" + #"global" vars # Set SVN variables # select the local subversion site @@ -148,6 +150,7 @@ fi info "CWD = $CWD" info "VENDOR_DIR = $VENDOR_DIR" info "VERS = $VERS" +info "BUILDWORLD = $BUILDWORLD" DATESTAMP=`date "+%Y-%m-%d-%H-%M"` [ -z "$VERS" ] && Error "missing version argument (-v)" @@ -158,7 +161,7 @@ Cd $HEAD run "updating all" "svn update" if [ ! -z "$UPDATE" ]; then - run "building the entire world" "script $MAKEOBJDIRPREFIX/out.$DATESTAMP.before make -DNO_CLEAN MK_TESTS=no buildworld" + run "building the entire world" "script $MAKEOBJDIRPREFIX/out.$DATESTAMP.before $BUILDWORLD" fi Cd $CWD @@ -299,7 +302,7 @@ run "copying add.man" "(echo '.\\\" \$FreeBSD\$' ; cat #run "making build dir '$dir'" "make LIBXOSRC=$CWD/dist" #done -run "building the entire world" "script $MAKEOBJDIRPREFIX/out.$DATESTAMP make -DNO_CLEAN MK_TESTS=no buildworld LIBXOSRC=$CWD/dist" +run "building the entire world" "script $MAKEOBJDIRPREFIX/out.$DATESTAMP $BUILDWORLD LIBXOSRC=$CWD/dist" # Okay, so now it all builds!! Now we can start committing.... From owner-svn-src-vendor@freebsd.org Fri Jun 9 14:55:13 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EE1ABF670B; Fri, 9 Jun 2017 14:55:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69A346EB15; Fri, 9 Jun 2017 14:55:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v59EtCAB026868; Fri, 9 Jun 2017 14:55:12 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v59EtC5Q026867; Fri, 9 Jun 2017 14:55:12 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706091455.v59EtC5Q026867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 9 Jun 2017 14:55:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319736 - in vendor-sys/illumos/dist/uts/common: . sys/sysevent X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 14:55:13 -0000 Author: avg Date: Fri Jun 9 14:55:12 2017 New Revision: 319736 URL: https://svnweb.freebsd.org/changeset/base/319736 Log: 6396 remove SVM illumos/illumos-gate@5f10ef697f250374b7b917e10961c4e02d4e3112 https://github.com/illumos/illumos-gate/commit/5f10ef697f250374b7b917e10961c4e02d4e3112 https://www.illumos.org/issues/6396 LVM = SVM = Solaris Volume Manager dead code and not using with ZFS based platform. Reviewed by: Igor Kozhukhov Reviewed by: Toomas Soome Approved by: Hans Rosenfeld Author: Yuri Pankov Modified: vendor-sys/illumos/dist/uts/common/Makefile.files vendor-sys/illumos/dist/uts/common/sys/sysevent/eventdefs.h Modified: vendor-sys/illumos/dist/uts/common/Makefile.files ============================================================================== --- vendor-sys/illumos/dist/uts/common/Makefile.files Fri Jun 9 12:06:22 2017 (r319735) +++ vendor-sys/illumos/dist/uts/common/Makefile.files Fri Jun 9 14:55:12 2017 (r319736) @@ -1308,30 +1308,6 @@ SMBFS_OBJS += smbfs_vfsops.o smbfs_vnops.o smbfs_node. $(SMBFS_COMMON_OBJS) -# -# LVM modules -# -MD_OBJS += md.o md_error.o md_ioctl.o md_mddb.o md_names.o \ - md_med.o md_rename.o md_subr.o - -MD_COMMON_OBJS = md_convert.o md_crc.o md_revchk.o - -MD_DERIVED_OBJS = metamed_xdr.o meta_basic_xdr.o - -SOFTPART_OBJS += sp.o sp_ioctl.o - -STRIPE_OBJS += stripe.o stripe_ioctl.o - -HOTSPARES_OBJS += hotspares.o - -RAID_OBJS += raid.o raid_ioctl.o raid_replay.o raid_resync.o raid_hotspare.o - -MIRROR_OBJS += mirror.o mirror_ioctl.o mirror_resync.o - -NOTIFY_OBJS += md_notify.o - -TRANS_OBJS += mdtrans.o trans_ioctl.o trans_log.o - ZFS_COMMON_OBJS += \ abd.o \ arc.o \ Modified: vendor-sys/illumos/dist/uts/common/sys/sysevent/eventdefs.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/sysevent/eventdefs.h Fri Jun 9 12:06:22 2017 (r319735) +++ vendor-sys/illumos/dist/uts/common/sys/sysevent/eventdefs.h Fri Jun 9 14:55:12 2017 (r319736) @@ -18,9 +18,10 @@ * * CDDL HEADER END */ + /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + * Copyright 2016 Nexenta Systems, Inc. */ #ifndef _SYS_SYSEVENT_EVENTDEFS_H @@ -59,67 +60,6 @@ extern "C" { * by Sun Cluster software. */ #define EC_CLUSTER "EC_Cluster" - -/* - * The following classes are exclusively reserved for use by the - * Solaris Volume Manager (SVM) - */ -#define EC_SVM_CONFIG "EC_SVM_Config" -#define EC_SVM_STATE "EC_SVM_State" - -/* - * EC_SVM_CONFIG subclass definitions - supporting attributes (name/value pairs) - * are found in sys/sysevent/svm.h - */ -#define ESC_SVM_CREATE "ESC_SVM_Create" -#define ESC_SVM_DELETE "ESC_SVM_Delete" -#define ESC_SVM_ADD "ESC_SVM_Add" -#define ESC_SVM_REMOVE "ESC_SVM_Remove" -#define ESC_SVM_REPLACE "ESC_SVM_Replace" -#define ESC_SVM_GROW "ESC_SVM_Grow" -#define ESC_SVM_RENAME_SRC "ESC_SVM_Rename_Src" -#define ESC_SVM_RENAME_DST "ESC_SVM_Rename_Dst" -#define ESC_SVM_MEDIATOR_ADD "ESC_SVM_Mediator_Add" -#define ESC_SVM_MEDIATOR_DELETE "ESC_SVM_Mediator_Delete" -#define ESC_SVM_HOST_ADD "ESC_SVM_Host_Add" -#define ESC_SVM_HOST_DELETE "ESC_SVM_Host_Delete" -#define ESC_SVM_DRIVE_ADD "ESC_SVM_Drive_Add" -#define ESC_SVM_DRIVE_DELETE "ESC_SVM_Drive_Delete" -#define ESC_SVM_DETACH "ESC_SVM_Detach" -#define ESC_SVM_DETACHING "ESC_SVM_Detaching" -#define ESC_SVM_ATTACH "ESC_SVM_Attach" -#define ESC_SVM_ATTACHING "ESC_SVM_Attaching" - -/* - * EC_SVM_STATE subclass definitions - supporting attributes (name/value pairs) - * are found in sys/sysevent/svm.h - */ -#define ESC_SVM_INIT_START "ESC_SVM_Init_Start" -#define ESC_SVM_INIT_FAILED "ESC_SVM_Init_Failed" -#define ESC_SVM_INIT_FATAL "ESC_SVM_Init_Fatal" -#define ESC_SVM_INIT_SUCCESS "ESC_SVM_Init_Success" -#define ESC_SVM_IOERR "ESC_SVM_Ioerr" -#define ESC_SVM_ERRED "ESC_SVM_Erred" -#define ESC_SVM_LASTERRED "ESC_SVM_Lasterred" -#define ESC_SVM_OK "ESC_SVM_Ok" -#define ESC_SVM_ENABLE "ESC_SVM_Enable" -#define ESC_SVM_RESYNC_START "ESC_SVM_Resync_Start" -#define ESC_SVM_RESYNC_FAILED "ESC_SVM_Resync_Failed" -#define ESC_SVM_RESYNC_SUCCESS "ESC_SVM_Resync_Success" -#define ESC_SVM_RESYNC_DONE "ESC_SVM_Resync_Done" -#define ESC_SVM_HOTSPARED "ESC_SVM_Hotspared" -#define ESC_SVM_HS_FREED "ESC_SVM_HS_Freed" -#define ESC_SVM_HS_CHANGED "ESC_SVM_HS_Changed" -#define ESC_SVM_TAKEOVER "ESC_SVM_Takeover" -#define ESC_SVM_RELEASE "ESC_SVM_Release" -#define ESC_SVM_OPEN_FAIL "ESC_SVM_Open_Fail" -#define ESC_SVM_OFFLINE "ESC_SVM_Offline" -#define ESC_SVM_ONLINE "ESC_SVM_Online" -#define ESC_SVM_CHANGE "ESC_SVM_Change" -#define ESC_SVM_EXCHANGE "ESC_SVM_Exchange" -#define ESC_SVM_REGEN_START "ESC_SVM_Regen_Start" -#define ESC_SVM_REGEN_DONE "ESC_SVM_Regen_Done" -#define ESC_SVM_REGEN_FAILED "ESC_SVM_Regen_Failed" /* * EC_DR subclass definitions - supporting attributes (name/value pairs) From owner-svn-src-vendor@freebsd.org Fri Jun 9 14:56:19 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7277BF6771; Fri, 9 Jun 2017 14:56:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A23FE6EC35; Fri, 9 Jun 2017 14:56:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v59EuI86026951; Fri, 9 Jun 2017 14:56:18 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v59EuIj6026942; Fri, 9 Jun 2017 14:56:18 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706091456.v59EuIj6026942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 9 Jun 2017 14:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319737 - in vendor-sys/illumos/dist/uts/common: fs/zfs fs/zfs/sys sys/fs sys/sysevent X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 14:56:19 -0000 Author: avg Date: Fri Jun 9 14:56:17 2017 New Revision: 319737 URL: https://svnweb.freebsd.org/changeset/base/319737 Log: 6939 add sysevents to zfs core for commands illumos/illumos-gate@ce1577b04976f1d8bb5f235b6eaaab15b46a3068 https://github.com/illumos/illumos-gate/commit/ce1577b04976f1d8bb5f235b6eaaab15b46a3068 https://www.illumos.org/issues/6939 Originally created https://smartos.org/bugview/OS-4489 sysevents should be fired in the kernel from ZFS whenever a command is run that is logged in zpool history. Example output Terminal 1 root - gz sunos ~ # zfs create zones/foobar root - gz sunos ~ # zfs set quota=10g zones/foobar root - gz sunos ~ # zfs destroy zones/foobar Terminal 2 root - gz sunos ~ # sysevent EC_zfs nvlist version: 0 date = 2016-04-28T14:50:08.964Z vendor = SUNW publisher = zfs class = EC_zfs subclass = ESC_ZFS_history_event pid = 0 data = (embedded nvlist) nvlist version: 0 pool_name = zones pool_guid = 0x40c964e8f9a7a694 history_record = (embedded nvlist) nvlist version: 0 dsname = zones/foobar dsid = 0x1525 history internal str = internal_name = create history txg = 0x4c4ef3 Reviewed by: Patrick Mooney Reviewed by: Joshua M. Clulow Reviewed by: Josh Wilsdon Reviewed by: Matthew Ahrens Reviewed by: George Wilson Reviewed by: Richard Elling Reviewed by: Alan Somers Reviewed by: Andrew Stormont Approved by: Matthew Ahrens Author: Dave Eddy Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_config.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h vendor-sys/illumos/dist/uts/common/sys/sysevent/eventdefs.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Fri Jun 9 14:55:12 2017 (r319736) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Fri Jun 9 14:56:17 2017 (r319737) @@ -22,6 +22,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2016 Gary Mills * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright 2017 Joyent, Inc. */ #include @@ -214,9 +215,10 @@ dsl_scan_setup_sync(void *arg, dmu_tx_t *tx) if (vdev_resilver_needed(spa->spa_root_vdev, &scn->scn_phys.scn_min_txg, &scn->scn_phys.scn_max_txg)) { - spa_event_notify(spa, NULL, ESC_ZFS_RESILVER_START); + spa_event_notify(spa, NULL, NULL, + ESC_ZFS_RESILVER_START); } else { - spa_event_notify(spa, NULL, ESC_ZFS_SCRUB_START); + spa_event_notify(spa, NULL, NULL, ESC_ZFS_SCRUB_START); } spa->spa_scrub_started = B_TRUE; @@ -323,7 +325,8 @@ dsl_scan_done(dsl_scan_t *scn, boolean_t complete, dmu vdev_dtl_reassess(spa->spa_root_vdev, tx->tx_txg, complete ? scn->scn_phys.scn_max_txg : 0, B_TRUE); if (complete) { - spa_event_notify(spa, NULL, scn->scn_phys.scn_min_txg ? + spa_event_notify(spa, NULL, NULL, + scn->scn_phys.scn_min_txg ? ESC_ZFS_RESILVER_FINISH : ESC_ZFS_SCRUB_FINISH); } spa_errlog_rotate(spa); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Fri Jun 9 14:55:12 2017 (r319736) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Fri Jun 9 14:56:17 2017 (r319737) @@ -27,6 +27,7 @@ * Copyright 2013 Saso Kiselkov. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2016 Toomas Soome + * Copyright 2017 Joyent, Inc. */ /* @@ -141,7 +142,8 @@ const zio_taskq_info_t zio_taskqs[ZIO_TYPES][ZIO_TASKQ { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* IOCTL */ }; -static sysevent_t *spa_event_create(spa_t *spa, vdev_t *vd, const char *name); +static sysevent_t *spa_event_create(spa_t *spa, vdev_t *vd, nvlist_t *hist_nvl, + const char *name); static void spa_event_post(sysevent_t *ev); static void spa_sync_version(void *arg, dmu_tx_t *tx); static void spa_sync_props(void *arg, dmu_tx_t *tx); @@ -783,7 +785,7 @@ spa_change_guid(spa_t *spa) if (error == 0) { spa_config_sync(spa, B_FALSE, B_TRUE); - spa_event_notify(spa, NULL, ESC_ZFS_POOL_REGUID); + spa_event_notify(spa, NULL, NULL, ESC_ZFS_POOL_REGUID); } mutex_exit(&spa_namespace_lock); @@ -1614,7 +1616,7 @@ spa_check_removed(vdev_t *vd) if (vd->vdev_ops->vdev_op_leaf && vdev_is_dead(vd) && !vd->vdev_ishole) { zfs_post_autoreplace(vd->vdev_spa, vd); - spa_event_notify(vd->vdev_spa, vd, ESC_ZFS_VDEV_CHECK); + spa_event_notify(vd->vdev_spa, vd, NULL, ESC_ZFS_VDEV_CHECK); } } @@ -3823,7 +3825,7 @@ spa_create(const char *pool, nvlist_t *nvroot, nvlist_ txg_wait_synced(spa->spa_dsl_pool, txg); spa_config_sync(spa, B_FALSE, B_TRUE); - spa_event_notify(spa, NULL, ESC_ZFS_POOL_CREATE); + spa_event_notify(spa, NULL, NULL, ESC_ZFS_POOL_CREATE); spa_history_log_version(spa, "create"); @@ -4090,7 +4092,7 @@ spa_import(const char *pool, nvlist_t *config, nvlist_ spa_configfile_set(spa, props, B_FALSE); spa_config_sync(spa, B_FALSE, B_TRUE); - spa_event_notify(spa, NULL, ESC_ZFS_POOL_IMPORT); + spa_event_notify(spa, NULL, NULL, ESC_ZFS_POOL_IMPORT); mutex_exit(&spa_namespace_lock); return (0); @@ -4223,7 +4225,7 @@ spa_import(const char *pool, nvlist_t *config, nvlist_ spa_history_log_version(spa, "import"); - spa_event_notify(spa, NULL, ESC_ZFS_POOL_IMPORT); + spa_event_notify(spa, NULL, NULL, ESC_ZFS_POOL_IMPORT); mutex_exit(&spa_namespace_lock); @@ -4412,7 +4414,7 @@ spa_export_common(char *pool, int new_state, nvlist_t } } - spa_event_notify(spa, NULL, ESC_ZFS_POOL_DESTROY); + spa_event_notify(spa, NULL, NULL, ESC_ZFS_POOL_DESTROY); if (spa->spa_state != POOL_STATE_UNINITIALIZED) { spa_unload(spa); @@ -4567,7 +4569,7 @@ spa_vdev_add(spa_t *spa, nvlist_t *nvroot) mutex_enter(&spa_namespace_lock); spa_config_update(spa, SPA_CONFIG_UPDATE_POOL); - spa_event_notify(spa, NULL, ESC_ZFS_VDEV_ADD); + spa_event_notify(spa, NULL, NULL, ESC_ZFS_VDEV_ADD); mutex_exit(&spa_namespace_lock); return (0); @@ -4743,7 +4745,7 @@ spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *n if (newvd->vdev_isspare) { spa_spare_activate(newvd); - spa_event_notify(spa, newvd, ESC_ZFS_VDEV_SPARE); + spa_event_notify(spa, newvd, NULL, ESC_ZFS_VDEV_SPARE); } oldvdpath = spa_strdup(oldvd->vdev_path); @@ -4763,9 +4765,9 @@ spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *n dsl_resilver_restart(spa->spa_dsl_pool, dtl_max_txg); if (spa->spa_bootfs) - spa_event_notify(spa, newvd, ESC_ZFS_BOOTFS_VDEV_ATTACH); + spa_event_notify(spa, newvd, NULL, ESC_ZFS_BOOTFS_VDEV_ATTACH); - spa_event_notify(spa, newvd, ESC_ZFS_VDEV_ATTACH); + spa_event_notify(spa, newvd, NULL, ESC_ZFS_VDEV_ATTACH); /* * Commit the config @@ -4979,7 +4981,7 @@ spa_vdev_detach(spa_t *spa, uint64_t guid, uint64_t pg vd->vdev_detached = B_TRUE; vdev_dirty(tvd, VDD_DTL, vd, txg); - spa_event_notify(spa, vd, ESC_ZFS_VDEV_REMOVE); + spa_event_notify(spa, vd, NULL, ESC_ZFS_VDEV_REMOVE); /* hang on to the spa before we release the lock */ spa_open_ref(spa, FTAG); @@ -5488,7 +5490,8 @@ spa_vdev_remove(spa_t *spa, uint64_t guid, boolean_t u if (vd == NULL || unspare) { if (vd == NULL) vd = spa_lookup_by_guid(spa, guid, B_TRUE); - ev = spa_event_create(spa, vd, ESC_ZFS_VDEV_REMOVE_AUX); + ev = spa_event_create(spa, vd, NULL, + ESC_ZFS_VDEV_REMOVE_AUX); spa_vdev_remove_aux(spa->spa_spares.sav_config, ZPOOL_CONFIG_SPARES, spares, nspares, nv); spa_load_spares(spa); @@ -5504,7 +5507,7 @@ spa_vdev_remove(spa_t *spa, uint64_t guid, boolean_t u * Cache devices can always be removed. */ vd = spa_lookup_by_guid(spa, guid, B_TRUE); - ev = spa_event_create(spa, vd, ESC_ZFS_VDEV_REMOVE_AUX); + ev = spa_event_create(spa, vd, NULL, ESC_ZFS_VDEV_REMOVE_AUX); spa_vdev_remove_aux(spa->spa_l2cache.sav_config, ZPOOL_CONFIG_L2CACHE, l2cache, nl2cache, nv); spa_load_l2cache(spa); @@ -5545,7 +5548,7 @@ spa_vdev_remove(spa_t *spa, uint64_t guid, boolean_t u /* * Clean up the vdev namespace. */ - ev = spa_event_create(spa, vd, ESC_ZFS_VDEV_REMOVE_DEV); + ev = spa_event_create(spa, vd, NULL, ESC_ZFS_VDEV_REMOVE_DEV); spa_vdev_remove_from_namespace(spa, vd); } else if (vd != NULL) { @@ -6949,7 +6952,7 @@ spa_has_active_shared_spare(spa_t *spa) } static sysevent_t * -spa_event_create(spa_t *spa, vdev_t *vd, const char *name) +spa_event_create(spa_t *spa, vdev_t *vd, nvlist_t *hist_nvl, const char *name) { sysevent_t *ev = NULL; #ifdef _KERNEL @@ -6986,6 +6989,10 @@ spa_event_create(spa_t *spa, vdev_t *vd, const char *n } } + if (hist_nvl != NULL) { + fnvlist_merge((nvlist_t *)attr, hist_nvl); + } + if (sysevent_attach_attributes(ev, attr) != 0) goto done; attr = NULL; @@ -7012,12 +7019,12 @@ spa_event_post(sysevent_t *ev) /* * Post a sysevent corresponding to the given event. The 'name' must be one of * the event definitions in sys/sysevent/eventdefs.h. The payload will be - * filled in from the spa and (optionally) the vdev. This doesn't do anything - * in the userland libzpool, as we don't want consumers to misinterpret ztest - * or zdb as real changes. + * filled in from the spa and (optionally) the vdev and history nvl. This + * doesn't do anything in the userland libzpool, as we don't want consumers to + * misinterpret ztest or zdb as real changes. */ void -spa_event_notify(spa_t *spa, vdev_t *vd, const char *name) +spa_event_notify(spa_t *spa, vdev_t *vd, nvlist_t *hist_nvl, const char *name) { - spa_event_post(spa_event_create(spa, vd, name)); + spa_event_post(spa_event_create(spa, vd, hist_nvl, name)); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa_config.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa_config.c Fri Jun 9 14:55:12 2017 (r319736) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa_config.c Fri Jun 9 14:56:17 2017 (r319737) @@ -23,6 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011, 2015 by Delphix. All rights reserved. + * Copyright 2017 Joyent, Inc. */ #include @@ -298,7 +299,7 @@ spa_config_sync(spa_t *target, boolean_t removing, boo spa_config_generation++; if (postsysevent) - spa_event_notify(target, NULL, ESC_ZFS_CONFIG_SYNC); + spa_event_notify(target, NULL, NULL, ESC_ZFS_CONFIG_SYNC); } /* Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c Fri Jun 9 14:55:12 2017 (r319736) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c Fri Jun 9 14:56:17 2017 (r319737) @@ -23,6 +23,7 @@ * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2017 Joyent, Inc. */ #include @@ -192,6 +193,71 @@ spa_history_zone(void) } /* + * Post a history sysevent. + * + * The nvlist_t* passed into this function will be transformed into a new + * nvlist where: + * + * 1. Nested nvlists will be flattened to a single level + * 2. Keys will have their names normalized (to remove any problematic + * characters, such as whitespace) + * + * The nvlist_t passed into this function will duplicated and should be freed + * by caller. + * + */ +static void +spa_history_log_notify(spa_t *spa, nvlist_t *nvl) +{ + nvlist_t *hist_nvl = fnvlist_alloc(); + uint64_t uint64; + char *string; + + if (nvlist_lookup_string(nvl, ZPOOL_HIST_CMD, &string) == 0) + fnvlist_add_string(hist_nvl, ZFS_EV_HIST_CMD, string); + + if (nvlist_lookup_string(nvl, ZPOOL_HIST_INT_NAME, &string) == 0) + fnvlist_add_string(hist_nvl, ZFS_EV_HIST_INT_NAME, string); + + if (nvlist_lookup_string(nvl, ZPOOL_HIST_ZONE, &string) == 0) + fnvlist_add_string(hist_nvl, ZFS_EV_HIST_ZONE, string); + + if (nvlist_lookup_string(nvl, ZPOOL_HIST_HOST, &string) == 0) + fnvlist_add_string(hist_nvl, ZFS_EV_HIST_HOST, string); + + if (nvlist_lookup_string(nvl, ZPOOL_HIST_DSNAME, &string) == 0) + fnvlist_add_string(hist_nvl, ZFS_EV_HIST_DSNAME, string); + + if (nvlist_lookup_string(nvl, ZPOOL_HIST_INT_STR, &string) == 0) + fnvlist_add_string(hist_nvl, ZFS_EV_HIST_INT_STR, string); + + if (nvlist_lookup_string(nvl, ZPOOL_HIST_IOCTL, &string) == 0) + fnvlist_add_string(hist_nvl, ZFS_EV_HIST_IOCTL, string); + + if (nvlist_lookup_string(nvl, ZPOOL_HIST_INT_NAME, &string) == 0) + fnvlist_add_string(hist_nvl, ZFS_EV_HIST_INT_NAME, string); + + if (nvlist_lookup_uint64(nvl, ZPOOL_HIST_DSID, &uint64) == 0) + fnvlist_add_uint64(hist_nvl, ZFS_EV_HIST_DSID, uint64); + + if (nvlist_lookup_uint64(nvl, ZPOOL_HIST_TXG, &uint64) == 0) + fnvlist_add_uint64(hist_nvl, ZFS_EV_HIST_TXG, uint64); + + if (nvlist_lookup_uint64(nvl, ZPOOL_HIST_TIME, &uint64) == 0) + fnvlist_add_uint64(hist_nvl, ZFS_EV_HIST_TIME, uint64); + + if (nvlist_lookup_uint64(nvl, ZPOOL_HIST_WHO, &uint64) == 0) + fnvlist_add_uint64(hist_nvl, ZFS_EV_HIST_WHO, uint64); + + if (nvlist_lookup_uint64(nvl, ZPOOL_HIST_INT_EVENT, &uint64) == 0) + fnvlist_add_uint64(hist_nvl, ZFS_EV_HIST_INT_EVENT, uint64); + + spa_event_notify(spa, NULL, hist_nvl, ESC_ZFS_HISTORY_EVENT); + + nvlist_free(hist_nvl); +} + +/* * Write out a history event. */ /*ARGSUSED*/ @@ -255,6 +321,22 @@ spa_history_log_sync(void *arg, dmu_tx_t *tx) fnvlist_lookup_string(nvl, ZPOOL_HIST_INT_NAME), fnvlist_lookup_string(nvl, ZPOOL_HIST_INT_STR)); } + /* + * The history sysevent is posted only for internal history + * messages to show what has happened, not how it happened. For + * example, the following command: + * + * # zfs destroy -r tank/foo + * + * will result in one sysevent posted per dataset that is + * destroyed as a result of the command - which could be more + * than one event in total. By contrast, if the sysevent was + * posted as a result of the ZPOOL_HIST_CMD key being present + * it would result in only one sysevent being posted with the + * full command line arguments, requiring the consumer to know + * how to parse and understand zfs(1M) command invocations. + */ + spa_history_log_notify(spa, nvl); } else if (nvlist_exists(nvl, ZPOOL_HIST_IOCTL)) { zfs_dbgmsg("ioctl %s", fnvlist_lookup_string(nvl, ZPOOL_HIST_IOCTL)); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h Fri Jun 9 14:55:12 2017 (r319736) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h Fri Jun 9 14:56:17 2017 (r319737) @@ -25,6 +25,7 @@ * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright 2013 Saso Kiselkov. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2017 Joyent, Inc. */ #ifndef _SYS_SPA_H @@ -876,7 +877,8 @@ extern void spa_prop_clear_bootfs(spa_t *spa, uint64_t extern void spa_configfile_set(spa_t *, nvlist_t *, boolean_t); /* asynchronous event notification */ -extern void spa_event_notify(spa_t *spa, vdev_t *vdev, const char *name); +extern void spa_event_notify(spa_t *spa, vdev_t *vdev, nvlist_t *hist_nvl, + const char *name); #ifdef ZFS_DEBUG #define dprintf_bp(bp, fmt, ...) do { \ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Fri Jun 9 14:55:12 2017 (r319736) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Fri Jun 9 14:56:17 2017 (r319737) @@ -25,6 +25,7 @@ * Copyright 2017 Nexenta Systems, Inc. * Copyright (c) 2014 Integros [integros.com] * Copyright 2016 Toomas Soome + * Copyright 2017 Joyent, Inc. */ #include @@ -2506,7 +2507,7 @@ vdev_online(spa_t *spa, uint64_t guid, uint64_t flags, if (wasoffline || (oldstate < VDEV_STATE_DEGRADED && vd->vdev_state >= VDEV_STATE_DEGRADED)) - spa_event_notify(spa, vd, ESC_ZFS_VDEV_ONLINE); + spa_event_notify(spa, vd, NULL, ESC_ZFS_VDEV_ONLINE); return (spa_vdev_state_exit(spa, vd, 0)); } @@ -2669,7 +2670,7 @@ vdev_clear(spa_t *spa, vdev_t *vd) if (vd->vdev_aux == NULL && !vdev_is_dead(vd)) spa_async_request(spa, SPA_ASYNC_RESILVER); - spa_event_notify(spa, vd, ESC_ZFS_VDEV_CLEAR); + spa_event_notify(spa, vd, NULL, ESC_ZFS_VDEV_CLEAR); } /* Modified: vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Fri Jun 9 14:55:12 2017 (r319736) +++ vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Fri Jun 9 14:56:17 2017 (r319737) @@ -23,8 +23,8 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2017 Joyent, Inc. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -956,11 +956,45 @@ typedef enum { * ZFS_EV_POOL_GUID DATA_TYPE_UINT64 * ZFS_EV_VDEV_PATH DATA_TYPE_STRING (optional) * ZFS_EV_VDEV_GUID DATA_TYPE_UINT64 + * + * ESC_ZFS_HISTORY_EVENT + * + * ZFS_EV_POOL_NAME DATA_TYPE_STRING + * ZFS_EV_POOL_GUID DATA_TYPE_UINT64 + * ZFS_EV_HIST_TIME DATA_TYPE_UINT64 (optional) + * ZFS_EV_HIST_CMD DATA_TYPE_STRING (optional) + * ZFS_EV_HIST_WHO DATA_TYPE_UINT64 (optional) + * ZFS_EV_HIST_ZONE DATA_TYPE_STRING (optional) + * ZFS_EV_HIST_HOST DATA_TYPE_STRING (optional) + * ZFS_EV_HIST_TXG DATA_TYPE_UINT64 (optional) + * ZFS_EV_HIST_INT_EVENT DATA_TYPE_UINT64 (optional) + * ZFS_EV_HIST_INT_STR DATA_TYPE_STRING (optional) + * ZFS_EV_HIST_INT_NAME DATA_TYPE_STRING (optional) + * ZFS_EV_HIST_IOCTL DATA_TYPE_STRING (optional) + * ZFS_EV_HIST_DSNAME DATA_TYPE_STRING (optional) + * ZFS_EV_HIST_DSID DATA_TYPE_UINT64 (optional) + * + * The ZFS_EV_HIST_* members will correspond to the ZPOOL_HIST_* members in the + * history log nvlist. The keynames will be free of any spaces or other + * characters that could be potentially unexpected to consumers of the + * sysevents. */ #define ZFS_EV_POOL_NAME "pool_name" #define ZFS_EV_POOL_GUID "pool_guid" #define ZFS_EV_VDEV_PATH "vdev_path" #define ZFS_EV_VDEV_GUID "vdev_guid" +#define ZFS_EV_HIST_TIME "history_time" +#define ZFS_EV_HIST_CMD "history_command" +#define ZFS_EV_HIST_WHO "history_who" +#define ZFS_EV_HIST_ZONE "history_zone" +#define ZFS_EV_HIST_HOST "history_hostname" +#define ZFS_EV_HIST_TXG "history_txg" +#define ZFS_EV_HIST_INT_EVENT "history_internal_event" +#define ZFS_EV_HIST_INT_STR "history_internal_str" +#define ZFS_EV_HIST_INT_NAME "history_internal_name" +#define ZFS_EV_HIST_IOCTL "history_ioctl" +#define ZFS_EV_HIST_DSNAME "history_dsname" +#define ZFS_EV_HIST_DSID "history_dsid" #ifdef __cplusplus } Modified: vendor-sys/illumos/dist/uts/common/sys/sysevent/eventdefs.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/sysevent/eventdefs.h Fri Jun 9 14:55:12 2017 (r319736) +++ vendor-sys/illumos/dist/uts/common/sys/sysevent/eventdefs.h Fri Jun 9 14:56:17 2017 (r319737) @@ -22,6 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2016 Nexenta Systems, Inc. + * Copyright 2017 Joyent, Inc. */ #ifndef _SYS_SYSEVENT_EVENTDEFS_H @@ -205,6 +206,7 @@ extern "C" { #define ESC_ZFS_VDEV_SPARE "ESC_ZFS_vdev_spare" #define ESC_ZFS_BOOTFS_VDEV_ATTACH "ESC_ZFS_bootfs_vdev_attach" #define ESC_ZFS_POOL_REGUID "ESC_ZFS_pool_reguid" +#define ESC_ZFS_HISTORY_EVENT "ESC_ZFS_history_event" /* * datalink subclass definitions. From owner-svn-src-vendor@freebsd.org Fri Jun 9 14:57:47 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83D7FBF67ED; Fri, 9 Jun 2017 14:57:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 439296ED55; Fri, 9 Jun 2017 14:57:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v59Evknx027046; Fri, 9 Jun 2017 14:57:46 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v59EvkIx027041; Fri, 9 Jun 2017 14:57:46 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706091457.v59EvkIx027041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 9 Jun 2017 14:57:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319738 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 14:57:47 -0000 Author: avg Date: Fri Jun 9 14:57:45 2017 New Revision: 319738 URL: https://svnweb.freebsd.org/changeset/base/319738 Log: 8155 simplify dmu_write_policy handling of pre-compressed buffers illumos/illumos-gate@adaec86ad212d9fd756bee322934fa54d1258605 https://github.com/illumos/illumos-gate/commit/adaec86ad212d9fd756bee322934fa54d1258605 https://www.illumos.org/issues/8155 When writing pre-compressed buffers, arc_write() requires that the compression algorithm used to compress the buffer matches the compression algorithm requested by the zio_prop_t, which is set by dmu_write_policy(). This makes dmu_write_policy() and its callers a bit more complicated. We can simplify this by making arc_write() trust the caller to supply the type of pre-compressed buffer that it wants to write, and override the compression setting in the zio_prop_t. Reviewed by: Dan Kimmel Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Fri Jun 9 14:56:17 2017 (r319737) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Fri Jun 9 14:57:45 2017 (r319738) @@ -5607,6 +5607,7 @@ arc_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr arc_buf_hdr_t *hdr = buf->b_hdr; arc_write_callback_t *callback; zio_t *zio; + zio_prop_t localprop = *zp; ASSERT3P(ready, !=, NULL); ASSERT3P(done, !=, NULL); @@ -5617,7 +5618,13 @@ arc_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr if (l2arc) arc_hdr_set_flags(hdr, ARC_FLAG_L2CACHE); if (ARC_BUF_COMPRESSED(buf)) { - ASSERT3U(zp->zp_compress, !=, ZIO_COMPRESS_OFF); + /* + * We're writing a pre-compressed buffer. Make the + * compression algorithm requested by the zio_prop_t match + * the pre-compressed buffer's compression algorithm. + */ + localprop.zp_compress = HDR_GET_COMPRESS(hdr); + ASSERT3U(HDR_GET_LSIZE(hdr), !=, arc_buf_size(buf)); zio_flags |= ZIO_FLAG_RAW; } @@ -5653,7 +5660,7 @@ arc_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr zio = zio_write(pio, spa, txg, bp, abd_get_from_buf(buf->b_data, HDR_GET_LSIZE(hdr)), - HDR_GET_LSIZE(hdr), arc_buf_size(buf), zp, arc_write_ready, + HDR_GET_LSIZE(hdr), arc_buf_size(buf), &localprop, arc_write_ready, (children_ready != NULL) ? arc_write_children_ready : NULL, arc_write_physdone, arc_write_done, callback, priority, zio_flags, zb); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Fri Jun 9 14:56:17 2017 (r319737) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Fri Jun 9 14:57:45 2017 (r319738) @@ -3535,9 +3535,7 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, d wp_flag = WP_SPILL; wp_flag |= (db->db_state == DB_NOFILL) ? WP_NOFILL : 0; - dmu_write_policy(os, dn, db->db_level, wp_flag, - (data != NULL && arc_get_compression(data) != ZIO_COMPRESS_OFF) ? - arc_get_compression(data) : ZIO_COMPRESS_INHERIT, &zp); + dmu_write_policy(os, dn, db->db_level, wp_flag, &zp); DB_DNODE_EXIT(db); /* Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Fri Jun 9 14:56:17 2017 (r319737) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Fri Jun 9 14:57:45 2017 (r319738) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. */ /* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ /* Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1713,8 +1713,7 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_sync_cb_t *done DB_DNODE_ENTER(db); dn = DB_DNODE(db); - dmu_write_policy(os, dn, db->db_level, WP_DMU_SYNC, - ZIO_COMPRESS_INHERIT, &zp); + dmu_write_policy(os, dn, db->db_level, WP_DMU_SYNC, &zp); DB_DNODE_EXIT(db); /* @@ -1884,8 +1883,7 @@ int zfs_mdcomp_disable = 0; int zfs_redundant_metadata_most_ditto_level = 2; void -dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, - enum zio_compress override_compress, zio_prop_t *zp) +dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, zio_prop_t *zp) { dmu_object_type_t type = dn ? dn->dn_type : DMU_OT_OBJSET; boolean_t ismd = (level > 0 || DMU_OT_IS_METADATA(type) || @@ -1897,11 +1895,7 @@ dmu_write_policy(objset_t *os, dnode_t *dn, int level, boolean_t nopwrite = B_FALSE; boolean_t dedup_verify = os->os_dedup_verify; int copies = os->os_copies; - boolean_t lz4_ac = spa_feature_is_active(os->os_spa, - SPA_FEATURE_LZ4_COMPRESS); - IMPLY(override_compress == ZIO_COMPRESS_LZ4, lz4_ac); - /* * We maintain different write policies for each of the following * types of data: @@ -1988,14 +1982,7 @@ dmu_write_policy(objset_t *os, dnode_t *dn, int level, } zp->zp_checksum = checksum; - - /* - * If we're writing a pre-compressed buffer, the compression type we use - * must match the data. If it hasn't been compressed yet, then we should - * use the value dictated by the policies above. - */ - zp->zp_compress = override_compress != ZIO_COMPRESS_INHERIT - ? override_compress : compress; + zp->zp_compress = compress; ASSERT3U(zp->zp_compress, !=, ZIO_COMPRESS_INHERIT); zp->zp_type = (wp & WP_SPILL) ? dn->dn_bonustype : type; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Fri Jun 9 14:56:17 2017 (r319737) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Fri Jun 9 14:57:45 2017 (r319738) @@ -1201,7 +1201,7 @@ dmu_objset_sync(objset_t *os, zio_t *pio, dmu_tx_t *tx ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); arc_release(os->os_phys_buf, &os->os_phys_buf); - dmu_write_policy(os, NULL, 0, 0, ZIO_COMPRESS_INHERIT, &zp); + dmu_write_policy(os, NULL, 0, 0, &zp); zio = arc_write(pio, os->os_spa, tx->tx_txg, blkptr_copy, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os), Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Fri Jun 9 14:56:17 2017 (r319737) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Fri Jun 9 14:57:45 2017 (r319738) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright 2013 DEY Storage Systems, Inc. @@ -420,7 +420,7 @@ dmu_write_embedded(objset_t *os, uint64_t object, uint #define WP_SPILL 0x4 void dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, - enum zio_compress compress_override, struct zio_prop *zp); + struct zio_prop *zp); /* * The bonus data is accessed more or less like a regular buffer. * You must dmu_bonus_hold() to get the buffer, which will give you a From owner-svn-src-vendor@freebsd.org Fri Jun 9 14:58:52 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54216BF68AA; Fri, 9 Jun 2017 14:58:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F3CE6EF8A; Fri, 9 Jun 2017 14:58:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v59Ewp4B027122; Fri, 9 Jun 2017 14:58:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v59Ewp9v027121; Fri, 9 Jun 2017 14:58:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706091458.v59Ewp9v027121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 9 Jun 2017 14:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319739 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 14:58:52 -0000 Author: avg Date: Fri Jun 9 14:58:51 2017 New Revision: 319739 URL: https://svnweb.freebsd.org/changeset/base/319739 Log: 8005 poor performance of 1MB writes on certain RAID-Z configurations illumos/illumos-gate@5b062782532a1d5961c4a4b655906e1238c7c908 https://github.com/illumos/illumos-gate/commit/5b062782532a1d5961c4a4b655906e1238c7c908 https://www.illumos.org/issues/8005 RAID-Z requires that space be allocated in multiples of P+1 sectors, because this is the minimum size block that can have the required amount of parity. Thus blocks on RAIDZ1 must be allocated in a multiple of 2 sectors; on RAIDZ2 multiple of 3; and on RAIDZ3 multiple of 4. A sector is a unit of 2^ashift bytes, typically 512B or 4KB. To satisfy this constraint, the allocation size is rounded up to the proper multiple, resulting in up to 3 "pad sectors" at the end of some blocks. The contents of these pad sectors are not used, so we do not need to read or write these sectors. However, some storage hardware performs much worse (around 1/2 as fast) on mostly-contiguous writes when there are small gaps of non-overwritten data between the writes. Therefore, ZFS creates "optional" zio's when writing RAID-Z blocks that include pad sectors. If writing a pad sector will fill the gap between two (required) writes, we will issue the optional zio, thus doubling performance. The gap-filling performance improvement was introduced in July 2009. Writing the optional zio is done by the io aggregation code in vdev_queue.c. The problem is that it is also subject to the limit on the size of aggregate writes, zfs_vdev_aggregation_limit, which is by default 128KB. For a given block, if the amount of data plus padding written to a leaf device exceeds zfs_vdev_aggregation_limit, the optional zio will not be written, resulting in a ~2x performance degradation. The problem occurs only for certain values of ashift, compressed block size, and RAID-Z configuration (number of parity and data disks). It cannot occur with the default recordsize=128KB. If compression is enabled, all configurations with recordsize=1MB or larger will be impacted to some degree. The problem notably occurs with recordsize=1MB, compression=off, with 10 disks in a RAIDZ2 or RAIDZ3 group (with 512B or 4KB sectors). Therefore Reviewed by: Saso Kiselkov Reviewed by: George Wilson Reviewed by: Pavel Zakharov Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_queue.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_queue.c Fri Jun 9 14:57:45 2017 (r319738) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_queue.c Fri Jun 9 14:58:51 2017 (r319739) @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -539,7 +539,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) /* * Walk backwards through sufficiently contiguous I/Os - * recording the last non-option I/O. + * recording the last non-optional I/O. */ while ((dio = AVL_PREV(t, first)) != NULL && (dio->io_flags & ZIO_FLAG_AGG_INHERIT) == flags && @@ -560,10 +560,14 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) /* * Walk forward through sufficiently contiguous I/Os. + * The aggregation limit does not apply to optional i/os, so that + * we can issue contiguous writes even if they are larger than the + * aggregation limit. */ while ((dio = AVL_NEXT(t, last)) != NULL && (dio->io_flags & ZIO_FLAG_AGG_INHERIT) == flags && - IO_SPAN(first, dio) <= zfs_vdev_aggregation_limit && + (IO_SPAN(first, dio) <= zfs_vdev_aggregation_limit || + (dio->io_flags & ZIO_FLAG_OPTIONAL)) && IO_GAP(last, dio) <= maxgap) { last = dio; if (!(last->io_flags & ZIO_FLAG_OPTIONAL)) @@ -594,10 +598,16 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) } if (stretch) { - /* This may be a no-op. */ + /* + * We are going to include an optional io in our aggregated + * span, thus closing the write gap. Only mandatory i/os can + * start aggregated spans, so make sure that the next i/o + * after our span is mandatory. + */ dio = AVL_NEXT(t, last); dio->io_flags &= ~ZIO_FLAG_OPTIONAL; } else { + /* do not include the optional i/o */ while (last != mandatory && last != first) { ASSERT(last->io_flags & ZIO_FLAG_OPTIONAL); last = AVL_PREV(t, last); @@ -609,7 +619,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) return (NULL); size = IO_SPAN(first, last); - ASSERT3U(size, <=, zfs_vdev_aggregation_limit); + ASSERT3U(size, <=, SPA_MAXBLOCKSIZE); aio = zio_vdev_delegated_io(first->io_vd, first->io_offset, abd_alloc_for_io(size, B_TRUE), size, first->io_type, From owner-svn-src-vendor@freebsd.org Fri Jun 9 15:00:14 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6507BF6982; Fri, 9 Jun 2017 15:00:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A62EF6F0E7; Fri, 9 Jun 2017 15:00:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v59F0DZS027256; Fri, 9 Jun 2017 15:00:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v59F0DZB027255; Fri, 9 Jun 2017 15:00:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706091500.v59F0DZB027255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 9 Jun 2017 15:00:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319740 - vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 15:00:14 -0000 Author: avg Date: Fri Jun 9 15:00:13 2017 New Revision: 319740 URL: https://svnweb.freebsd.org/changeset/base/319740 Log: 8168 NULL pointer dereference in zfs_create() illumos/illumos-gate@690031d326342fa4ea28b5e80f1ad6a16281519d https://github.com/illumos/illumos-gate/commit/690031d326342fa4ea28b5e80f1ad6a16281519d https://www.illumos.org/issues/8168 If we manage to export the pool on which we are creating a dataset (filesystem or zvol) between entering libzfs`zfs_create() and libzfs`zpool_open() call (for which we never check the return value) we end up dereferencing a NULL pointer in libzfs`zpool_close(). This was discovered on ZFS on Linux. The same issue can be reproduced on Illumos running in parallel: while :; do zpool import -d /tmp testpool ; zpool export testpool ; done while :; do zfs create testpool/fs; zfs destroy testpool/fs ; done Eventually this will result in several core dumps like this one: [root@52-54-00-d3-7a-01 /cores]# mdb core.zfs.4244 Loading modules: [ libumem.so.1 libc.so.1 libtopo.so.1 libavl.so.1 libnvpair.so.1 ld.so.1 ] > ::stack libzfs.so.1`zpool_close+0x17(0, 0, 0, 8047450) libzfs.so.1`zfs_create+0x1bb(8090548, 8047e6f, 1, 808cba8) zfs_do_create+0x545(2, 8047d74, 80778a0, 801, 0, 3) main+0x22c(8047d2c, fef5c6e8, 8047d64, 8055a17, 3, 8047d70) _start+0x83(3, 8047e64, 8047e68, 8047e6f, 0, 8047e7b) > Fix and reproducer (systemtap): https://github.com/zfsonlinux/zfs/pull/6096 Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: loli10K Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Fri Jun 9 14:58:51 2017 (r319739) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Fri Jun 9 15:00:13 2017 (r319740) @@ -3271,6 +3271,7 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs char errbuf[1024]; uint64_t zoned; enum lzc_dataset_type ost; + zpool_handle_t *zpool_handle; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot create '%s'"), path); @@ -3310,7 +3311,8 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs if (p != NULL) *p = '\0'; - zpool_handle_t *zpool_handle = zpool_open(hdl, pool_path); + if ((zpool_handle = zpool_open(hdl, pool_path)) == NULL) + return (-1); if (props && (props = zfs_valid_proplist(hdl, type, props, zoned, NULL, zpool_handle, errbuf)) == 0) { From owner-svn-src-vendor@freebsd.org Fri Jun 9 15:01:19 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E941BF69ED; Fri, 9 Jun 2017 15:01:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D6DB6F28D; Fri, 9 Jun 2017 15:01:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v59F1I1K028070; Fri, 9 Jun 2017 15:01:18 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v59F1IoC028069; Fri, 9 Jun 2017 15:01:18 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706091501.v59F1IoC028069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 9 Jun 2017 15:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319741 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 15:01:19 -0000 Author: avg Date: Fri Jun 9 15:01:18 2017 New Revision: 319741 URL: https://svnweb.freebsd.org/changeset/base/319741 Log: 8156 dbuf_evict_notify() does not need dbuf_evict_lock illumos/illumos-gate@dbfd9f930004c390a2ce2cf850c71b4f880eef9c https://github.com/illumos/illumos-gate/commit/dbfd9f930004c390a2ce2cf850c71b4f880eef9c https://www.illumos.org/issues/8156 dbuf_evict_notify() holds the dbuf_evict_lock while checking if it should do the eviction itself (because the evict thread is not able to keep up). This can result in massive lock contention. It isn't necessary to hold the lock, because if we make the wrong choice occasionally, nothing bad will happen. Reviewed by: Dan Kimmel Reviewed by: Paul Dagnelie Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Fri Jun 9 15:00:13 2017 (r319740) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Fri Jun 9 15:01:18 2017 (r319741) @@ -561,19 +561,15 @@ dbuf_evict_notify(void) if (tsd_get(zfs_dbuf_evict_key) != NULL) return; + /* + * We check if we should evict without holding the dbuf_evict_lock, + * because it's OK to occasionally make the wrong decision here, + * and grabbing the lock results in massive lock contention. + */ if (refcount_count(&dbuf_cache_size) > dbuf_cache_max_bytes) { - boolean_t evict_now = B_FALSE; - - mutex_enter(&dbuf_evict_lock); - if (refcount_count(&dbuf_cache_size) > dbuf_cache_max_bytes) { - evict_now = dbuf_cache_above_hiwater(); - cv_signal(&dbuf_evict_cv); - } - mutex_exit(&dbuf_evict_lock); - - if (evict_now) { + if (dbuf_cache_above_hiwater()) dbuf_evict_one(); - } + cv_signal(&dbuf_evict_cv); } } From owner-svn-src-vendor@freebsd.org Fri Jun 9 15:02:09 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CBF4BF6B6C; Fri, 9 Jun 2017 15:02:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFA356F551; Fri, 9 Jun 2017 15:02:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v59F28Zl028993; Fri, 9 Jun 2017 15:02:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v59F28sQ028992; Fri, 9 Jun 2017 15:02:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706091502.v59F28sQ028992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 9 Jun 2017 15:02:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319742 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 15:02:09 -0000 Author: avg Date: Fri Jun 9 15:02:07 2017 New Revision: 319742 URL: https://svnweb.freebsd.org/changeset/base/319742 Log: 8056 zfs send size estimate is inaccurate for some zvols illumos/illumos-gate@0255edcc85fc0cd1dda0e49bcd52eb66c06a1b16 https://github.com/illumos/illumos-gate/commit/0255edcc85fc0cd1dda0e49bcd52eb66c06a1b16 https://www.illumos.org/issues/8056 The send size estimate for a zvol can be too low, if the size of the record headers (dmu_replay_record_t's) is a significant portion of the size. This is typically the case when the data is highly compressible, especially with embedded blocks. The problem is that dmu_adjust_send_estimate_for_indirects() assumes that blocks are the size of the "recordsize" property (128KB). However, for zvols, the blocks are the size of the "volblocksize" property (8KB). Therefore, we estimate that there will be 16x less record headers than there really will be. Reviewed by: Matthew Ahrens Reviewed by: Pavel Zakharov Approved by: Robert Mustacchi Author: Paul Dagnelie Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Jun 9 15:01:18 2017 (r319741) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Jun 9 15:02:07 2017 (r319742) @@ -1102,10 +1102,17 @@ dmu_adjust_send_estimate_for_indirects(dsl_dataset_t * */ uint64_t recordsize; uint64_t record_count; + objset_t *os; + VERIFY0(dmu_objset_from_ds(ds, &os)); /* Assume all (uncompressed) blocks are recordsize. */ - err = dsl_prop_get_int_ds(ds, zfs_prop_to_name(ZFS_PROP_RECORDSIZE), - &recordsize); + if (os->os_phys->os_type == DMU_OST_ZVOL) { + err = dsl_prop_get_int_ds(ds, + zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), &recordsize); + } else { + err = dsl_prop_get_int_ds(ds, + zfs_prop_to_name(ZFS_PROP_RECORDSIZE), &recordsize); + } if (err != 0) return (err); record_count = uncompressed / recordsize; @@ -1174,6 +1181,10 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl_dataset_t *fr err = dmu_adjust_send_estimate_for_indirects(ds, uncomp, comp, stream_compressed, sizep); + /* + * Add the size of the BEGIN and END records to the estimate. + */ + *sizep += 2 * sizeof (dmu_replay_record_t); return (err); } From owner-svn-src-vendor@freebsd.org Fri Jun 9 15:03:09 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CF89BF6BC0; Fri, 9 Jun 2017 15:03:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFE436F6B4; Fri, 9 Jun 2017 15:03:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v59F38Mt031386; Fri, 9 Jun 2017 15:03:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v59F38Du031385; Fri, 9 Jun 2017 15:03:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706091503.v59F38Du031385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 9 Jun 2017 15:03:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319743 - vendor/illumos/dist/cmd/zdb X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 15:03:09 -0000 Author: avg Date: Fri Jun 9 15:03:07 2017 New Revision: 319743 URL: https://svnweb.freebsd.org/changeset/base/319743 Log: 8108 zdb -l fails to read labels 2 and 3 illumos/illumos-gate@22c8b9583d07895c16549075a53668d7bc988cf3 https://github.com/illumos/illumos-gate/commit/22c8b9583d07895c16549075a53668d7bc988cf3 https://www.illumos.org/issues/8108 Reviewed by: Matthew Ahrens Reviewed by: Toomas Soome Reviewed by: Igor Kozhukhov Reviewed by: Andrew Stormont Approved by: Robert Mustacchi Author: Yuri Pankov Modified: vendor/illumos/dist/cmd/zdb/zdb.c Modified: vendor/illumos/dist/cmd/zdb/zdb.c ============================================================================== --- vendor/illumos/dist/cmd/zdb/zdb.c Fri Jun 9 15:02:07 2017 (r319742) +++ vendor/illumos/dist/cmd/zdb/zdb.c Fri Jun 9 15:03:07 2017 (r319743) @@ -2299,24 +2299,29 @@ dump_label(const char *dev) (void) snprintf(path, sizeof (path), "%s%s", ZFS_RDISK_ROOTD, dev); - if ((s = strrchr(dev, 's')) == NULL || !isdigit(*(s + 1))) + if (((s = strrchr(dev, 's')) == NULL && + (s = strchr(dev, 'p')) == NULL) || + !isdigit(*(s + 1))) (void) strlcat(path, "s0", sizeof (path)); } - if (stat64(path, &statbuf) != 0) { - (void) printf("failed to stat '%s': %s\n", path, + if ((fd = open64(path, O_RDONLY)) < 0) { + (void) fprintf(stderr, "cannot open '%s': %s\n", path, strerror(errno)); exit(1); } - if (S_ISBLK(statbuf.st_mode)) { - (void) printf("cannot use '%s': character device required\n", - path); + if (fstat64(fd, &statbuf) != 0) { + (void) fprintf(stderr, "failed to stat '%s': %s\n", path, + strerror(errno)); + (void) close(fd); exit(1); } - if ((fd = open64(path, O_RDONLY)) < 0) { - (void) printf("cannot open '%s': %s\n", path, strerror(errno)); + if (S_ISBLK(statbuf.st_mode)) { + (void) fprintf(stderr, + "cannot use '%s': character device required\n", path); + (void) close(fd); exit(1); } From owner-svn-src-vendor@freebsd.org Fri Jun 9 15:04:11 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9BDFBF6C26; Fri, 9 Jun 2017 15:04:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8763D6F7E3; Fri, 9 Jun 2017 15:04:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v59F4Aqn031475; Fri, 9 Jun 2017 15:04:10 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v59F4AJd031474; Fri, 9 Jun 2017 15:04:10 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706091504.v59F4AJd031474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 9 Jun 2017 15:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319744 - vendor/illumos/dist/lib/libdtrace/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 15:04:11 -0000 Author: avg Date: Fri Jun 9 15:04:10 2017 New Revision: 319744 URL: https://svnweb.freebsd.org/changeset/base/319744 Log: 8269 dtrace stddev aggregation is normalized incorrectly illumos/illumos-gate@79809f9cf402f130667349b2d4007ecd65d63c6f https://github.com/illumos/illumos-gate/commit/79809f9cf402f130667349b2d4007ecd65d63c6f https://www.illumos.org/issues/8269 It seems that currently normalization of stddev aggregation is done incorrectly. We divide both the sum of values and the sum of their squares by the normalization factor. But we should divide the sum of squares by the normalization factor squared to scale the original values properly. Reviewed by: Bryan Cantrill Approved by: Robert Mustacchi Author: Andriy Gapon Modified: vendor/illumos/dist/lib/libdtrace/common/dt_consume.c Modified: vendor/illumos/dist/lib/libdtrace/common/dt_consume.c ============================================================================== --- vendor/illumos/dist/lib/libdtrace/common/dt_consume.c Fri Jun 9 15:03:07 2017 (r319743) +++ vendor/illumos/dist/lib/libdtrace/common/dt_consume.c Fri Jun 9 15:04:10 2017 (r319744) @@ -381,8 +381,10 @@ dt_stddev(uint64_t *data, uint64_t normal) * The standard approximation for standard deviation is * sqrt(average(x**2) - average(x)**2), i.e. the square root * of the average of the squares minus the square of the average. + * When normalizing, we should divide the sum of x**2 by normal**2. */ dt_divide_128(data + 2, normal, avg_of_squares); + dt_divide_128(avg_of_squares, normal, avg_of_squares); dt_divide_128(avg_of_squares, data[0], avg_of_squares); norm_avg = (int64_t)data[1] / (int64_t)normal / (int64_t)data[0]; From owner-svn-src-vendor@freebsd.org Fri Jun 9 15:06:51 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E48E5BF6DF4; Fri, 9 Jun 2017 15:06:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B39F16FCA2; Fri, 9 Jun 2017 15:06:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v59F6olF032204; Fri, 9 Jun 2017 15:06:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v59F6oQC032201; Fri, 9 Jun 2017 15:06:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706091506.v59F6oQC032201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 9 Jun 2017 15:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319745 - vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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, 09 Jun 2017 15:06:52 -0000 Author: avg Date: Fri Jun 9 15:06:50 2017 New Revision: 319745 URL: https://svnweb.freebsd.org/changeset/base/319745 Log: fix up r319744, add new files 8269 dtrace stddev aggregation is normalized incorrectly illumos/illumos-gate@79809f9cf402f130667349b2d4007ecd65d63c6f https://github.com/illumos/illumos-gate/commit/79809f9cf402f130667349b2d4007ecd65d63c6f https://www.illumos.org/issues/8269 It seems that currently normalization of stddev aggregation is done incorrectly. We divide both the sum of values and the sum of their squares by the normalization factor. But we should divide the sum of squares by the normalization factor squared to scale the original values properly. Reviewed by: Bryan Cantrill Approved by: Robert Mustacchi Author: Andriy Gapon Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d (contents, props changed) vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d Fri Jun 9 15:06:50 2017 (r319745) @@ -0,0 +1,46 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2017 Panzura. All rights reserved. + */ + +/* + * ASSERTION: + * Positive test for normalization() of stddev() + * + * SECTION: Aggregations/Normalization + * + */ + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=50ms + +BEGIN +{ + i = 0; +} + +tick-100ms +/i < 11/ +{ + @ = stddev(i * 100); + i++; +} + +tick-100ms +/i == 11/ +{ + printf("normalized data:\n"); + normalize(@, 10); + exit(0); +} Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out Fri Jun 9 15:06:50 2017 (r319745) @@ -0,0 +1,3 @@ +normalized data: + + 31 From owner-svn-src-vendor@freebsd.org Sat Jun 10 13:44:15 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FA32B95390; Sat, 10 Jun 2017 13:44:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAEB078820; Sat, 10 Jun 2017 13:44:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ADiDmL094652; Sat, 10 Jun 2017 13:44:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ADiD9J094651; Sat, 10 Jun 2017 13:44:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706101344.v5ADiD9J094651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 10 Jun 2017 13:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319781 - vendor/llvm/llvm-trunk-r305145 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 10 Jun 2017 13:44:15 -0000 Author: dim Date: Sat Jun 10 13:44:13 2017 New Revision: 319781 URL: https://svnweb.freebsd.org/changeset/base/319781 Log: Tag llvm trunk r305145. Added: vendor/llvm/llvm-trunk-r305145/ - copied from r319780, vendor/llvm/dist/ From owner-svn-src-vendor@freebsd.org Sat Jun 10 13:44:10 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AE88B9538C; Sat, 10 Jun 2017 13:44:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 550707881A; Sat, 10 Jun 2017 13:44:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ADi8FJ094605; Sat, 10 Jun 2017 13:44:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ADi7VN094594; Sat, 10 Jun 2017 13:44:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706101344.v5ADi7VN094594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 10 Jun 2017 13:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319780 - in vendor/llvm/dist: . bindings/go/llvm bindings/ocaml/llvm cmake/modules docs examples/ExceptionDemo include/llvm include/llvm-c include/llvm/ADT include/llvm/Analysis includ... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 10 Jun 2017 13:44:10 -0000 Author: dim Date: Sat Jun 10 13:44:06 2017 New Revision: 319780 URL: https://svnweb.freebsd.org/changeset/base/319780 Log: Vendor import of llvm trunk r305145: https://llvm.org/svn/llvm-project/llvm/trunk@305145 Added: vendor/llvm/dist/include/llvm/BinaryFormat/ vendor/llvm/dist/include/llvm/BinaryFormat/COFF.h (contents, props changed) vendor/llvm/dist/include/llvm/BinaryFormat/Dwarf.def vendor/llvm/dist/include/llvm/BinaryFormat/Dwarf.h (contents, props changed) vendor/llvm/dist/include/llvm/BinaryFormat/ELF.h (contents, props changed) vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/ vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/AArch64.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/AMDGPU.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/ARM.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/AVR.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/BPF.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/Hexagon.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/Lanai.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/Mips.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/PowerPC.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/PowerPC64.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/RISCV.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/Sparc.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/SystemZ.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/WebAssembly.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/i386.def vendor/llvm/dist/include/llvm/BinaryFormat/ELFRelocs/x86_64.def vendor/llvm/dist/include/llvm/BinaryFormat/MachO.def vendor/llvm/dist/include/llvm/BinaryFormat/MachO.h (contents, props changed) vendor/llvm/dist/include/llvm/BinaryFormat/Magic.h (contents, props changed) vendor/llvm/dist/include/llvm/BinaryFormat/Wasm.h (contents, props changed) vendor/llvm/dist/include/llvm/BinaryFormat/WasmRelocs/ vendor/llvm/dist/include/llvm/BinaryFormat/WasmRelocs/WebAssembly.def vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugCrossExSubsection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugCrossImpSubsection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSymbolRVASubsection.h (contents, props changed) vendor/llvm/dist/include/llvm/Support/AMDGPUCodeObjectMetadata.h (contents, props changed) vendor/llvm/dist/include/llvm/Transforms/Utils/OrderedInstructions.h (contents, props changed) vendor/llvm/dist/lib/BinaryFormat/ vendor/llvm/dist/lib/BinaryFormat/CMakeLists.txt (contents, props changed) vendor/llvm/dist/lib/BinaryFormat/Dwarf.cpp (contents, props changed) vendor/llvm/dist/lib/BinaryFormat/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/lib/BinaryFormat/Magic.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSymbolRVASubsection.cpp (contents, props changed) vendor/llvm/dist/lib/Support/AMDGPUCodeObjectMetadata.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AMDGPU/AMDGPURegAsmNames.inc.cpp (contents, props changed) vendor/llvm/dist/lib/Transforms/Utils/OrderedInstructions.cpp (contents, props changed) vendor/llvm/dist/test/Analysis/BranchProbabilityInfo/libfunc_call.ll vendor/llvm/dist/test/BugPoint/unsymbolized.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-conversion-fallback.ll vendor/llvm/dist/test/CodeGen/AArch64/spill-undef.mir vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/legalize-icmp.mir vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.alignb.ll vendor/llvm/dist/test/CodeGen/AMDGPU/promote-alloca-array-aggregate.ll vendor/llvm/dist/test/CodeGen/AMDGPU/rename-independent-subregs-invalid-mac-operands.mir vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-instruction-select-combos.mir vendor/llvm/dist/test/CodeGen/ARM/clang-section.ll vendor/llvm/dist/test/CodeGen/Hexagon/common-gep-inbounds.ll vendor/llvm/dist/test/CodeGen/Hexagon/mux-undef.ll vendor/llvm/dist/test/CodeGen/MIR/X86/empty0.mir vendor/llvm/dist/test/CodeGen/MIR/X86/empty1.mir vendor/llvm/dist/test/CodeGen/MIR/X86/empty2.mir vendor/llvm/dist/test/CodeGen/MIR/X86/inline-asm.mir vendor/llvm/dist/test/CodeGen/MIR/X86/roundtrip.mir vendor/llvm/dist/test/CodeGen/Mips/cconv/vector.ll vendor/llvm/dist/test/CodeGen/Mips/pbqp-reserved-physreg.ll vendor/llvm/dist/test/CodeGen/PowerPC/BoolRetToIntTest-2.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesinesc.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesinesi.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesinesll.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesiness.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesineuc.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesineui.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesineull.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesineus.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesllnesll.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesllneull.ll vendor/llvm/dist/test/CodeGen/PowerPC/vec_int_ext.ll vendor/llvm/dist/test/CodeGen/X86/mul-constant-result.ll vendor/llvm/dist/test/CodeGen/X86/pr32659.ll vendor/llvm/dist/test/CodeGen/X86/selectiondag-dominator.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-v48.ll vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets-dwp.s (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets-invalid-1.s (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets-invalid-1.x86_64.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets-invalid-2.s (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets-invalid-2.x86_64.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets-invalid-3.s (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets-invalid-3.x86_64.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets-invalid-4.s (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets-invalid-4.x86_64.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets-invalid-5.s (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets-invalid-5.x86_64.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets.s (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets.x86_64.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/PDB/Inputs/debug-subsections.yaml vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-debug-subsections.test vendor/llvm/dist/test/DebugInfo/dwarfdump-str-offsets-invalid.test vendor/llvm/dist/test/DebugInfo/dwarfdump-str-offsets.test vendor/llvm/dist/test/LTO/ARM/Inputs/ vendor/llvm/dist/test/LTO/ARM/Inputs/thumb.ll vendor/llvm/dist/test/LTO/ARM/link-arm-and-thumb.ll vendor/llvm/dist/test/LTO/Resolution/X86/linker-redef.ll vendor/llvm/dist/test/Linker/Inputs/thumb.ll vendor/llvm/dist/test/Linker/link-arm-and-thumb.ll vendor/llvm/dist/test/MC/ARM/arm-thumb-tail-call.ll vendor/llvm/dist/test/MC/ARM/t2-modified-immediate-fixup-error1.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/t2-modified-immediate-fixup-error2.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/t2-modified-immediate-fixup.s (contents, props changed) vendor/llvm/dist/test/MC/AsmParser/empty-comment.s (contents, props changed) vendor/llvm/dist/test/MC/ELF/ARM/clang-section.s (contents, props changed) vendor/llvm/dist/test/MC/MachO/alias.s (contents, props changed) vendor/llvm/dist/test/Object/objc-imageinfo-coff.ll vendor/llvm/dist/test/Object/objc-imageinfo-elf.ll vendor/llvm/dist/test/Object/objc-imageinfo-macho.ll vendor/llvm/dist/test/Transforms/CodeGenPrepare/X86/memcmp.ll vendor/llvm/dist/test/Transforms/IRCE/correct-loop-info.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/lftr_disabled.ll vendor/llvm/dist/test/Transforms/InferAddressSpaces/NVPTX/clone_constexpr.ll vendor/llvm/dist/test/Transforms/InstCombine/constant-fold-libfunc.ll vendor/llvm/dist/test/Transforms/InstSimplify/simplify-nested-bitcast.ll vendor/llvm/dist/test/Transforms/LoopIdiom/X86/unordered-atomic-memcpy.ll vendor/llvm/dist/test/Transforms/LoopIdiom/unordered-atomic-memcpy-noarch.ll vendor/llvm/dist/test/Transforms/LowerExpectIntrinsic/PR33346.ll vendor/llvm/dist/test/Transforms/LowerTypeTests/simplify.ll vendor/llvm/dist/test/Transforms/NewGVN/pr33187.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/reverse_extract_elements.ll vendor/llvm/dist/test/Transforms/Sink/badloadsink.ll vendor/llvm/dist/test/tools/llvm-cvtres/Inputs/test_resource.obj.coff (contents, props changed) vendor/llvm/dist/test/tools/llvm-cvtres/object.test vendor/llvm/dist/test/tools/llvm-cvtres/parse.test vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/ vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/brief.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/lit.local.cfg vendor/llvm/dist/test/tools/llvm-readobj/Inputs/trivial.obj.elf-amdhsa-gfx803 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/amdgpu-elf-definitions.test vendor/llvm/dist/tools/llvm-pdbutil/ vendor/llvm/dist/tools/llvm-pdbutil/Analyze.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/Analyze.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/CMakeLists.txt (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/CompactTypeDumpVisitor.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/CompactTypeDumpVisitor.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/Diff.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/Diff.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/LLVMOutputStyle.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/LLVMOutputStyle.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/LinePrinter.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/LinePrinter.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/OutputStyle.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PdbYaml.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PdbYaml.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyBuiltinDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyClassDefinitionDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyClassDefinitionDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyClassLayoutGraphicalDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyClassLayoutGraphicalDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyCompilandDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyCompilandDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyEnumDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyEnumDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyExternalSymbolDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyExternalSymbolDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyFunctionDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyFunctionDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyTypeDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyTypeDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyTypedefDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyTypedefDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyVariableDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/PrettyVariableDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/StreamUtil.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/StreamUtil.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/YAMLOutputStyle.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/YAMLOutputStyle.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/fuzzer/ vendor/llvm/dist/tools/llvm-pdbutil/fuzzer/CMakeLists.txt (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/fuzzer/llvm-pdbutil-fuzzer.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/llvm-pdbutil.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/llvm-pdbutil.h (contents, props changed) vendor/llvm/dist/unittests/Analysis/GlobalsModRefTest.cpp (contents, props changed) vendor/llvm/dist/unittests/BinaryFormat/ vendor/llvm/dist/unittests/BinaryFormat/CMakeLists.txt (contents, props changed) vendor/llvm/dist/unittests/BinaryFormat/DwarfTest.cpp (contents, props changed) vendor/llvm/dist/unittests/BinaryFormat/TestFileMagic.cpp (contents, props changed) vendor/llvm/dist/unittests/Transforms/Utils/OrderedInstructions.cpp (contents, props changed) Deleted: vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionInitializer.h vendor/llvm/dist/include/llvm/Support/COFF.h vendor/llvm/dist/include/llvm/Support/Dwarf.def vendor/llvm/dist/include/llvm/Support/Dwarf.h vendor/llvm/dist/include/llvm/Support/ELF.h vendor/llvm/dist/include/llvm/Support/ELFRelocs/ vendor/llvm/dist/include/llvm/Support/MachO.def vendor/llvm/dist/include/llvm/Support/MachO.h vendor/llvm/dist/include/llvm/Support/Wasm.h vendor/llvm/dist/include/llvm/Support/WasmRelocs/ vendor/llvm/dist/lib/Support/Dwarf.cpp vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUCodeObjectMetadata.h vendor/llvm/dist/test/CodeGen/MIR/Generic/function-missing-machine-function.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/irtranslator-call.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/irtranslator-callingconv_64bit.ll vendor/llvm/dist/test/DebugInfo/PDB/Inputs/simple-line-info.yaml vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-yaml-lineinfo-write.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-yaml-lineinfo.test vendor/llvm/dist/test/tools/llvm-cvtres/resource.test vendor/llvm/dist/test/tools/llvm-readobj/Inputs/trivial.elf-amdhsa-kaveri vendor/llvm/dist/test/tools/llvm-readobj/amdgpu-elf-defs.test vendor/llvm/dist/tools/llvm-pdbdump/ vendor/llvm/dist/unittests/Support/DwarfTest.cpp vendor/llvm/dist/utils/TableGen/X86FoldTablesEmitter.cpp Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/bindings/go/llvm/ir.go vendor/llvm/dist/bindings/go/llvm/ir_test.go vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake vendor/llvm/dist/cmake/modules/TableGen.cmake vendor/llvm/dist/docs/AMDGPUUsage.rst vendor/llvm/dist/docs/CodeGenerator.rst vendor/llvm/dist/docs/CompilerWriterInfo.rst vendor/llvm/dist/docs/LangRef.rst vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/docs/index.rst vendor/llvm/dist/examples/ExceptionDemo/ExceptionDemo.cpp vendor/llvm/dist/include/llvm-c/Core.h vendor/llvm/dist/include/llvm-c/ExecutionEngine.h vendor/llvm/dist/include/llvm-c/Support.h vendor/llvm/dist/include/llvm-c/TargetMachine.h vendor/llvm/dist/include/llvm/ADT/APInt.h vendor/llvm/dist/include/llvm/ADT/GraphTraits.h vendor/llvm/dist/include/llvm/ADT/ImmutableSet.h vendor/llvm/dist/include/llvm/ADT/PointerUnion.h vendor/llvm/dist/include/llvm/ADT/PostOrderIterator.h vendor/llvm/dist/include/llvm/ADT/PriorityWorklist.h vendor/llvm/dist/include/llvm/ADT/SCCIterator.h vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h vendor/llvm/dist/include/llvm/ADT/SmallVector.h vendor/llvm/dist/include/llvm/ADT/SparseMultiSet.h vendor/llvm/dist/include/llvm/ADT/StringExtras.h vendor/llvm/dist/include/llvm/ADT/StringRef.h vendor/llvm/dist/include/llvm/ADT/iterator_range.h vendor/llvm/dist/include/llvm/Analysis/AliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/AssumptionCache.h vendor/llvm/dist/include/llvm/Analysis/BranchProbabilityInfo.h vendor/llvm/dist/include/llvm/Analysis/ConstantFolding.h vendor/llvm/dist/include/llvm/Analysis/DemandedBits.h vendor/llvm/dist/include/llvm/Analysis/InlineCost.h vendor/llvm/dist/include/llvm/Analysis/InstructionSimplify.h vendor/llvm/dist/include/llvm/Analysis/LazyBranchProbabilityInfo.h vendor/llvm/dist/include/llvm/Analysis/LazyValueInfo.h vendor/llvm/dist/include/llvm/Analysis/LoopInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/MemoryDependenceAnalysis.h vendor/llvm/dist/include/llvm/Analysis/MemorySSAUpdater.h vendor/llvm/dist/include/llvm/Analysis/ObjCARCAnalysisUtils.h vendor/llvm/dist/include/llvm/Analysis/ObjCARCInstKind.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionNormalization.h vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h vendor/llvm/dist/include/llvm/Bitcode/BitcodeReader.h vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h vendor/llvm/dist/include/llvm/CodeGen/BasicTTIImpl.h vendor/llvm/dist/include/llvm/CodeGen/DFAPacketizer.h vendor/llvm/dist/include/llvm/CodeGen/DIE.h vendor/llvm/dist/include/llvm/CodeGen/ExecutionDepsFix.h vendor/llvm/dist/include/llvm/CodeGen/FastISel.h vendor/llvm/dist/include/llvm/CodeGen/FunctionLoweringInfo.h vendor/llvm/dist/include/llvm/CodeGen/GCMetadata.h vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h vendor/llvm/dist/include/llvm/CodeGen/GCStrategy.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/InstructionSelector.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h vendor/llvm/dist/include/llvm/CodeGen/LexicalScopes.h vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h vendor/llvm/dist/include/llvm/CodeGen/LiveRegUnits.h vendor/llvm/dist/include/llvm/CodeGen/MIRParser/MIRParser.h vendor/llvm/dist/include/llvm/CodeGen/MIRYamlMapping.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h vendor/llvm/dist/include/llvm/CodeGen/MachineMemOperand.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfoImpls.h vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h vendor/llvm/dist/include/llvm/CodeGen/RegAllocRegistry.h vendor/llvm/dist/include/llvm/CodeGen/RegisterPressure.h vendor/llvm/dist/include/llvm/CodeGen/RegisterUsageInfo.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAGInstrs.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDFS.h vendor/llvm/dist/include/llvm/CodeGen/SchedulerRegistry.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h vendor/llvm/dist/include/llvm/CodeGen/StackProtector.h vendor/llvm/dist/include/llvm/CodeGen/TailDuplicator.h vendor/llvm/dist/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h vendor/llvm/dist/include/llvm/CodeGen/TargetPassConfig.h vendor/llvm/dist/include/llvm/CodeGen/TargetSchedule.h vendor/llvm/dist/include/llvm/CodeGen/VirtRegMap.h vendor/llvm/dist/include/llvm/Config/abi-breaking.h.cmake vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CodeView.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSymbolsSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/EnumTables.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeSerializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h vendor/llvm/dist/include/llvm/DebugInfo/DIContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAttribute.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugPubTable.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDie.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h vendor/llvm/dist/include/llvm/DebugInfo/MSF/MappedBlockStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptor.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDBSymbol.h vendor/llvm/dist/include/llvm/ExecutionEngine/ExecutionEngine.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/RTDyldMemoryManager.h vendor/llvm/dist/include/llvm/IR/Attributes.h vendor/llvm/dist/include/llvm/IR/BasicBlock.h vendor/llvm/dist/include/llvm/IR/CallSite.h vendor/llvm/dist/include/llvm/IR/Constants.h vendor/llvm/dist/include/llvm/IR/DataLayout.h vendor/llvm/dist/include/llvm/IR/DebugInfoMetadata.h vendor/llvm/dist/include/llvm/IR/DiagnosticInfo.h vendor/llvm/dist/include/llvm/IR/Dominators.h vendor/llvm/dist/include/llvm/IR/Function.h vendor/llvm/dist/include/llvm/IR/GetElementPtrTypeIterator.h vendor/llvm/dist/include/llvm/IR/GlobalValue.h vendor/llvm/dist/include/llvm/IR/GlobalVariable.h vendor/llvm/dist/include/llvm/IR/IRBuilder.h vendor/llvm/dist/include/llvm/IR/InstrTypes.h vendor/llvm/dist/include/llvm/IR/Instruction.h vendor/llvm/dist/include/llvm/IR/Instructions.h vendor/llvm/dist/include/llvm/IR/IntrinsicsAMDGPU.td vendor/llvm/dist/include/llvm/IR/Metadata.h vendor/llvm/dist/include/llvm/IR/Module.h vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndex.h vendor/llvm/dist/include/llvm/IR/OperandTraits.h vendor/llvm/dist/include/llvm/IR/PatternMatch.h vendor/llvm/dist/include/llvm/IR/Statepoint.h vendor/llvm/dist/include/llvm/IR/Type.h vendor/llvm/dist/include/llvm/IR/Use.h vendor/llvm/dist/include/llvm/IR/Value.h vendor/llvm/dist/include/llvm/LTO/LTO.h vendor/llvm/dist/include/llvm/LinkAllIR.h vendor/llvm/dist/include/llvm/LinkAllPasses.h vendor/llvm/dist/include/llvm/MC/MCAsmInfo.h vendor/llvm/dist/include/llvm/MC/MCAssembler.h vendor/llvm/dist/include/llvm/MC/MCCodeView.h vendor/llvm/dist/include/llvm/MC/MCContext.h vendor/llvm/dist/include/llvm/MC/MCELFObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCFragment.h vendor/llvm/dist/include/llvm/MC/MCMachObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCObjectFileInfo.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParser.h vendor/llvm/dist/include/llvm/MC/MCSection.h vendor/llvm/dist/include/llvm/MC/MCSectionMachO.h vendor/llvm/dist/include/llvm/MC/MCSymbolWasm.h vendor/llvm/dist/include/llvm/MC/MCTargetOptions.h vendor/llvm/dist/include/llvm/MC/MCWasmObjectWriter.h vendor/llvm/dist/include/llvm/Object/Archive.h vendor/llvm/dist/include/llvm/Object/COFF.h vendor/llvm/dist/include/llvm/Object/COFFModuleDefinition.h vendor/llvm/dist/include/llvm/Object/Decompressor.h vendor/llvm/dist/include/llvm/Object/ELF.h vendor/llvm/dist/include/llvm/Object/ELFObjectFile.h vendor/llvm/dist/include/llvm/Object/ELFTypes.h vendor/llvm/dist/include/llvm/Object/IRObjectFile.h vendor/llvm/dist/include/llvm/Object/IRSymtab.h vendor/llvm/dist/include/llvm/Object/MachO.h vendor/llvm/dist/include/llvm/Object/MachOUniversal.h vendor/llvm/dist/include/llvm/Object/ObjectFile.h vendor/llvm/dist/include/llvm/Object/RelocVisitor.h vendor/llvm/dist/include/llvm/Object/SymbolicFile.h vendor/llvm/dist/include/llvm/Object/Wasm.h vendor/llvm/dist/include/llvm/Object/WindowsResource.h vendor/llvm/dist/include/llvm/ObjectYAML/COFFYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLTypes.h vendor/llvm/dist/include/llvm/ObjectYAML/DWARFYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/ELFYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/MachOYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/WasmYAML.h vendor/llvm/dist/include/llvm/Option/ArgList.h vendor/llvm/dist/include/llvm/Pass.h vendor/llvm/dist/include/llvm/ProfileData/Coverage/CoverageMapping.h vendor/llvm/dist/include/llvm/Support/BinaryStreamArray.h vendor/llvm/dist/include/llvm/Support/BinaryStreamReader.h vendor/llvm/dist/include/llvm/Support/CBindingWrapping.h vendor/llvm/dist/include/llvm/Support/Casting.h vendor/llvm/dist/include/llvm/Support/CommandLine.h vendor/llvm/dist/include/llvm/Support/ConvertUTF.h vendor/llvm/dist/include/llvm/Support/DataTypes.h.cmake vendor/llvm/dist/include/llvm/Support/Endian.h vendor/llvm/dist/include/llvm/Support/Error.h vendor/llvm/dist/include/llvm/Support/ErrorOr.h vendor/llvm/dist/include/llvm/Support/FileSystem.h vendor/llvm/dist/include/llvm/Support/FormatVariadic.h vendor/llvm/dist/include/llvm/Support/GCOV.h vendor/llvm/dist/include/llvm/Support/GenericDomTree.h vendor/llvm/dist/include/llvm/Support/LowLevelTypeImpl.h vendor/llvm/dist/include/llvm/Support/MathExtras.h vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h vendor/llvm/dist/include/llvm/Support/Solaris.h vendor/llvm/dist/include/llvm/Support/SourceMgr.h vendor/llvm/dist/include/llvm/Support/StringPool.h vendor/llvm/dist/include/llvm/Support/TargetRegistry.h vendor/llvm/dist/include/llvm/Support/raw_sha1_ostream.h vendor/llvm/dist/include/llvm/Support/type_traits.h vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Target/TargetOptions.h vendor/llvm/dist/include/llvm/Target/TargetSubtargetInfo.h vendor/llvm/dist/include/llvm/Transforms/IPO/FunctionAttrs.h vendor/llvm/dist/include/llvm/Transforms/Scalar/GVNExpression.h vendor/llvm/dist/include/llvm/Transforms/Utils/EscapeEnumerator.h vendor/llvm/dist/include/llvm/Transforms/Utils/FunctionComparator.h vendor/llvm/dist/include/llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/include/llvm/Transforms/Utils/LoopVersioning.h vendor/llvm/dist/include/llvm/Transforms/Utils/ValueMapper.h vendor/llvm/dist/include/llvm/Transforms/Vectorize/SLPVectorizer.h vendor/llvm/dist/include/llvm/module.modulemap vendor/llvm/dist/lib/Analysis/AliasAnalysisEvaluator.cpp vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp vendor/llvm/dist/lib/Analysis/BranchProbabilityInfo.cpp vendor/llvm/dist/lib/Analysis/CFLGraph.h vendor/llvm/dist/lib/Analysis/CallPrinter.cpp vendor/llvm/dist/lib/Analysis/CaptureTracking.cpp vendor/llvm/dist/lib/Analysis/CodeMetrics.cpp vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/GlobalsModRef.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/InstCount.cpp vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/LLVMBuild.txt vendor/llvm/dist/lib/Analysis/LazyBranchProbabilityInfo.cpp vendor/llvm/dist/lib/Analysis/LazyCallGraph.cpp vendor/llvm/dist/lib/Analysis/LazyValueInfo.cpp vendor/llvm/dist/lib/Analysis/Lint.cpp vendor/llvm/dist/lib/Analysis/MemDepPrinter.cpp vendor/llvm/dist/lib/Analysis/MemDerefPrinter.cpp vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/MemorySSAUpdater.cpp vendor/llvm/dist/lib/Analysis/ModuleDebugInfoPrinter.cpp vendor/llvm/dist/lib/Analysis/ModuleSummaryAnalysis.cpp vendor/llvm/dist/lib/Analysis/ObjCARCInstKind.cpp vendor/llvm/dist/lib/Analysis/RegionPrinter.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionNormalization.cpp vendor/llvm/dist/lib/Analysis/TargetTransformInfo.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/Analysis/VectorUtils.cpp vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLVMBuild.txt vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Reader/MetadataLoader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/Analysis.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/ARMException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIEHash.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DebugLocStream.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfAccelTable.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfExpression.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/LLVMBuild.txt vendor/llvm/dist/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/WinException.cpp vendor/llvm/dist/lib/CodeGen/BasicTargetTransformInfo.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/BranchRelaxation.cpp vendor/llvm/dist/lib/CodeGen/BuiltinGCs.cpp vendor/llvm/dist/lib/CodeGen/CalcSpillWeights.cpp vendor/llvm/dist/lib/CodeGen/CodeGen.cpp vendor/llvm/dist/lib/CodeGen/CodeGenPrepare.cpp vendor/llvm/dist/lib/CodeGen/DFAPacketizer.cpp vendor/llvm/dist/lib/CodeGen/DeadMachineInstructionElim.cpp vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/ExpandISelPseudos.cpp vendor/llvm/dist/lib/CodeGen/ExpandPostRAPseudos.cpp vendor/llvm/dist/lib/CodeGen/ExpandReductions.cpp vendor/llvm/dist/lib/CodeGen/FaultMaps.cpp vendor/llvm/dist/lib/CodeGen/FuncletLayout.cpp vendor/llvm/dist/lib/CodeGen/GCMetadata.cpp vendor/llvm/dist/lib/CodeGen/GCMetadataPrinter.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/IRTranslator.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/Legalizer.cpp vendor/llvm/dist/lib/CodeGen/GlobalMerge.cpp vendor/llvm/dist/lib/CodeGen/IfConversion.cpp vendor/llvm/dist/lib/CodeGen/ImplicitNullChecks.cpp vendor/llvm/dist/lib/CodeGen/InlineSpiller.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/LexicalScopes.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalUnion.cpp vendor/llvm/dist/lib/CodeGen/LiveRegMatrix.cpp vendor/llvm/dist/lib/CodeGen/LocalStackSlotAllocation.cpp vendor/llvm/dist/lib/CodeGen/MIRParser/MILexer.h vendor/llvm/dist/lib/CodeGen/MIRParser/MIParser.cpp vendor/llvm/dist/lib/CodeGen/MIRParser/MIParser.h vendor/llvm/dist/lib/CodeGen/MIRParser/MIRParser.cpp vendor/llvm/dist/lib/CodeGen/MIRPrinter.cpp vendor/llvm/dist/lib/CodeGen/MIRPrintingPass.cpp vendor/llvm/dist/lib/CodeGen/MachineBlockPlacement.cpp vendor/llvm/dist/lib/CodeGen/MachineCSE.cpp vendor/llvm/dist/lib/CodeGen/MachineCopyPropagation.cpp vendor/llvm/dist/lib/CodeGen/MachineDominanceFrontier.cpp vendor/llvm/dist/lib/CodeGen/MachineDominators.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionPass.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionPrinterPass.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineOutliner.cpp vendor/llvm/dist/lib/CodeGen/MachinePipeliner.cpp vendor/llvm/dist/lib/CodeGen/MachineRegionInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineRegisterInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineScheduler.cpp vendor/llvm/dist/lib/CodeGen/MachineSink.cpp vendor/llvm/dist/lib/CodeGen/MachineTraceMetrics.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/OptimizePHIs.cpp vendor/llvm/dist/lib/CodeGen/PatchableFunction.cpp vendor/llvm/dist/lib/CodeGen/PeepholeOptimizer.cpp vendor/llvm/dist/lib/CodeGen/PostRAHazardRecognizer.cpp vendor/llvm/dist/lib/CodeGen/RegAllocBase.cpp vendor/llvm/dist/lib/CodeGen/RegAllocBasic.cpp vendor/llvm/dist/lib/CodeGen/RegAllocGreedy.cpp vendor/llvm/dist/lib/CodeGen/RegAllocPBQP.cpp vendor/llvm/dist/lib/CodeGen/RegisterClassInfo.cpp vendor/llvm/dist/lib/CodeGen/RegisterPressure.cpp vendor/llvm/dist/lib/CodeGen/RegisterUsageInfo.cpp vendor/llvm/dist/lib/CodeGen/RenameIndependentSubregs.cpp vendor/llvm/dist/lib/CodeGen/ResetMachineFunctionPass.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAG.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGPrinter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/StatepointLowering.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/ShadowStackGCLowering.cpp vendor/llvm/dist/lib/CodeGen/SjLjEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/StackMaps.cpp vendor/llvm/dist/lib/CodeGen/StackProtector.cpp vendor/llvm/dist/lib/CodeGen/StackSlotColoring.cpp vendor/llvm/dist/lib/CodeGen/TailDuplication.cpp vendor/llvm/dist/lib/CodeGen/TailDuplicator.cpp vendor/llvm/dist/lib/CodeGen/TargetFrameLoweringImpl.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringBase.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringObjectFileImpl.cpp vendor/llvm/dist/lib/CodeGen/TargetOptionsImpl.cpp vendor/llvm/dist/lib/CodeGen/TargetPassConfig.cpp vendor/llvm/dist/lib/CodeGen/TargetRegisterInfo.cpp vendor/llvm/dist/lib/CodeGen/TargetSchedule.cpp vendor/llvm/dist/lib/CodeGen/TargetSubtargetInfo.cpp vendor/llvm/dist/lib/CodeGen/VirtRegMap.cpp vendor/llvm/dist/lib/CodeGen/WinEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/XRayInstrumentation.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/CMakeLists.txt vendor/llvm/dist/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsectionVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeTableCollection.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugLine.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDie.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFFormValue.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFGdbIndex.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFUnit.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/LLVMBuild.txt vendor/llvm/dist/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp vendor/llvm/dist/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp vendor/llvm/dist/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp vendor/llvm/dist/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp vendor/llvm/dist/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/PublicsStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBContext.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolBlock.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolCustom.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolFunc.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp vendor/llvm/dist/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp vendor/llvm/dist/lib/DebugInfo/Symbolize/Symbolize.cpp vendor/llvm/dist/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp vendor/llvm/dist/lib/ExecutionEngine/IntelJITEvents/jitprofiling.c vendor/llvm/dist/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp vendor/llvm/dist/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp vendor/llvm/dist/lib/ExecutionEngine/Orc/IndirectionUtils.cpp vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldELFMips.cpp vendor/llvm/dist/lib/ExecutionEngine/SectionMemoryManager.cpp vendor/llvm/dist/lib/Fuzzer/FuzzerDriver.cpp vendor/llvm/dist/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp vendor/llvm/dist/lib/Fuzzer/FuzzerLoop.cpp vendor/llvm/dist/lib/Fuzzer/FuzzerMerge.cpp vendor/llvm/dist/lib/Fuzzer/FuzzerMutate.cpp vendor/llvm/dist/lib/Fuzzer/FuzzerShmemPosix.cpp vendor/llvm/dist/lib/Fuzzer/FuzzerShmemWindows.cpp vendor/llvm/dist/lib/Fuzzer/FuzzerTracePC.cpp vendor/llvm/dist/lib/Fuzzer/FuzzerTraceState.cpp vendor/llvm/dist/lib/Fuzzer/FuzzerUtilWindows.cpp vendor/llvm/dist/lib/Fuzzer/afl/afl_driver.cpp vendor/llvm/dist/lib/Fuzzer/test/AFLDriverTest.cpp vendor/llvm/dist/lib/Fuzzer/test/AbsNegAndConstant64Test.cpp vendor/llvm/dist/lib/Fuzzer/test/AbsNegAndConstantTest.cpp vendor/llvm/dist/lib/Fuzzer/test/AccumulateAllocationsTest.cpp vendor/llvm/dist/lib/Fuzzer/test/BadStrcmpTest.cpp vendor/llvm/dist/lib/Fuzzer/test/BufferOverflowOnInput.cpp vendor/llvm/dist/lib/Fuzzer/test/CallerCalleeTest.cpp vendor/llvm/dist/lib/Fuzzer/test/CleanseTest.cpp vendor/llvm/dist/lib/Fuzzer/test/CustomMutatorTest.cpp vendor/llvm/dist/lib/Fuzzer/test/CxxStringEqTest.cpp vendor/llvm/dist/lib/Fuzzer/test/DSOTestMain.cpp vendor/llvm/dist/lib/Fuzzer/test/DivTest.cpp vendor/llvm/dist/lib/Fuzzer/test/FourIndependentBranchesTest.cpp vendor/llvm/dist/lib/Fuzzer/test/FullCoverageSetTest.cpp vendor/llvm/dist/lib/Fuzzer/test/FuzzerUnittest.cpp vendor/llvm/dist/lib/Fuzzer/test/LeakTest.cpp vendor/llvm/dist/lib/Fuzzer/test/LeakTimeoutTest.cpp vendor/llvm/dist/lib/Fuzzer/test/LoadTest.cpp vendor/llvm/dist/lib/Fuzzer/test/Memcmp64BytesTest.cpp vendor/llvm/dist/lib/Fuzzer/test/MemcmpTest.cpp vendor/llvm/dist/lib/Fuzzer/test/NotinstrumentedTest.cpp vendor/llvm/dist/lib/Fuzzer/test/NthRunCrashTest.cpp vendor/llvm/dist/lib/Fuzzer/test/NullDerefOnEmptyTest.cpp vendor/llvm/dist/lib/Fuzzer/test/NullDerefTest.cpp vendor/llvm/dist/lib/Fuzzer/test/OneHugeAllocTest.cpp vendor/llvm/dist/lib/Fuzzer/test/OutOfMemorySingleLargeMallocTest.cpp vendor/llvm/dist/lib/Fuzzer/test/OutOfMemoryTest.cpp vendor/llvm/dist/lib/Fuzzer/test/RepeatedBytesTest.cpp vendor/llvm/dist/lib/Fuzzer/test/RepeatedMemcmp.cpp vendor/llvm/dist/lib/Fuzzer/test/ShrinkControlFlowTest.cpp vendor/llvm/dist/lib/Fuzzer/test/ShrinkValueProfileTest.cpp vendor/llvm/dist/lib/Fuzzer/test/SignedIntOverflowTest.cpp vendor/llvm/dist/lib/Fuzzer/test/SimpleCmpTest.cpp vendor/llvm/dist/lib/Fuzzer/test/SimpleDictionaryTest.cpp vendor/llvm/dist/lib/Fuzzer/test/SimpleHashTest.cpp vendor/llvm/dist/lib/Fuzzer/test/SimpleTest.cpp vendor/llvm/dist/lib/Fuzzer/test/SimpleThreadedTest.cpp vendor/llvm/dist/lib/Fuzzer/test/SingleByteInputTest.cpp vendor/llvm/dist/lib/Fuzzer/test/SingleMemcmpTest.cpp vendor/llvm/dist/lib/Fuzzer/test/SingleStrcmpTest.cpp vendor/llvm/dist/lib/Fuzzer/test/SingleStrncmpTest.cpp vendor/llvm/dist/lib/Fuzzer/test/SpamyTest.cpp vendor/llvm/dist/lib/Fuzzer/test/StrcmpTest.cpp vendor/llvm/dist/lib/Fuzzer/test/StrncmpOOBTest.cpp vendor/llvm/dist/lib/Fuzzer/test/StrncmpTest.cpp vendor/llvm/dist/lib/Fuzzer/test/StrstrTest.cpp vendor/llvm/dist/lib/Fuzzer/test/SwapCmpTest.cpp vendor/llvm/dist/lib/Fuzzer/test/Switch2Test.cpp vendor/llvm/dist/lib/Fuzzer/test/SwitchTest.cpp vendor/llvm/dist/lib/Fuzzer/test/TableLookupTest.cpp vendor/llvm/dist/lib/Fuzzer/test/ThreadedLeakTest.cpp vendor/llvm/dist/lib/Fuzzer/test/ThreadedTest.cpp vendor/llvm/dist/lib/Fuzzer/test/TimeoutEmptyTest.cpp vendor/llvm/dist/lib/Fuzzer/test/TimeoutTest.cpp vendor/llvm/dist/lib/Fuzzer/test/TraceMallocTest.cpp vendor/llvm/dist/lib/Fuzzer/test/TwoDifferentBugsTest.cpp vendor/llvm/dist/lib/IR/AsmWriter.cpp vendor/llvm/dist/lib/IR/Attributes.cpp vendor/llvm/dist/lib/IR/Comdat.cpp vendor/llvm/dist/lib/IR/ConstantRange.cpp vendor/llvm/dist/lib/IR/Constants.cpp vendor/llvm/dist/lib/IR/Core.cpp vendor/llvm/dist/lib/IR/DIBuilder.cpp vendor/llvm/dist/lib/IR/DataLayout.cpp vendor/llvm/dist/lib/IR/DebugInfo.cpp vendor/llvm/dist/lib/IR/DebugLoc.cpp vendor/llvm/dist/lib/IR/DiagnosticInfo.cpp vendor/llvm/dist/lib/IR/DiagnosticPrinter.cpp vendor/llvm/dist/lib/IR/Dominators.cpp vendor/llvm/dist/lib/IR/Function.cpp vendor/llvm/dist/lib/IR/Globals.cpp vendor/llvm/dist/lib/IR/IRBuilder.cpp vendor/llvm/dist/lib/IR/InlineAsm.cpp vendor/llvm/dist/lib/IR/Instruction.cpp vendor/llvm/dist/lib/IR/Instructions.cpp vendor/llvm/dist/lib/IR/IntrinsicInst.cpp vendor/llvm/dist/lib/IR/LLVMBuild.txt vendor/llvm/dist/lib/IR/LLVMContext.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.h vendor/llvm/dist/lib/IR/LegacyPassManager.cpp vendor/llvm/dist/lib/IR/Metadata.cpp vendor/llvm/dist/lib/IR/Module.cpp vendor/llvm/dist/lib/IR/OptBisect.cpp vendor/llvm/dist/lib/IR/Type.cpp vendor/llvm/dist/lib/IR/TypeFinder.cpp vendor/llvm/dist/lib/IR/ValueSymbolTable.cpp vendor/llvm/dist/lib/IR/Verifier.cpp vendor/llvm/dist/lib/LLVMBuild.txt vendor/llvm/dist/lib/LTO/LTO.cpp vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp vendor/llvm/dist/lib/MC/ELFObjectWriter.cpp vendor/llvm/dist/lib/MC/MCAsmBackend.cpp vendor/llvm/dist/lib/MC/MCAsmInfo.cpp vendor/llvm/dist/lib/MC/MCAsmInfoDarwin.cpp vendor/llvm/dist/lib/MC/MCAsmInfoELF.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCCodeView.cpp vendor/llvm/dist/lib/MC/MCContext.cpp vendor/llvm/dist/lib/MC/MCDisassembler/Disassembler.cpp vendor/llvm/dist/lib/MC/MCDisassembler/MCRelocationInfo.cpp vendor/llvm/dist/lib/MC/MCDwarf.cpp vendor/llvm/dist/lib/MC/MCELFStreamer.cpp vendor/llvm/dist/lib/MC/MCExpr.cpp vendor/llvm/dist/lib/MC/MCFragment.cpp vendor/llvm/dist/lib/MC/MCInstPrinter.cpp vendor/llvm/dist/lib/MC/MCInstrAnalysis.cpp vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp vendor/llvm/dist/lib/MC/MCNullStreamer.cpp vendor/llvm/dist/lib/MC/MCObjectFileInfo.cpp vendor/llvm/dist/lib/MC/MCObjectWriter.cpp vendor/llvm/dist/lib/MC/MCParser/AsmLexer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/COFFAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/DarwinAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/ELFAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/MCAsmLexer.cpp vendor/llvm/dist/lib/MC/MCParser/MCAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/MCTargetAsmParser.cpp vendor/llvm/dist/lib/MC/MCRegisterInfo.cpp vendor/llvm/dist/lib/MC/MCSection.cpp vendor/llvm/dist/lib/MC/MCSectionCOFF.cpp vendor/llvm/dist/lib/MC/MCSectionELF.cpp vendor/llvm/dist/lib/MC/MCStreamer.cpp vendor/llvm/dist/lib/MC/MCSubtargetInfo.cpp vendor/llvm/dist/lib/MC/MCSymbol.cpp vendor/llvm/dist/lib/MC/MCSymbolELF.cpp vendor/llvm/dist/lib/MC/MCTargetOptions.cpp vendor/llvm/dist/lib/MC/MCWasmObjectTargetWriter.cpp vendor/llvm/dist/lib/MC/MCWinEH.cpp vendor/llvm/dist/lib/MC/MachObjectWriter.cpp vendor/llvm/dist/lib/MC/StringTableBuilder.cpp vendor/llvm/dist/lib/MC/SubtargetFeature.cpp vendor/llvm/dist/lib/MC/WasmObjectWriter.cpp vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/MC/WinCOFFStreamer.cpp vendor/llvm/dist/lib/Object/Archive.cpp vendor/llvm/dist/lib/Object/ArchiveWriter.cpp vendor/llvm/dist/lib/Object/Binary.cpp vendor/llvm/dist/lib/Object/COFFImportFile.cpp vendor/llvm/dist/lib/Object/COFFObjectFile.cpp vendor/llvm/dist/lib/Object/Decompressor.cpp vendor/llvm/dist/lib/Object/ELF.cpp vendor/llvm/dist/lib/Object/ELFObjectFile.cpp vendor/llvm/dist/lib/Object/IRObjectFile.cpp vendor/llvm/dist/lib/Object/IRSymtab.cpp vendor/llvm/dist/lib/Object/LLVMBuild.txt vendor/llvm/dist/lib/Object/MachOObjectFile.cpp vendor/llvm/dist/lib/Object/ModuleSymbolTable.cpp vendor/llvm/dist/lib/Object/Object.cpp vendor/llvm/dist/lib/Object/ObjectFile.cpp vendor/llvm/dist/lib/Object/SymbolicFile.cpp vendor/llvm/dist/lib/Object/WasmObjectFile.cpp vendor/llvm/dist/lib/Object/WindowsResource.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLSymbols.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLTypes.cpp vendor/llvm/dist/lib/ObjectYAML/DWARFEmitter.cpp vendor/llvm/dist/lib/ObjectYAML/DWARFVisitor.h vendor/llvm/dist/lib/ObjectYAML/ELFYAML.cpp vendor/llvm/dist/lib/ObjectYAML/MachOYAML.cpp vendor/llvm/dist/lib/ObjectYAML/ObjectYAML.cpp vendor/llvm/dist/lib/ObjectYAML/WasmYAML.cpp vendor/llvm/dist/lib/Option/Arg.cpp vendor/llvm/dist/lib/Passes/PassBuilder.cpp vendor/llvm/dist/lib/ProfileData/Coverage/CoverageMapping.cpp vendor/llvm/dist/lib/ProfileData/Coverage/CoverageMappingWriter.cpp vendor/llvm/dist/lib/ProfileData/InstrProf.cpp vendor/llvm/dist/lib/ProfileData/InstrProfReader.cpp vendor/llvm/dist/lib/ProfileData/InstrProfWriter.cpp vendor/llvm/dist/lib/ProfileData/SampleProfWriter.cpp vendor/llvm/dist/lib/Support/ARMAttributeParser.cpp vendor/llvm/dist/lib/Support/ARMBuildAttrs.cpp vendor/llvm/dist/lib/Support/Atomic.cpp vendor/llvm/dist/lib/Support/CMakeLists.txt vendor/llvm/dist/lib/Support/CommandLine.cpp vendor/llvm/dist/lib/Support/ConvertUTF.cpp vendor/llvm/dist/lib/Support/ConvertUTFWrapper.cpp vendor/llvm/dist/lib/Support/Errno.cpp vendor/llvm/dist/lib/Support/Error.cpp vendor/llvm/dist/lib/Support/FormattedStream.cpp vendor/llvm/dist/lib/Support/LockFileManager.cpp vendor/llvm/dist/lib/Support/MD5.cpp vendor/llvm/dist/lib/Support/Mutex.cpp vendor/llvm/dist/lib/Support/Path.cpp vendor/llvm/dist/lib/Support/PrettyStackTrace.cpp vendor/llvm/dist/lib/Support/Process.cpp vendor/llvm/dist/lib/Support/RWMutex.cpp vendor/llvm/dist/lib/Support/SHA1.cpp vendor/llvm/dist/lib/Support/Signals.cpp vendor/llvm/dist/lib/Support/SourceMgr.cpp vendor/llvm/dist/lib/Support/SpecialCaseList.cpp vendor/llvm/dist/lib/Support/Statistic.cpp vendor/llvm/dist/lib/Support/StringExtras.cpp vendor/llvm/dist/lib/Support/TargetRegistry.cpp vendor/llvm/dist/lib/Support/ThreadLocal.cpp vendor/llvm/dist/lib/Support/Timer.cpp vendor/llvm/dist/lib/Support/TrigramIndex.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Support/Unix/DynamicLibrary.inc vendor/llvm/dist/lib/Support/Unix/Path.inc vendor/llvm/dist/lib/Support/Unix/Signals.inc vendor/llvm/dist/lib/Support/Unix/Threading.inc vendor/llvm/dist/lib/Support/Windows/DynamicLibrary.inc vendor/llvm/dist/lib/Support/Windows/WindowsSupport.h vendor/llvm/dist/lib/Support/YAMLParser.cpp vendor/llvm/dist/lib/TableGen/StringMatcher.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64AsmPrinter.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64FastISel.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64LegalizerInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterBankInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64TargetObjectFile.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAsmPrinter.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUCallLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstrInfo.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstructionSelector.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUMachineFunction.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPURegisterBankInfo.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPURegisterInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp vendor/llvm/dist/lib/Target/AMDGPU/CMakeLists.txt vendor/llvm/dist/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp vendor/llvm/dist/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h vendor/llvm/dist/lib/Target/AMDGPU/GCNHazardRecognizer.cpp vendor/llvm/dist/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUCodeObjectMetadataStreamer.cpp vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUCodeObjectMetadataStreamer.h vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp vendor/llvm/dist/lib/Target/AMDGPU/Processors.td vendor/llvm/dist/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600EmitClauseMarkers.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600FrameLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600ISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600InstrInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600MachineScheduler.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600Packetizer.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIFixSGPRCopies.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIFoldOperands.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIFrameLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInsertWaitcnts.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SILowerControlFlow.cpp vendor/llvm/dist/lib/Target/AMDGPU/SILowerI1Copies.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SIMachineScheduler.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIPeepholeSDWA.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIRegisterInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIRegisterInfo.h vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h vendor/llvm/dist/lib/Target/AMDGPU/VOP3Instructions.td vendor/llvm/dist/lib/Target/ARM/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMCallLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp vendor/llvm/dist/lib/Target/ARM/ARMFastISel.cpp vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrVFP.td vendor/llvm/dist/lib/Target/ARM/ARMInstructionSelector.cpp vendor/llvm/dist/lib/Target/ARM/ARMLegalizerInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMMCInstLower.cpp vendor/llvm/dist/lib/Target/ARM/ARMRegisterBankInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetObjectFile.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/MCTargetDesc/ARMAsmBackend.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMachORelocationInfo.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1FrameLowering.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2SizeReduction.cpp vendor/llvm/dist/lib/Target/AVR/AVR.h vendor/llvm/dist/lib/Target/AVR/AVRAsmPrinter.cpp vendor/llvm/dist/lib/Target/AVR/AVRRegisterInfo.cpp vendor/llvm/dist/lib/Target/AVR/AVRSubtarget.cpp vendor/llvm/dist/lib/Target/AVR/AVRSubtarget.h vendor/llvm/dist/lib/Target/AVR/AVRTargetMachine.cpp vendor/llvm/dist/lib/Target/AVR/AVRTargetObjectFile.cpp vendor/llvm/dist/lib/Target/AVR/AsmParser/AVRAsmParser.cpp vendor/llvm/dist/lib/Target/AVR/Disassembler/AVRDisassembler.cpp vendor/llvm/dist/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.cpp vendor/llvm/dist/lib/Target/AVR/MCTargetDesc/AVRMCExpr.cpp vendor/llvm/dist/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp vendor/llvm/dist/lib/Target/BPF/BPFAsmPrinter.cpp vendor/llvm/dist/lib/Target/BPF/BPFInstrInfo.cpp vendor/llvm/dist/lib/Target/BPF/BPFRegisterInfo.cpp vendor/llvm/dist/lib/Target/BPF/BPFTargetMachine.cpp vendor/llvm/dist/lib/Target/BPF/Disassembler/BPFDisassembler.cpp vendor/llvm/dist/lib/Target/BPF/InstPrinter/BPFInstPrinter.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.h vendor/llvm/dist/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp vendor/llvm/dist/lib/Target/Hexagon/BitTracker.cpp vendor/llvm/dist/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonAsmPrinter.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonBitSimplify.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonBitTracker.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonBlockRanges.h vendor/llvm/dist/lib/Target/Hexagon/HexagonCommonGEP.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonConstPropagation.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonCopyToCombine.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonEarlyIfConv.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFixupHwLoops.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonGenExtract.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonGenInsert.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonGenMux.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonISelLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonMachineScheduler.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonPatterns.td vendor/llvm/dist/lib/Target/Hexagon/HexagonSplitDouble.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetMachine.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetObjectFile.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp vendor/llvm/dist/lib/Target/Hexagon/RDFDeadCode.cpp vendor/llvm/dist/lib/Target/Hexagon/RDFGraph.cpp vendor/llvm/dist/lib/Target/Hexagon/RDFLiveness.cpp vendor/llvm/dist/lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp vendor/llvm/dist/lib/Target/Lanai/LanaiTargetObjectFile.cpp vendor/llvm/dist/lib/Target/Lanai/MCTargetDesc/LanaiELFObjectWriter.cpp vendor/llvm/dist/lib/Target/Lanai/MCTargetDesc/LanaiMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430AsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp vendor/llvm/dist/lib/Target/Mips/Disassembler/MipsDisassembler.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp vendor/llvm/dist/lib/Target/Mips/Mips.td vendor/llvm/dist/lib/Target/Mips/Mips16FrameLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/MipsCCState.cpp vendor/llvm/dist/lib/Target/Mips/MipsCCState.h vendor/llvm/dist/lib/Target/Mips/MipsCallingConv.td vendor/llvm/dist/lib/Target/Mips/MipsConstantIslandPass.cpp vendor/llvm/dist/lib/Target/Mips/MipsDSPInstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsFastISel.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsMachineFunction.cpp vendor/llvm/dist/lib/Target/Mips/MipsOptimizePICCall.cpp vendor/llvm/dist/lib/Target/Mips/MipsOs16.cpp vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEFrameLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsSubtarget.cpp vendor/llvm/dist/lib/Target/Mips/MipsSubtarget.h vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.cpp vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXAsmPrinter.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXISelLowering.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXInstrInfo.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXLowerArgs.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXPeephole.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetMachine.cpp vendor/llvm/dist/lib/Target/NVPTX/NVVMIntrRange.cpp vendor/llvm/dist/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCBoolRetToInt.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCBranchSelector.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCCTRLoops.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCEarlyReturn.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCFastISel.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrVSX.td vendor/llvm/dist/lib/Target/PowerPC/PPCMCInstLower.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCMIPeephole.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTLSDynamicCall.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTOCRegDeps.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCVSXCopy.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCVSXFMAMutate.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp vendor/llvm/dist/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp vendor/llvm/dist/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.h vendor/llvm/dist/lib/Target/RISCV/RISCVTargetMachine.cpp vendor/llvm/dist/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp vendor/llvm/dist/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp vendor/llvm/dist/lib/Target/Sparc/SparcAsmPrinter.cpp vendor/llvm/dist/lib/Target/Sparc/SparcMCInstLower.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetObjectFile.cpp vendor/llvm/dist/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZHazardRecognizer.h vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZLDCleanup.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZShortenInst.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZSubtarget.h vendor/llvm/dist/lib/Target/SystemZ/SystemZTDC.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetMachine.cpp vendor/llvm/dist/lib/Target/Target.cpp vendor/llvm/dist/lib/Target/TargetLoweringObjectFile.cpp vendor/llvm/dist/lib/Target/TargetMachineC.cpp vendor/llvm/dist/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp vendor/llvm/dist/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyFastISel.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyLowerBrUnless.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyPrepareForLiveIntervals.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyReplacePhysRegs.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblySetP2AlignOperands.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86Operand.h vendor/llvm/dist/lib/Target/X86/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp vendor/llvm/dist/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/InstPrinter/X86InstComments.cpp vendor/llvm/dist/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86FrameLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp 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/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/X86OptimizeLEAs.cpp vendor/llvm/dist/lib/Target/X86/X86SchedHaswell.td vendor/llvm/dist/lib/Target/X86/X86SchedSandyBridge.td vendor/llvm/dist/lib/Target/X86/X86Schedule.td vendor/llvm/dist/lib/Target/X86/X86ScheduleBtVer2.td vendor/llvm/dist/lib/Target/X86/X86ScheduleSLM.td vendor/llvm/dist/lib/Target/X86/X86SelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.cpp vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.h vendor/llvm/dist/lib/Target/X86/X86WinEHState.cpp vendor/llvm/dist/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp vendor/llvm/dist/lib/Target/XCore/XCoreAsmPrinter.cpp vendor/llvm/dist/lib/Target/XCore/XCoreTargetMachine.cpp vendor/llvm/dist/lib/Target/XCore/XCoreTargetMachine.h vendor/llvm/dist/lib/Target/XCore/XCoreTargetObjectFile.cpp vendor/llvm/dist/lib/ToolDrivers/llvm-lib/LLVMBuild.txt vendor/llvm/dist/lib/ToolDrivers/llvm-lib/LibDriver.cpp vendor/llvm/dist/lib/Transforms/Coroutines/CoroSplit.cpp vendor/llvm/dist/lib/Transforms/IPO/ElimAvailExtern.cpp vendor/llvm/dist/lib/Transforms/IPO/ExtractGV.cpp vendor/llvm/dist/lib/Transforms/IPO/FunctionAttrs.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalSplit.cpp vendor/llvm/dist/lib/Transforms/IPO/IPConstantPropagation.cpp vendor/llvm/dist/lib/Transforms/IPO/IPO.cpp vendor/llvm/dist/lib/Transforms/IPO/InferFunctionAttrs.cpp vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp vendor/llvm/dist/lib/Transforms/IPO/LoopExtractor.cpp vendor/llvm/dist/lib/Transforms/IPO/LowerTypeTests.cpp vendor/llvm/dist/lib/Transforms/IPO/PruneEH.cpp vendor/llvm/dist/lib/Transforms/IPO/SampleProfile.cpp vendor/llvm/dist/lib/Transforms/IPO/StripSymbols.cpp vendor/llvm/dist/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp vendor/llvm/dist/lib/Transforms/IPO/WholeProgramDevirt.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAddSub.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineInternal.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombinePHI.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineVectorOps.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/BoundsChecking.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/InstrProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/ThreadSanitizer.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/BlotMapVector.h vendor/llvm/dist/lib/Transforms/ObjCARC/DependencyAnalysis.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARCContract.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARCOpts.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ProvenanceAnalysisEvaluator.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/PtrState.h vendor/llvm/dist/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp vendor/llvm/dist/lib/Transforms/Scalar/ConstantProp.cpp vendor/llvm/dist/lib/Transforms/Scalar/DCE.cpp vendor/llvm/dist/lib/Transforms/Scalar/FlattenCFGPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVNHoist.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVNSink.cpp vendor/llvm/dist/lib/Transforms/Scalar/GuardWidening.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/InferAddressSpaces.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoadCombine.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopIdiomRecognize.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopPredication.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopRerollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp vendor/llvm/dist/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reg2Mem.cpp vendor/llvm/dist/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/SROA.cpp vendor/llvm/dist/lib/Transforms/Scalar/Scalar.cpp vendor/llvm/dist/lib/Transforms/Scalar/Scalarizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/Sink.cpp vendor/llvm/dist/lib/Transforms/Scalar/StructurizeCFG.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailRecursionElimination.cpp vendor/llvm/dist/lib/Transforms/Utils/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneModule.cpp vendor/llvm/dist/lib/Transforms/Utils/DemoteRegToStack.cpp vendor/llvm/dist/lib/Transforms/Utils/Evaluator.cpp vendor/llvm/dist/lib/Transforms/Utils/FlattenCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/FunctionComparator.cpp vendor/llvm/dist/lib/Transforms/Utils/FunctionImportUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/GlobalStatus.cpp vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/InstructionNamer.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerMemIntrinsics.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerSwitch.cpp vendor/llvm/dist/lib/Transforms/Utils/MetaRenamer.cpp vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp vendor/llvm/dist/lib/Transforms/Utils/SanitizerStats.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyInstructions.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/StripGCRelocates.cpp vendor/llvm/dist/lib/Transforms/Utils/StripNonLineTableDebugInfo.cpp vendor/llvm/dist/lib/Transforms/Utils/SymbolRewriter.cpp vendor/llvm/dist/lib/Transforms/Utils/Utils.cpp vendor/llvm/dist/lib/Transforms/Vectorize/BBVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/Vectorize.cpp vendor/llvm/dist/lib/XRay/InstrumentationMap.cpp vendor/llvm/dist/test/Analysis/ConstantFolding/gep-constanfolding-error.ll vendor/llvm/dist/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll vendor/llvm/dist/test/Bindings/OCaml/core.ml vendor/llvm/dist/test/Bitcode/ptest-old.ll vendor/llvm/dist/test/CMakeLists.txt vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator-stackprotect.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/call-translator-ios.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/call-translator.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/debug-insts.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/localizer-in-O0-pipeline.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/localizer.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/regbankselect-dbg-value.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/regbankselect-default.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-binop.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-bitcast.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-fp-casts.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-int-ext.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-int-ptr-casts.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-load.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-muladd.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-store.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-trunc.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-xor.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/varargs-ios-translator.ll vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/regbankselect.mir vendor/llvm/dist/test/CodeGen/AMDGPU/add.v2i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ashr.v2i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/branch-relax-spill.ll vendor/llvm/dist/test/CodeGen/AMDGPU/clamp-omod-special-case.mir vendor/llvm/dist/test/CodeGen/AMDGPU/exceed-max-sgprs.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fabs.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fadd.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fcanonicalize.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/flat-scratch-reg.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmul.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fneg-fabs.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fneg.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fptosi.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fptoui.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fsub.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/hsa-note-no-func.ll vendor/llvm/dist/test/CodeGen/AMDGPU/illegal-sgpr-to-vgpr-copy.ll vendor/llvm/dist/test/CodeGen/AMDGPU/immv216.ll vendor/llvm/dist/test/CodeGen/AMDGPU/indirect-addressing-si.ll vendor/llvm/dist/test/CodeGen/AMDGPU/inline-asm.ll vendor/llvm/dist/test/CodeGen/AMDGPU/insert_vector_elt.v2i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/limit-coalesce.mir vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.mqsad.pk.u16.u8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.mqsad.u32.u8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.qsad.pk.u16.u8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.fmuladd.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.maxnum.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.minnum.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/partial-sgpr-to-vgpr-spills.ll vendor/llvm/dist/test/CodeGen/AMDGPU/scratch-simple.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-peephole.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shl.v2i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-spill-sgpr-stack.ll vendor/llvm/dist/test/CodeGen/AMDGPU/skip-if-dead.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sminmax.v2i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/spill-scavenge-offset.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sub.v2i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/undefined-subreg-liverange.ll vendor/llvm/dist/test/CodeGen/AMDGPU/v_mac_f16.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-instruction-select.mir vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-irtranslator.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-isel.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-legalize-fp.mir vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-regbankselect.mir vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-vfma.ll vendor/llvm/dist/test/CodeGen/ARM/invalidated-save-point.ll vendor/llvm/dist/test/CodeGen/Generic/llc-start-stop.ll vendor/llvm/dist/test/CodeGen/MIR/AArch64/generic-virtual-registers-error.mir vendor/llvm/dist/test/CodeGen/MIR/AArch64/generic-virtual-registers-with-regbank-error.mir vendor/llvm/dist/test/CodeGen/MIR/AArch64/register-operand-bank.mir vendor/llvm/dist/test/CodeGen/MIR/AArch64/stack-object-local-offset.mir vendor/llvm/dist/test/CodeGen/MIR/Generic/frame-info.mir vendor/llvm/dist/test/CodeGen/MIR/X86/callee-saved-info.mir vendor/llvm/dist/test/CodeGen/MIR/X86/fixed-stack-objects.mir vendor/llvm/dist/test/CodeGen/MIR/X86/generic-instr-type.mir vendor/llvm/dist/test/CodeGen/MIR/X86/register-operand-class.mir vendor/llvm/dist/test/CodeGen/MIR/X86/simple-register-allocation-hints.mir vendor/llvm/dist/test/CodeGen/MIR/X86/spill-slot-fixed-stack-objects.mir vendor/llvm/dist/test/CodeGen/MIR/X86/stack-object-debug-info.mir vendor/llvm/dist/test/CodeGen/MIR/X86/stack-objects.mir vendor/llvm/dist/test/CodeGen/MIR/X86/variable-sized-stack-objects.mir vendor/llvm/dist/test/CodeGen/MIR/X86/virtual-registers.mir vendor/llvm/dist/test/CodeGen/Mips/biggot.ll vendor/llvm/dist/test/CodeGen/Mips/ctlz-v.ll vendor/llvm/dist/test/CodeGen/Mips/cttz-v.ll vendor/llvm/dist/test/CodeGen/Mips/dsp-r1.ll vendor/llvm/dist/test/CodeGen/Mips/fmadd1.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/mul.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/sdiv.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/srem.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/udiv.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/urem.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-gp-rc.ll vendor/llvm/dist/test/CodeGen/Mips/mips64fpldst.ll vendor/llvm/dist/test/CodeGen/Mips/return-vector.ll vendor/llvm/dist/test/CodeGen/Mips/tailcall/tailcall.ll vendor/llvm/dist/test/CodeGen/PowerPC/BoolRetToIntTest.ll vendor/llvm/dist/test/CodeGen/PowerPC/crbits.ll vendor/llvm/dist/test/CodeGen/PowerPC/logic-ops-on-compares.ll vendor/llvm/dist/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc-crbits-onoff.ll vendor/llvm/dist/test/CodeGen/PowerPC/setcc-logic.ll vendor/llvm/dist/test/CodeGen/X86/2006-05-11-InstrSched.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/irtranslator-callingconv.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-mul-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-mul-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-mul-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-mul-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-AVX2.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-AVX512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-X32.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-X86_64.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add-x32.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-cmp.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-constant.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-ext-x86-64.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-ext.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-gep.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-inc.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-leaf-constant.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-scalar-x32.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-mul-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-mul-vec.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-sub-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-sub-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-sub-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-sub.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-trunc.mir vendor/llvm/dist/test/CodeGen/X86/O0-pipeline.ll vendor/llvm/dist/test/CodeGen/X86/atom-fixup-lea3.ll vendor/llvm/dist/test/CodeGen/X86/avx-schedule.ll vendor/llvm/dist/test/CodeGen/X86/avx-splat.ll vendor/llvm/dist/test/CodeGen/X86/avx512-cvt.ll vendor/llvm/dist/test/CodeGen/X86/build-vector-128.ll vendor/llvm/dist/test/CodeGen/X86/buildvec-insertvec.ll vendor/llvm/dist/test/CodeGen/X86/clear_upper_vector_element_bits.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-nontemporal.ll vendor/llvm/dist/test/CodeGen/X86/full-lsr.ll vendor/llvm/dist/test/CodeGen/X86/haddsub-2.ll vendor/llvm/dist/test/CodeGen/X86/haddsub-undef.ll vendor/llvm/dist/test/CodeGen/X86/hoist-spill.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce4.ll vendor/llvm/dist/test/CodeGen/X86/madd.ll vendor/llvm/dist/test/CodeGen/X86/masked-iv-safe.ll vendor/llvm/dist/test/CodeGen/X86/memcmp.ll vendor/llvm/dist/test/CodeGen/X86/merge-consecutive-loads-128.ll vendor/llvm/dist/test/CodeGen/X86/mul-constant-i16.ll vendor/llvm/dist/test/CodeGen/X86/mul-constant-i32.ll vendor/llvm/dist/test/CodeGen/X86/mul-constant-i64.ll vendor/llvm/dist/test/CodeGen/X86/nontemporal-loads.ll vendor/llvm/dist/test/CodeGen/X86/select.ll vendor/llvm/dist/test/CodeGen/X86/sse-intrinsics-fast-isel.ll vendor/llvm/dist/test/CodeGen/X86/sse1.ll vendor/llvm/dist/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll vendor/llvm/dist/test/CodeGen/X86/sse3-avx-addsub-2.ll vendor/llvm/dist/test/CodeGen/X86/sse42-intrinsics-fast-isel.ll vendor/llvm/dist/test/CodeGen/X86/stack-folding-fp-avx1.ll vendor/llvm/dist/test/CodeGen/X86/stack-folding-int-sse42.ll vendor/llvm/dist/test/CodeGen/X86/trunc-to-bool.ll vendor/llvm/dist/test/CodeGen/X86/vec_fp_to_int.ll vendor/llvm/dist/test/CodeGen/X86/vec_int_to_fp.ll vendor/llvm/dist/test/CodeGen/X86/vec_set.ll vendor/llvm/dist/test/CodeGen/X86/vector-compare-results.ll vendor/llvm/dist/test/CodeGen/X86/vector-rem.ll vendor/llvm/dist/test/CodeGen/X86/vector-sext.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-variable-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-sqrt.ll vendor/llvm/dist/test/CodeGen/X86/vector-unsigned-cmp.ll vendor/llvm/dist/test/CodeGen/X86/virtual-registers-cleared-in-machine-functions-liveins.ll vendor/llvm/dist/test/CodeGen/X86/vshift-1.ll vendor/llvm/dist/test/CodeGen/X86/vshift-2.ll vendor/llvm/dist/test/CodeGen/X86/x86-interleaved-access.ll vendor/llvm/dist/test/DebugInfo/PDB/DIA/pdbdump-flags.test vendor/llvm/dist/test/DebugInfo/PDB/DIA/pdbdump-linenumbers.test vendor/llvm/dist/test/DebugInfo/PDB/DIA/pdbdump-symbol-format.test vendor/llvm/dist/test/DebugInfo/PDB/Native/pdb-native-compilands.test vendor/llvm/dist/test/DebugInfo/PDB/Native/pdb-native-summary.test vendor/llvm/dist/test/DebugInfo/PDB/pdb-longname-truncation.test vendor/llvm/dist/test/DebugInfo/PDB/pdb-minimal-construct.test vendor/llvm/dist/test/DebugInfo/PDB/pdb-yaml-symbols.test vendor/llvm/dist/test/DebugInfo/PDB/pdb-yaml-types.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-headers.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-merge-ids-and-types.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-mergeids.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-mergetypes.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-raw-blocks.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-raw-stream.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-readwrite.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-source-names.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-write.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-yaml-types.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-yaml.test vendor/llvm/dist/test/FileCheck/check-dag.txt vendor/llvm/dist/test/Instrumentation/MemorySanitizer/csr.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/msan_x86intrinsics.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/vector_arith.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/vector_cmp.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/vector_cvt.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/vector_pack.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/vector_shift.ll vendor/llvm/dist/test/MC/AMDGPU/sopp-err.s vendor/llvm/dist/test/MC/AMDGPU/sym_option.s vendor/llvm/dist/test/MC/ARM/big-endian-thumb2-fixup.s vendor/llvm/dist/test/MC/ARM/thumb2-diagnostics.s vendor/llvm/dist/test/MC/Disassembler/Mips/micromips-dsp/valid.txt vendor/llvm/dist/test/MC/MachO/variable-exprs.s vendor/llvm/dist/test/MC/Mips/dsp/invalid.s vendor/llvm/dist/test/MC/Mips/micromips-dsp/invalid.s vendor/llvm/dist/test/MC/Mips/micromips-dsp/valid.s vendor/llvm/dist/test/MC/WebAssembly/reloc-code.ll vendor/llvm/dist/test/Object/AMDGPU/elf-definitions.yaml vendor/llvm/dist/test/Transforms/ConstProp/sse.ll vendor/llvm/dist/test/Transforms/DCE/calls-errno.ll vendor/llvm/dist/test/Transforms/GVNSink/sink-common-code.ll vendor/llvm/dist/test/Transforms/Inline/basictest.ll vendor/llvm/dist/test/Transforms/InstCombine/insert-extract-shuffle.ll vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll vendor/llvm/dist/test/Transforms/InstCombine/lshr.ll vendor/llvm/dist/test/Transforms/InstSimplify/call.ll vendor/llvm/dist/test/Transforms/InstSimplify/compare.ll vendor/llvm/dist/test/Transforms/InstSimplify/vector_gep.ll vendor/llvm/dist/test/Transforms/InterleavedAccess/X86/interleaved-accesses-64bits-avx.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/canonical.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/ivchain-X86.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/lsr-expand-quadratic.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/lsr-insns-1.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/lsr-insns-2.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/nested-loop.ll vendor/llvm/dist/test/Transforms/LoopVectorize/AArch64/loop-vectorization-factors.ll vendor/llvm/dist/test/Transforms/LowerTypeTests/simple.ll vendor/llvm/dist/test/Transforms/NewGVN/completeness.ll vendor/llvm/dist/test/Transforms/NewGVN/loadforward.ll vendor/llvm/dist/test/Transforms/NewGVN/pr32403.ll vendor/llvm/dist/test/Transforms/NewGVN/pr32897.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/arith-fp.ll vendor/llvm/dist/test/Transforms/SROA/address-spaces.ll vendor/llvm/dist/test/Transforms/SampleProfile/Inputs/indirect-call.prof vendor/llvm/dist/test/Transforms/SampleProfile/indirect-call.ll vendor/llvm/dist/test/Transforms/ThinLTOBitcodeWriter/split.ll vendor/llvm/dist/test/Transforms/Util/PredicateInfo/condprop2.ll vendor/llvm/dist/test/Transforms/Util/PredicateInfo/testandor2.ll vendor/llvm/dist/test/lit.cfg vendor/llvm/dist/test/lit.site.cfg.in vendor/llvm/dist/test/tools/llvm-pdbdump/class-layout.test vendor/llvm/dist/test/tools/llvm-pdbdump/complex-padding-graphical.test vendor/llvm/dist/test/tools/llvm-pdbdump/enum-layout.test vendor/llvm/dist/test/tools/llvm-pdbdump/load-address.test vendor/llvm/dist/test/tools/llvm-pdbdump/raw-stream-data.test vendor/llvm/dist/test/tools/llvm-pdbdump/regex-filter.test vendor/llvm/dist/test/tools/llvm-pdbdump/simple-padding-graphical.test vendor/llvm/dist/test/tools/llvm-pdbdump/symbol-filters.test vendor/llvm/dist/test/tools/llvm-readobj/elf-sec-flags.test vendor/llvm/dist/tools/LLVMBuild.txt vendor/llvm/dist/tools/bugpoint/OptimizerDriver.cpp vendor/llvm/dist/tools/dsymutil/DwarfLinker.cpp vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp vendor/llvm/dist/tools/llvm-cvtres/LLVMBuild.txt vendor/llvm/dist/tools/llvm-cvtres/llvm-cvtres.cpp vendor/llvm/dist/tools/llvm-cvtres/llvm-cvtres.h vendor/llvm/dist/tools/llvm-dwarfdump/llvm-dwarfdump.cpp vendor/llvm/dist/tools/llvm-lto2/llvm-lto2.cpp vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/llvm-nm/llvm-nm.cpp vendor/llvm/dist/tools/llvm-objdump/MachODump.cpp vendor/llvm/dist/tools/llvm-readobj/CMakeLists.txt vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/tools/llvm-readobj/COFFImportDumper.cpp vendor/llvm/dist/tools/llvm-readobj/ELFDumper.cpp vendor/llvm/dist/tools/llvm-readobj/LLVMBuild.txt vendor/llvm/dist/tools/llvm-stress/llvm-stress.cpp vendor/llvm/dist/tools/llvm-xray/xray-extract.cc vendor/llvm/dist/tools/obj2yaml/dwarf2yaml.cpp vendor/llvm/dist/tools/obj2yaml/macho2yaml.cpp vendor/llvm/dist/tools/yaml2obj/yaml2elf.cpp vendor/llvm/dist/tools/yaml2obj/yaml2macho.cpp vendor/llvm/dist/unittests/ADT/DAGDeltaAlgorithmTest.cpp vendor/llvm/dist/unittests/ADT/DeltaAlgorithmTest.cpp vendor/llvm/dist/unittests/ADT/DenseMapTest.cpp vendor/llvm/dist/unittests/ADT/DepthFirstIteratorTest.cpp vendor/llvm/dist/unittests/ADT/FoldingSet.cpp vendor/llvm/dist/unittests/ADT/HashingTest.cpp vendor/llvm/dist/unittests/ADT/ImmutableMapTest.cpp vendor/llvm/dist/unittests/ADT/ImmutableSetTest.cpp vendor/llvm/dist/unittests/ADT/IteratorTest.cpp vendor/llvm/dist/unittests/ADT/MapVectorTest.cpp vendor/llvm/dist/unittests/ADT/OptionalTest.cpp vendor/llvm/dist/unittests/ADT/PointerEmbeddedIntTest.cpp vendor/llvm/dist/unittests/ADT/PointerIntPairTest.cpp vendor/llvm/dist/unittests/ADT/PointerSumTypeTest.cpp vendor/llvm/dist/unittests/ADT/PointerUnionTest.cpp vendor/llvm/dist/unittests/ADT/PostOrderIteratorTest.cpp vendor/llvm/dist/unittests/ADT/RangeAdapterTest.cpp vendor/llvm/dist/unittests/ADT/ReverseIterationTest.cpp vendor/llvm/dist/unittests/ADT/SCCIteratorTest.cpp vendor/llvm/dist/unittests/ADT/SmallPtrSetTest.cpp vendor/llvm/dist/unittests/ADT/SmallVectorTest.cpp vendor/llvm/dist/unittests/ADT/TripleTest.cpp vendor/llvm/dist/unittests/ADT/TwineTest.cpp vendor/llvm/dist/unittests/ADT/VariadicFunctionTest.cpp vendor/llvm/dist/unittests/Analysis/BranchProbabilityInfoTest.cpp vendor/llvm/dist/unittests/Analysis/CFGTest.cpp vendor/llvm/dist/unittests/Analysis/CMakeLists.txt vendor/llvm/dist/unittests/Analysis/LazyCallGraphTest.cpp vendor/llvm/dist/unittests/Analysis/MemorySSA.cpp vendor/llvm/dist/unittests/Analysis/ProfileSummaryInfoTest.cpp vendor/llvm/dist/unittests/Analysis/ScalarEvolutionTest.cpp vendor/llvm/dist/unittests/Analysis/TBAATest.cpp vendor/llvm/dist/unittests/Analysis/UnrollAnalyzer.cpp vendor/llvm/dist/unittests/Bitcode/BitstreamReaderTest.cpp vendor/llvm/dist/unittests/Bitcode/BitstreamWriterTest.cpp vendor/llvm/dist/unittests/CMakeLists.txt vendor/llvm/dist/unittests/CodeGen/DIEHashTest.cpp vendor/llvm/dist/unittests/CodeGen/MachineInstrBundleIteratorTest.cpp vendor/llvm/dist/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp vendor/llvm/dist/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp vendor/llvm/dist/unittests/DebugInfo/DWARF/DwarfGenerator.cpp vendor/llvm/dist/unittests/ExecutionEngine/ExecutionEngineTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/MCJITMultipleModuleTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/IndirectionUtilsTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/LazyEmittingLayerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/OrcTestCommon.h vendor/llvm/dist/unittests/ExecutionEngine/Orc/QueueChannel.h vendor/llvm/dist/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp vendor/llvm/dist/unittests/IR/AsmWriterTest.cpp vendor/llvm/dist/unittests/IR/ConstantRangeTest.cpp vendor/llvm/dist/unittests/IR/ConstantsTest.cpp vendor/llvm/dist/unittests/IR/DebugTypeODRUniquingTest.cpp vendor/llvm/dist/unittests/IR/DominatorTreeTest.cpp vendor/llvm/dist/unittests/IR/IRBuilderTest.cpp vendor/llvm/dist/unittests/IR/MetadataTest.cpp vendor/llvm/dist/unittests/IR/ModuleTest.cpp vendor/llvm/dist/unittests/IR/PassManagerTest.cpp vendor/llvm/dist/unittests/IR/PatternMatch.cpp vendor/llvm/dist/unittests/IR/UserTest.cpp vendor/llvm/dist/unittests/IR/ValueTest.cpp vendor/llvm/dist/unittests/IR/VerifierTest.cpp vendor/llvm/dist/unittests/Linker/LinkModulesTest.cpp vendor/llvm/dist/unittests/MC/DwarfLineTables.cpp vendor/llvm/dist/unittests/MC/StringTableBuilderTest.cpp vendor/llvm/dist/unittests/MI/LiveIntervalTest.cpp vendor/llvm/dist/unittests/ProfileData/CoverageMappingTest.cpp vendor/llvm/dist/unittests/ProfileData/InstrProfTest.cpp vendor/llvm/dist/unittests/ProfileData/SampleProfTest.cpp vendor/llvm/dist/unittests/Support/ARMAttributeParser.cpp vendor/llvm/dist/unittests/Support/BinaryStreamTest.cpp vendor/llvm/dist/unittests/Support/CMakeLists.txt vendor/llvm/dist/unittests/Support/CommandLineTest.cpp vendor/llvm/dist/unittests/Support/CompressionTest.cpp vendor/llvm/dist/unittests/Support/CrashRecoveryTest.cpp vendor/llvm/dist/unittests/Support/DataExtractorTest.cpp vendor/llvm/dist/unittests/Support/DynamicLibrary/CMakeLists.txt vendor/llvm/dist/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp vendor/llvm/dist/unittests/Support/DynamicLibrary/PipSqueak.cxx vendor/llvm/dist/unittests/Support/DynamicLibrary/PipSqueak.h vendor/llvm/dist/unittests/Support/EndianStreamTest.cpp vendor/llvm/dist/unittests/Support/FileOutputBufferTest.cpp vendor/llvm/dist/unittests/Support/FormatVariadicTest.cpp vendor/llvm/dist/unittests/Support/LEB128Test.cpp vendor/llvm/dist/unittests/Support/MD5Test.cpp vendor/llvm/dist/unittests/Support/MathExtrasTest.cpp vendor/llvm/dist/unittests/Support/MemoryBufferTest.cpp vendor/llvm/dist/unittests/Support/MemoryTest.cpp vendor/llvm/dist/unittests/Support/Path.cpp vendor/llvm/dist/unittests/Support/ProgramTest.cpp vendor/llvm/dist/unittests/Support/SpecialCaseListTest.cpp vendor/llvm/dist/unittests/Support/SwapByteOrderTest.cpp vendor/llvm/dist/unittests/Support/TarWriterTest.cpp vendor/llvm/dist/unittests/Support/TargetParserTest.cpp vendor/llvm/dist/unittests/Support/TrigramIndexTest.cpp vendor/llvm/dist/unittests/Support/YAMLIOTest.cpp vendor/llvm/dist/unittests/Support/YAMLParserTest.cpp vendor/llvm/dist/unittests/Support/formatted_raw_ostream_test.cpp vendor/llvm/dist/unittests/Support/raw_ostream_test.cpp vendor/llvm/dist/unittests/Support/raw_pwrite_stream_test.cpp vendor/llvm/dist/unittests/Support/raw_sha1_ostream_test.cpp vendor/llvm/dist/unittests/Target/AArch64/InstSizes.cpp vendor/llvm/dist/unittests/Transforms/Scalar/LoopPassManagerTest.cpp vendor/llvm/dist/unittests/Transforms/Utils/CMakeLists.txt vendor/llvm/dist/unittests/Transforms/Utils/FunctionComparator.cpp vendor/llvm/dist/unittests/Transforms/Utils/ValueMapperTest.cpp vendor/llvm/dist/utils/FileCheck/FileCheck.cpp vendor/llvm/dist/utils/TableGen/CMakeLists.txt vendor/llvm/dist/utils/TableGen/TableGen.cpp vendor/llvm/dist/utils/TableGen/TableGenBackends.h vendor/llvm/dist/utils/gdb-scripts/prettyprinters.py vendor/llvm/dist/utils/git-svn/git-llvm vendor/llvm/dist/utils/opt-viewer/optrecord.py vendor/llvm/dist/utils/release/test-release.sh Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Sat Jun 10 13:22:49 2017 (r319779) +++ vendor/llvm/dist/CMakeLists.txt Sat Jun 10 13:44:06 2017 (r319780) @@ -385,6 +385,7 @@ else() option(LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY "Compile with -fmodules-local-submodule-visibility." ON) endif() option(LLVM_ENABLE_CXX1Y "Compile with C++1y enabled." OFF) +option(LLVM_ENABLE_CXX1Z "Compile with C++1z enabled." OFF) option(LLVM_ENABLE_LIBCXX "Use libc++ if available." OFF) option(LLVM_ENABLE_LLD "Use lld as C and C++ linker." OFF) option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) @@ -853,7 +854,6 @@ if( LLVM_INCLUDE_UTILS ) add_subdirectory(utils/not) add_subdirectory(utils/llvm-lit) add_subdirectory(utils/yaml-bench) - add_subdirectory(utils/unittest) else() if ( LLVM_INCLUDE_TESTS ) message(FATAL_ERROR "Including tests when not building utils will not work. @@ -897,6 +897,10 @@ if( LLVM_INCLUDE_TESTS ) endif() add_subdirectory(test) add_subdirectory(unittests) + if( LLVM_INCLUDE_UTILS ) + add_subdirectory(utils/unittest) + endif() + if (WIN32) # This utility is used to prevent crashing tests from calling Dr. Watson on # Windows. Modified: vendor/llvm/dist/bindings/go/llvm/ir.go ============================================================================== --- vendor/llvm/dist/bindings/go/llvm/ir.go Sat Jun 10 13:22:49 2017 (r319779) +++ vendor/llvm/dist/bindings/go/llvm/ir.go Sat Jun 10 13:44:06 2017 (r319780) @@ -611,6 +611,12 @@ func (t Type) StructElementTypes() []Type { } // Operations on array, pointer, and vector types (sequence types) +func (t Type) Subtypes() (ret []Type) { + ret = make([]Type, C.LLVMGetNumContainedTypes(t.C)) + C.LLVMGetSubtypes(t.C, llvmTypeRefPtr(&ret[0])) + return +} + func ArrayType(elementType Type, elementCount int) (t Type) { t.C = C.LLVMArrayType(elementType.C, C.unsigned(elementCount)) return Modified: vendor/llvm/dist/bindings/go/llvm/ir_test.go ============================================================================== --- vendor/llvm/dist/bindings/go/llvm/ir_test.go Sat Jun 10 13:22:49 2017 (r319779) +++ vendor/llvm/dist/bindings/go/llvm/ir_test.go Sat Jun 10 13:44:06 2017 (r319780) @@ -134,3 +134,29 @@ func TestDebugLoc(t *testing.T) { t.Errorf("Got metadata %v as scope, though wanted %v", loc.Scope.C, scope.C) } } + +func TestSubtypes(t *testing.T) { + cont := NewContext() + defer cont.Dispose() + + int_pointer := PointerType(cont.Int32Type(), 0) + int_inner := int_pointer.Subtypes() + if len(int_inner) != 1 { + t.Errorf("Got size %d, though wanted 1") + } + if int_inner[0] != cont.Int32Type() { + t.Errorf("Expected int32 type") + } + + st_pointer := cont.StructType([]Type{cont.Int32Type(), cont.Int8Type()}, false) + st_inner := st_pointer.Subtypes() + if len(st_inner) != 2 { + t.Errorf("Got size %d, though wanted 2") + } + if st_inner[0] != cont.Int32Type() { + t.Errorf("Expected first struct field to be int32") + } + if st_inner[1] != cont.Int8Type() { + t.Errorf("Expected second struct field to be int8") + } +} Modified: vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml ============================================================================== --- vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml Sat Jun 10 13:22:49 2017 (r319779) +++ vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml Sat Jun 10 13:44:06 2017 (r319780) @@ -459,6 +459,8 @@ external is_packed : lltype -> bool = "llvm_is_packed" external is_opaque : lltype -> bool = "llvm_is_opaque" (*--... Operations on pointer, vector, and array types .....................--*) + +external subtypes : lltype -> lltype array = "llvm_subtypes" external array_type : lltype -> int -> lltype = "llvm_array_type" external pointer_type : lltype -> lltype = "llvm_pointer_type" external qualified_pointer_type : lltype -> int -> lltype Modified: vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli ============================================================================== --- vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli Sat Jun 10 13:22:49 2017 (r319779) +++ vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli Sat Jun 10 13:44:06 2017 (r319780) @@ -658,6 +658,9 @@ val is_opaque : lltype -> bool (** {7 Operations on pointer, vector, and array types} *) +(** [subtypes ty] returns [ty]'s subtypes *) +val subtypes : lltype -> lltype array + (** [array_type ty n] returns the array type containing [n] elements of type [ty]. See the method [llvm::ArrayType::get]. *) val array_type : lltype -> int -> lltype Modified: vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c ============================================================================== --- vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c Sat Jun 10 13:22:49 2017 (r319779) +++ vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c Sat Jun 10 13:44:06 2017 (r319780) @@ -506,6 +506,20 @@ CAMLprim value llvm_is_opaque(LLVMTypeRef StructTy) { /*--... Operations on array, pointer, and vector types .....................--*/ +/* lltype -> lltype array */ +CAMLprim value llvm_subtypes(LLVMTypeRef Ty) { + CAMLparam0(); + CAMLlocal1(Arr); + + unsigned Size = LLVMGetNumContainedTypes(Ty); + + Arr = caml_alloc(Size, 0); + + LLVMGetSubtypes(Ty, (LLVMTypeRef *) Arr); + + CAMLreturn(Arr); +} + /* lltype -> int -> lltype */ CAMLprim LLVMTypeRef llvm_array_type(LLVMTypeRef ElementTy, value Count) { return LLVMArrayType(ElementTy, Int_val(Count)); Modified: vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Sat Jun 10 13:22:49 2017 (r319779) +++ vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Sat Jun 10 13:44:06 2017 (r319780) @@ -101,6 +101,10 @@ else() message(FATAL_ERROR "Unknown value for LLVM_ABI_BREAKING_CHECKS: \"${LLVM_ABI_BREAKING_CHECKS}\"!") endif() +if( LLVM_REVERSE_ITERATION ) + set( LLVM_ENABLE_REVERSE_ITERATION 1 ) +endif() + if(WIN32) set(LLVM_HAVE_LINK_VERSION_SCRIPT 0) if(CYGWIN) @@ -381,6 +385,9 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE ) if (LLVM_ENABLE_CXX1Y) check_cxx_compiler_flag("-std=c++1y" CXX_SUPPORTS_CXX1Y) append_if(CXX_SUPPORTS_CXX1Y "-std=c++1y" CMAKE_CXX_FLAGS) + elseif(LLVM_ENABLE_CXX1Z) + check_cxx_compiler_flag("-std=c++1z" CXX_SUPPORTS_CXX1Z) + append_if(CXX_SUPPORTS_CXX1Z "-std=c++1z" CMAKE_CXX_FLAGS) else() check_cxx_compiler_flag("-std=c++11" CXX_SUPPORTS_CXX11) if (CXX_SUPPORTS_CXX11) Modified: vendor/llvm/dist/cmake/modules/TableGen.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/TableGen.cmake Sat Jun 10 13:22:49 2017 (r319779) +++ vendor/llvm/dist/cmake/modules/TableGen.cmake Sat Jun 10 13:44:06 2017 (r319780) @@ -30,19 +30,43 @@ function(tablegen project ofn) endif() endif() - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp - # Generate tablegen output in a temporary file. - COMMAND ${${project}_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} - ${LLVM_TABLEGEN_FLAGS} - ${LLVM_TARGET_DEFINITIONS_ABSOLUTE} - -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp - # The file in LLVM_TARGET_DEFINITIONS may be not in the current - # directory and local_tds may not contain it, so we must - # explicitly list it here: - DEPENDS ${${project}_TABLEGEN_TARGET} ${local_tds} ${global_tds} - ${LLVM_TARGET_DEFINITIONS_ABSOLUTE} - COMMENT "Building ${ofn}..." - ) + # We need both _TABLEGEN_TARGET and _TABLEGEN_EXE in the DEPENDS list + # (both the target and the file) to have .inc files rebuilt on + # a tablegen change, as cmake does not propagate file-level dependencies + # of custom targets. See the following ticket for more information: + # https://cmake.org/Bug/view.php?id=15858 + # We could always have just one dependency on both the target and + # the file, but these 2 cases would produce cleaner cmake files. + if (${${project}_TABLEGEN_TARGET} STREQUAL ${${project}_TABLEGEN_EXE}) + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp + # Generate tablegen output in a temporary file. + COMMAND ${${project}_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} + ${LLVM_TABLEGEN_FLAGS} + ${LLVM_TARGET_DEFINITIONS_ABSOLUTE} + -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp + # The file in LLVM_TARGET_DEFINITIONS may be not in the current + # directory and local_tds may not contain it, so we must + # explicitly list it here: + DEPENDS ${${project}_TABLEGEN_TARGET} ${local_tds} ${global_tds} + ${LLVM_TARGET_DEFINITIONS_ABSOLUTE} + COMMENT "Building ${ofn}..." + ) + else() + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp + # Generate tablegen output in a temporary file. + COMMAND ${${project}_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} + ${LLVM_TABLEGEN_FLAGS} + ${LLVM_TARGET_DEFINITIONS_ABSOLUTE} + -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp + # The file in LLVM_TARGET_DEFINITIONS may be not in the current + # directory and local_tds may not contain it, so we must + # explicitly list it here: + DEPENDS ${${project}_TABLEGEN_TARGET} ${${project}_TABLEGEN_EXE} + ${local_tds} ${global_tds} + ${LLVM_TARGET_DEFINITIONS_ABSOLUTE} + COMMENT "Building ${ofn}..." + ) + endif() add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn} # Only update the real output file if there are any differences. # This prevents recompilation of all the files depending on it if there Modified: vendor/llvm/dist/docs/AMDGPUUsage.rst ============================================================================== --- vendor/llvm/dist/docs/AMDGPUUsage.rst Sat Jun 10 13:22:49 2017 (r319779) +++ vendor/llvm/dist/docs/AMDGPUUsage.rst Sat Jun 10 13:44:06 2017 (r319780) @@ -1,109 +1,3441 @@ -============================== -User Guide for AMDGPU Back-end -============================== +============================= +User Guide for AMDGPU Backend +============================= +.. contents:: + :local: + Introduction ============ -The AMDGPU back-end provides ISA code generation for AMD GPUs, starting with -the R600 family up until the current Volcanic Islands (GCN Gen 3). +The AMDGPU backend provides ISA code generation for AMD GPUs, starting with the +R600 family up until the current GCN families. It lives in the +``lib/Target/AMDGPU`` directory. -Refer to `AMDGPU section in Architecture & Platform Information for Compiler Writers `_ -for additional documentation. +LLVM +==== -Conventions -=========== +.. _amdgpu-target-triples: +Target Triples +-------------- + +Use the ``clang -target ---`` option to +specify the target triple: + + .. table:: AMDGPU Target Triples + :name: amdgpu-target-triples-table + + ============ ======== ========= =========== + Architecture Vendor OS Environment + ============ ======== ========= =========== + r600 amd + amdgcn amd + amdgcn amd amdhsa + amdgcn amd amdhsa opencl + amdgcn amd amdhsa amdgizcl + amdgcn amd amdhsa amdgiz + amdgcn amd amdhsa hcc + ============ ======== ========= =========== + +``r600-amd--`` + Supports AMD GPUs HD2XXX-HD6XXX for graphics and compute shaders executed on + the MESA runtime. + +``amdgcn-amd--`` + Supports AMD GPUs GCN 6 onwards for graphics and compute shaders executed on + the MESA runtime. + +``amdgcn-amd-amdhsa-`` + Supports AMD GCN GPUs GFX6 onwards for compute kernels executed on HSA [HSA]_ + compatible runtimes such as AMD's ROCm [AMD-ROCm]_. + +``amdgcn-amd-amdhsa-opencl`` + Supports AMD GCN GPUs GFX6 onwards for OpenCL compute kernels executed on HSA + [HSA]_ compatible runtimes such as AMD's ROCm [AMD-ROCm]_. See + :ref:`amdgpu-opencl`. + +``amdgcn-amd-amdhsa-amdgizcl`` + Same as ``amdgcn-amd-amdhsa-opencl`` except a different address space mapping + is used (see :ref:`amdgpu-address-spaces`). + +``amdgcn-amd-amdhsa-amdgiz`` + Same as ``amdgcn-amd-amdhsa-`` except a different address space mapping is + used (see :ref:`amdgpu-address-spaces`). + +``amdgcn-amd-amdhsa-hcc`` + Supports AMD GCN GPUs GFX6 onwards for AMD HC language compute kernels + executed on HSA [HSA]_ compatible runtimes such as AMD's ROCm [AMD-ROCm]_. See + :ref:`amdgpu-hcc`. + +.. _amdgpu-processors: + +Processors +---------- + +Use the ``clang -mcpu `` option to specify the AMD GPU processor. The +names from both the *Processor* and *Alternative Processor* can be used. + + .. table:: AMDGPU Processors + :name: amdgpu-processors-table + + ========== =========== ============ ===== ======= ================== + Processor Alternative Target dGPU/ Runtime Example + Processor Triple APU Support Products + Architecture + ========== =========== ============ ===== ======= ================== + **R600** [AMD-R6xx]_ + -------------------------------------------------------------------- + r600 r600 dGPU + r630 r600 dGPU + rs880 r600 dGPU + rv670 r600 dGPU + **R700** [AMD-R7xx]_ + -------------------------------------------------------------------- + rv710 r600 dGPU + rv730 r600 dGPU + rv770 r600 dGPU + **Evergreen** [AMD-Evergreen]_ + -------------------------------------------------------------------- + cedar r600 dGPU + redwood r600 dGPU + sumo r600 dGPU + juniper r600 dGPU + cypress r600 dGPU + **Northern Islands** [AMD-Cayman-Trinity]_ + -------------------------------------------------------------------- + barts r600 dGPU + turks r600 dGPU + caicos r600 dGPU + cayman r600 dGPU + **GCN GFX6 (Southern Islands (SI))** [AMD-Souther-Islands]_ + -------------------------------------------------------------------- + gfx600 - SI amdgcn dGPU + - tahiti + gfx601 - pitcairn amdgcn dGPU + - verde + - oland + - hainan + **GCN GFX7 (Sea Islands (CI))** [AMD-Sea-Islands]_ + -------------------------------------------------------------------- + gfx700 - bonaire amdgcn dGPU - Radeon HD 7790 + - Radeon HD 8770 + - R7 260 + - R7 260X + \ - kaveri amdgcn APU - A6-7000 + - A6 Pro-7050B + - A8-7100 + - A8 Pro-7150B + - A10-7300 + - A10 Pro-7350B + - FX-7500 + - A8-7200P + - A10-7400P + - FX-7600P + gfx701 - hawaii amdgcn dGPU ROCm - FirePro W8100 + - FirePro W9100 + - FirePro S9150 + - FirePro S9170 + gfx702 dGPU ROCm - Radeon R9 290 + - Radeon R9 290x + - Radeon R390 + - Radeon R390x + gfx703 - kabini amdgcn APU - E1-2100 + - mullins - E1-2200 + - E1-2500 + - E2-3000 + - E2-3800 + - A4-5000 + - A4-5100 + - A6-5200 + - A4 Pro-3340B + **GCN GFX8 (Volcanic Islands (VI))** [AMD-Volcanic-Islands]_ + -------------------------------------------------------------------- + gfx800 - iceland amdgcn dGPU - FirePro S7150 + - FirePro S7100 + - FirePro W7100 + - Radeon R285 + - Radeon R9 380 + - Radeon R9 385 + - Mobile FirePro + M7170 + gfx801 - carrizo amdgcn APU - A6-8500P + - Pro A6-8500B + - A8-8600P + - Pro A8-8600B + - FX-8800P + - Pro A12-8800B + \ amdgcn APU ROCm - A10-8700P + - Pro A10-8700B + - A10-8780P + \ amdgcn APU - A10-9600P + - A10-9630P + - A12-9700P + - A12-9730P + - FX-9800P + - FX-9830P + \ amdgcn APU - E2-9010 + - A6-9210 + - A9-9410 + gfx802 - tonga amdgcn dGPU ROCm Same as gfx800 + gfx803 - fiji amdgcn dGPU ROCm - Radeon R9 Nano + - Radeon R9 Fury + - Radeon R9 FuryX + - Radeon Pro Duo + - FirePro S9300x2 + \ - polaris10 amdgcn dGPU ROCm - Radeon RX 470 + - Radeon RX 480 + \ - polaris11 amdgcn dGPU ROCm - Radeon RX 460 + gfx804 amdgcn dGPU Same as gfx803 + gfx810 - stoney amdgcn APU + **GCN GFX9** + -------------------------------------------------------------------- + gfx900 amdgcn dGPU - FirePro W9500 + - FirePro S9500 + - FirePro S9500x2 + gfx901 amdgcn dGPU ROCm Same as gfx900 + except XNACK is + enabled + gfx902 amdgcn APU *TBA* + + .. TODO + Add product + names. + gfx903 amdgcn APU Same as gfx902 + except XNACK is + enabled + ========== =========== ============ ===== ======= ================== + +.. _amdgpu-address-spaces: + Address Spaces -------------- -The AMDGPU back-end uses the following address space mapping: +The AMDGPU backend uses the following address space mappings. - ================== =================== ============== - LLVM Address Space DWARF Address Space Memory Space - ================== =================== ============== - 0 1 Private - 1 N/A Global - 2 N/A Constant - 3 2 Local - 4 N/A Generic (Flat) - 5 N/A Region - ================== =================== ============== +The memory space names used in the table, aside from the region memory space, is +from the OpenCL standard. -The terminology in the table, aside from the region memory space, is from the -OpenCL standard. +LLVM Address Space number is used throughout LLVM (for example, in LLVM IR). -LLVM Address Space is used throughout LLVM (for example, in LLVM IR). DWARF -Address Space is emitted in DWARF, and is used by tools, such as debugger, -profiler and others. + .. table:: Address Space Mapping + :name: amdgpu-address-space-mapping-table + ================== ================= ================= ================= ================= + LLVM Address Space Memory Space + ------------------ ----------------------------------------------------------------------- + \ Current Default amdgiz/amdgizcl hcc Future Default + ================== ================= ================= ================= ================= + 0 Private (Scratch) Generic (Flat) Generic (Flat) Generic (Flat) + 1 Global Global Global Global + 2 Constant Constant Constant Region (GDS) + 3 Local (group/LDS) Local (group/LDS) Local (group/LDS) Local (group/LDS) + 4 Generic (Flat) Region (GDS) Region (GDS) Constant + 5 Region (GDS) Private (Scratch) Private (Scratch) Private (Scratch) + ================== ================= ================= ================= ================= + +Current Default + This is the current default address space mapping used for all languages + except hcc. This will shortly be deprecated. + +amdgiz/amdgizcl + This is the current address space mapping used when ``amdgiz`` or ``amdgizcl`` + is specified as the target triple environment value. + +hcc + This is the current address space mapping used when ``hcc`` is specified as + the target triple environment value.This will shortly be deprecated. + +Future Default + This will shortly be the only address space mapping for all languages using + AMDGPU backend. + +.. _amdgpu-memory-scopes: + +Memory Scopes +------------- + +This section provides LLVM memory synchronization scopes supported by the AMDGPU +backend memory model when the target triple OS is ``amdhsa`` (see +:ref:`amdgpu-amdhsa-memory-model` and :ref:`amdgpu-target-triples`). + +The memory model supported is based on the HSA memory model [HSA]_ which is +based in turn on HRF-indirect with scope inclusion [HRF]_. The happens-before +relation is transitive over the synchonizes-with relation independent of scope, +and synchonizes-with allows the memory scope instances to be inclusive (see +table :ref:`amdgpu-amdhsa-llvm-sync-scopes-amdhsa-table`). + +This is different to the OpenCL [OpenCL]_ memory model which does not have scope +inclusion and requires the memory scopes to exactly match. However, this +is conservatively correct for OpenCL. + + .. table:: AMDHSA LLVM Sync Scopes for AMDHSA + :name: amdgpu-amdhsa-llvm-sync-scopes-amdhsa-table + + ================ ========================================================== + LLVM Sync Scope Description + ================ ========================================================== + *none* The default: ``system``. + + Synchronizes with, and participates in modification and + seq_cst total orderings with, other operations (except + image operations) for all address spaces (except private, + or generic that accesses private) provided the other + operation's sync scope is: + + - ``system``. + - ``agent`` and executed by a thread on the same agent. + - ``workgroup`` and executed by a thread in the same + workgroup. + - ``wavefront`` and executed by a thread in the same + wavefront. + + ``agent`` Synchronizes with, and participates in modification and + seq_cst total orderings with, other operations (except + image operations) for all address spaces (except private, + or generic that accesses private) provided the other + operation's sync scope is: + + - ``system`` or ``agent`` and executed by a thread on the + same agent. + - ``workgroup`` and executed by a thread in the same + workgroup. + - ``wavefront`` and executed by a thread in the same + wavefront. + + ``workgroup`` Synchronizes with, and participates in modification and + seq_cst total orderings with, other operations (except + image operations) for all address spaces (except private, + or generic that accesses private) provided the other + operation's sync scope is: + + - ``system``, ``agent`` or ``workgroup`` and executed by a + thread in the same workgroup. + - ``wavefront`` and executed by a thread in the same + wavefront. + + ``wavefront`` Synchronizes with, and participates in modification and + seq_cst total orderings with, other operations (except + image operations) for all address spaces (except private, + or generic that accesses private) provided the other + operation's sync scope is: + + - ``system``, ``agent``, ``workgroup`` or ``wavefront`` + and executed by a thread in the same wavefront. + + ``singlethread`` Only synchronizes with, and participates in modification + and seq_cst total orderings with, other operations (except + image operations) running in the same thread for all + address spaces (for example, in signal handlers). + ================ ========================================================== + +AMDGPU Intrinsics +----------------- + +The AMDGPU backend implements the following intrinsics. + +*This section is WIP.* + +.. TODO + List AMDGPU intrinsics + +Code Object +=========== + +The AMDGPU backend generates a standard ELF [ELF]_ relocatable code object that +can be linked by ``lld`` to produce a standard ELF shared code object which can +be loaded and executed on an AMDGPU target. + +Header +------ + +The AMDGPU backend uses the following ELF header: + + .. table:: AMDGPU ELF Header + :name: amdgpu-elf-header-table + + ========================== ========================= + Field Value + ========================== ========================= + ``e_ident[EI_CLASS]`` ``ELFCLASS64`` + ``e_ident[EI_DATA]`` ``ELFDATA2LSB`` + ``e_ident[EI_OSABI]`` ``ELFOSABI_AMDGPU_HSA`` + ``e_ident[EI_ABIVERSION]`` ``ELFABIVERSION_AMDGPU_HSA`` + ``e_type`` ``ET_REL`` or ``ET_DYN`` + ``e_machine`` ``EM_AMDGPU`` + ``e_entry`` 0 + ``e_flags`` 0 + ========================== ========================= + +.. + + .. table:: AMDGPU ELF Header Enumeration Values + :name: amdgpu-elf-header-enumeration-values-table + + ============================ ===== + Name Value + ============================ ===== + ``EM_AMDGPU`` 224 + ``ELFOSABI_AMDGPU_HSA`` 64 + ``ELFABIVERSION_AMDGPU_HSA`` 1 + ============================ ===== + +``e_ident[EI_CLASS]`` + The ELF class is always ``ELFCLASS64``. The AMDGPU backend only supports 64 bit + applications. + +``e_ident[EI_DATA]`` + All AMDGPU targets use ELFDATA2LSB for little-endian byte ordering. + +``e_ident[EI_OSABI]`` + The AMD GPU architecture specific OS ABI of ``ELFOSABI_AMDGPU_HSA`` is used to + specify that the code object conforms to the AMD HSA runtime ABI [HSA]_. + +``e_ident[EI_ABIVERSION]`` + The AMD GPU architecture specific OS ABI version of + ``ELFABIVERSION_AMDGPU_HSA`` is used to specify the version of AMD HSA runtime + ABI to which the code object conforms. + +``e_type`` + Can be one of the following values: + + + ``ET_REL`` + The type produced by the AMD GPU backend compiler as it is relocatable code + object. + + ``ET_DYN`` + The type produced by the linker as it is a shared code object. + + The AMD HSA runtime loader requires a ``ET_DYN`` code object. + +``e_machine`` + The value ``EM_AMDGPU`` is used for the machine for all members of the AMD GPU + architecture family. The specific member is specified in the + ``NT_AMD_AMDGPU_ISA`` entry in the ``.note`` section (see + :ref:`amdgpu-note-records`). + +``e_entry`` + The entry point is 0 as the entry points for individual kernels must be + selected in order to invoke them through AQL packets. + +``e_flags`` + The value is 0 as no flags are used. + +Sections +-------- + +An AMDGPU target ELF code object has the standard ELF sections which include: + + .. table:: AMDGPU ELF Sections + :name: amdgpu-elf-sections-table + + ================== ================ ================================= + Name Type Attributes + ================== ================ ================================= + ``.bss`` ``SHT_NOBITS`` ``SHF_ALLOC`` + ``SHF_WRITE`` + ``.data`` ``SHT_PROGBITS`` ``SHF_ALLOC`` + ``SHF_WRITE`` + ``.debug_``\ *\** ``SHT_PROGBITS`` *none* + ``.dynamic`` ``SHT_DYNAMIC`` ``SHF_ALLOC`` + ``.dynstr`` ``SHT_PROGBITS`` ``SHF_ALLOC`` + ``.dynsym`` ``SHT_PROGBITS`` ``SHF_ALLOC`` + ``.got`` ``SHT_PROGBITS`` ``SHF_ALLOC`` + ``SHF_WRITE`` + ``.hash`` ``SHT_HASH`` ``SHF_ALLOC`` + ``.note`` ``SHT_NOTE`` *none* + ``.rela``\ *name* ``SHT_RELA`` *none* + ``.rela.dyn`` ``SHT_RELA`` *none* + ``.rodata`` ``SHT_PROGBITS`` ``SHF_ALLOC`` + ``.shstrtab`` ``SHT_STRTAB`` *none* + ``.strtab`` ``SHT_STRTAB`` *none* + ``.symtab`` ``SHT_SYMTAB`` *none* + ``.text`` ``SHT_PROGBITS`` ``SHF_ALLOC`` + ``SHF_EXECINSTR`` + ================== ================ ================================= + +These sections have their standard meanings (see [ELF]_) and are only generated +if needed. + +``.debug``\ *\** + The standard DWARF sections. See :ref:`amdgpu-dwarf` for information on the + DWARF produced by the AMDGPU backend. + +``.dynamic``, ``.dynstr``, ``.dynstr``, ``.hash`` + The standard sections used by a dynamic loader. + +``.note`` + See :ref:`amdgpu-note-records` for the note records supported by the AMDGPU + backend. + +``.rela``\ *name*, ``.rela.dyn`` + For relocatable code objects, *name* is the name of the section that the + relocation records apply. For example, ``.rela.text`` is the section name for + relocation records associated with the ``.text`` section. + + For linked shared code objects, ``.rela.dyn`` contains all the relocation + records from each of the relocatable code object's ``.rela``\ *name* sections. + + See :ref:`amdgpu-relocation-records` for the relocation records supported by + the AMDGPU backend. + +``.text`` + The executable machine code for the kernels and functions they call. Generated + as position independent code. See :ref:`amdgpu-code-conventions` for + information on conventions used in the isa generation. + +.. _amdgpu-note-records: + +Note Records +------------ + +As required by ``ELFCLASS64``, minimal zero byte padding must be generated after +the ``name`` field to ensure the ``desc`` field is 4 byte aligned. In addition, +minimal zero byte padding must be generated to ensure the ``desc`` field size is +a multiple of 4 bytes. The ``sh_addralign`` field of the ``.note`` section must +be at least 4 to indicate at least 8 byte alignment. + +The AMDGPU backend code object uses the following ELF note records in the +``.note`` section. The *Description* column specifies the layout of the note +record’s ``desc`` field. All fields are consecutive bytes. Note records with +variable size strings have a corresponding ``*_size`` field that specifies the +number of bytes, including the terminating null character, in the string. The +string(s) come immediately after the preceding fields. + +Additional note records can be present. + + .. table:: AMDGPU ELF Note Records + :name: amdgpu-elf-note-records-table + + ===== ========================== ========================================== + Name Type Description + ===== ========================== ========================================== + "AMD" ``NT_AMD_AMDGPU_METADATA`` + "AMD" ``NT_AMD_AMDGPU_ISA`` + ===== ========================== ========================================== + +.. + + .. table:: AMDGPU ELF Note Record Enumeration Values + :name: amdgpu-elf-note-record-enumeration-values-table + + ============================= ===== + Name Value + ============================= ===== + *reserved* 0-9 + ``NT_AMD_AMDGPU_METADATA`` 10 + ``NT_AMD_AMDGPU_ISA`` 11 + ============================= ===== + +``NT_AMD_AMDGPU_ISA`` + Specifies the instruction set architecture used by the machine code contained + in the code object. + + This note record is required for code objects containing machine code for + processors matching the ``amdgcn`` architecture in table + :ref:`amdgpu-processors`. + + The null terminated string has the following syntax: + + *architecture*\ ``-``\ *vendor*\ ``-``\ *os*\ ``-``\ *environment*\ ``-``\ *processor* + + where: + + *architecture* + The architecture from table :ref:`amdgpu-target-triples-table`. + + This is always ``amdgcn`` when the target triple OS is ``amdhsa`` (see + :ref:`amdgpu-target-triples`). + + *vendor* + The vendor from table :ref:`amdgpu-target-triples-table`. + + For the AMDGPU backend this is always ``amd``. + + *os* + The OS from table :ref:`amdgpu-target-triples-table`. + + *environment* + An environment from table :ref:`amdgpu-target-triples-table`, or blank if + the environment has no affect on the execution of the code object. + + For the AMDGPU backend this is currently always blank. + *processor* + The processor from table :ref:`amdgpu-processors-table`. + + For example: + + ``amdgcn-amd-amdhsa--gfx901`` + +``NT_AMD_AMDGPU_METADATA`` + Specifies extensible metadata associated with the code object. See + :ref:`amdgpu-code-object-metadata` for the syntax of the code object metadata + string. + + This note record is required and must contain the minimum information + necessary to support the ROCM kernel queries. For example, the segment sizes + needed in a dispatch packet. In addition, a high level language runtime may + require other information to be included. For example, the AMD OpenCL runtime + records kernel argument information. + + .. TODO + Is the string null terminated? It probably should not if YAML allows it to + contain null characters, otherwise it should be. + +.. _amdgpu-code-object-metadata: + +Code Object Metadata +-------------------- + +The code object metadata is specified by the ``NT_AMD_AMDHSA_METADATA`` note +record (see :ref:`amdgpu-note-records`). + +The metadata is specified as a YAML formated string (see [YAML]_ and +:doc:`YamlIO`). + +The metadata is represented as a single YAML document comprised of the mapping +defined in table :ref:`amdgpu-amdhsa-code-object-metadata-mapping-table` and +referenced tables. + +For boolean values, the string values of ``false`` and ``true`` are used for +false and true respectively. + +Additional information can be added to the mappings. To avoid conflicts, any +non-AMD key names should be prefixed by "*vendor-name*.". + + .. table:: AMDHSA Code Object Metadata Mapping + :name: amdgpu-amdhsa-code-object-metadata-mapping-table + + ========== ============== ========= ======================================= + String Key Value Type Required? Description + ========== ============== ========= ======================================= + "Version" sequence of Required - The first integer is the major + 2 integers version. Currently 1. + - The second integer is the minor + version. Currently 0. + "Printf" sequence of Each string is encoded information + strings about a printf function call. The + encoded information is organized as + fields separated by colon (':'): + + ``ID:N:S[0]:S[1]:...:S[N-1]:FormatString`` + + where: + + ``ID`` + A 32 bit integer as a unique id for + each printf function call + + ``N`` + A 32 bit integer equal to the number + of arguments of printf function call + minus 1 + + ``S[i]`` (where i = 0, 1, ... , N-1) + 32 bit integers for the size in bytes + of the i-th FormatString argument of + the printf function call + + FormatString + The format string passed to the + printf function call. + "Kernels" sequence of Required Sequence of the mappings for each + mapping kernel in the code object. See + :ref:`amdgpu-amdhsa-code-object-kernel-metadata-mapping-table` + for the definition of the mapping. + ========== ============== ========= ======================================= + +.. + + .. table:: AMDHSA Code Object Kernel Metadata Mapping + :name: amdgpu-amdhsa-code-object-kernel-metadata-mapping-table + + ================= ============== ========= ================================ + String Key Value Type Required? Description + ================= ============== ========= ================================ + "Name" string Required Source name of the kernel. + "SymbolName" string Required Name of the kernel + descriptor ELF symbol. + "Language" string Source language of the kernel. + Values include: + + - "OpenCL C" + - "OpenCL C++" + - "HCC" + - "OpenMP" + + "LanguageVersion" sequence of - The first integer is the major + 2 integers version. + - The second integer is the + minor version. + "Attrs" mapping Mapping of kernel attributes. + See + :ref:`amdgpu-amdhsa-code-object-kernel-attribute-metadata-mapping-table` + for the mapping definition. + "Arguments" sequence of Sequence of mappings of the + mapping kernel arguments. See + :ref:`amdgpu-amdhsa-code-object-kernel-argument-metadata-mapping-table` + for the definition of the mapping. + "CodeProps" mapping Mapping of properties related to + the kernel code. See + :ref:`amdgpu-amdhsa-code-object-kernel-code-properties-metadata-mapping-table` + for the mapping definition. + "DebugProps" mapping Mapping of properties related to + the kernel debugging. See + :ref:`amdgpu-amdhsa-code-object-kernel-debug-properties-metadata-mapping-table` + for the mapping definition. + ================= ============== ========= ================================ + +.. + + .. table:: AMDHSA Code Object Kernel Attribute Metadata Mapping + :name: amdgpu-amdhsa-code-object-kernel-attribute-metadata-mapping-table + + =================== ============== ========= ============================== + String Key Value Type Required? Description + =================== ============== ========= ============================== + "ReqdWorkGroupSize" sequence of The dispatch work-group size + 3 integers X, Y, Z must correspond to the + specified values. + + Corresponds to the OpenCL + ``reqd_work_group_size`` + attribute. + "WorkGroupSizeHint" sequence of The dispatch work-group size + 3 integers X, Y, Z is likely to be the + specified values. + + Corresponds to the OpenCL + ``work_group_size_hint`` + attribute. + "VecTypeHint" string The name of a scalar or vector + type. + + Corresponds to the OpenCL + ``vec_type_hint`` attribute. + =================== ============== ========= ============================== + +.. + + .. table:: AMDHSA Code Object Kernel Argument Metadata Mapping + :name: amdgpu-amdhsa-code-object-kernel-argument-metadata-mapping-table + + ================= ============== ========= ================================ + String Key Value Type Required? Description + ================= ============== ========= ================================ + "Name" string Kernel argument name. + "TypeName" string Kernel argument type name. + "Size" integer Required Kernel argument size in bytes. + "Align" integer Required Kernel argument alignment in + bytes. Must be a power of two. + "ValueKind" string Required Kernel argument kind that + specifies how to set up the + corresponding argument. + Values include: + + "ByValue" + The argument is copied + directly into the kernarg. + + "GlobalBuffer" + A global address space pointer + to the buffer data is passed + in the kernarg. + + "DynamicSharedPointer" + A group address space pointer + to dynamically allocated LDS + is passed in the kernarg. + + "Sampler" + A global address space + pointer to a S# is passed in + the kernarg. + + "Image" + A global address space + pointer to a T# is passed in + the kernarg. + + "Pipe" + A global address space pointer + to an OpenCL pipe is passed in + the kernarg. + + "Queue" + A global address space pointer + to an OpenCL device enqueue + queue is passed in the + kernarg. + + "HiddenGlobalOffsetX" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jun 10 13:44:27 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 199B4B953C9; Sat, 10 Jun 2017 13:44:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89C0B788C2; Sat, 10 Jun 2017 13:44:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ADiPKm094727; Sat, 10 Jun 2017 13:44:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ADiNU1094698; Sat, 10 Jun 2017 13:44:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706101344.v5ADiNU1094698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 10 Jun 2017 13:44:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319782 - in vendor/clang/dist: bindings/python/clang bindings/python/tests/cindex docs include/clang-c include/clang/AST include/clang/ASTMatchers include/clang/ASTMatchers/Dynamic inc... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 10 Jun 2017 13:44:27 -0000 Author: dim Date: Sat Jun 10 13:44:22 2017 New Revision: 319782 URL: https://svnweb.freebsd.org/changeset/base/319782 Log: Vendor import of clang trunk r305145: https://llvm.org/svn/llvm-project/cfe/trunk@305145 Added: vendor/clang/dist/test/Analysis/nullability-notes.m vendor/clang/dist/test/CodeGen/arm-target-attr.c (contents, props changed) vendor/clang/dist/test/CodeGen/arm-thumb-mode-target-feature.c (contents, props changed) vendor/clang/dist/test/CodeGen/mips-madd4.c (contents, props changed) vendor/clang/dist/test/CodeGen/neon-aapcs-align.c (contents, props changed) vendor/clang/dist/test/CodeGenCXX/clang-sections-tentative.c (contents, props changed) vendor/clang/dist/test/CodeGenCXX/clang-sections.cpp (contents, props changed) vendor/clang/dist/test/CodeGenObjC/sections.m vendor/clang/dist/test/FixIt/fixit-format-darwin.m vendor/clang/dist/test/Headers/ms-cppoperkey.cpp (contents, props changed) vendor/clang/dist/test/Headers/ms-cppoperkey1.cpp (contents, props changed) vendor/clang/dist/test/Headers/ms-cppoperkey2.cpp (contents, props changed) vendor/clang/dist/test/Index/pipe-size.cl vendor/clang/dist/test/Index/singe-file-parse.m vendor/clang/dist/test/Modules/Inputs/crash-typo-correction-visibility/ vendor/clang/dist/test/Modules/Inputs/crash-typo-correction-visibility/module.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/crash-typo-correction-visibility/module.modulemap vendor/clang/dist/test/Modules/crash-typo-correction-visibility.cpp (contents, props changed) vendor/clang/dist/test/Modules/preprocess-build-diamond.m vendor/clang/dist/test/Modules/preprocess-build.cpp (contents, props changed) vendor/clang/dist/test/Sema/ext_vector_ops.c (contents, props changed) vendor/clang/dist/test/Sema/pragma-clang-section.c (contents, props changed) vendor/clang/dist/test/SemaCXX/PR27037.cpp (contents, props changed) Modified: vendor/clang/dist/bindings/python/clang/cindex.py vendor/clang/dist/bindings/python/tests/cindex/test_type.py vendor/clang/dist/docs/ClangFormatStyleOptions.rst vendor/clang/dist/docs/LanguageExtensions.rst vendor/clang/dist/docs/LibASTMatchersReference.html vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/ExternalASTMerger.h vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h vendor/clang/dist/include/clang/ASTMatchers/Dynamic/Diagnostics.h vendor/clang/dist/include/clang/ASTMatchers/Dynamic/Parser.h vendor/clang/dist/include/clang/ASTMatchers/Dynamic/VariantValue.h vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Basic/SourceManager.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Edit/EditedSource.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def vendor/clang/dist/include/clang/Frontend/CompilerInstance.h vendor/clang/dist/include/clang/Frontend/FrontendAction.h vendor/clang/dist/include/clang/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Frontend/PreprocessorOutputOptions.h vendor/clang/dist/include/clang/Lex/ModuleLoader.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Rewrite/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Sema/Overload.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h vendor/clang/dist/include/clang/Tooling/Tooling.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/CMakeLists.txt vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/ODRHash.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/ASTMatchers/Dynamic/Diagnostics.cpp vendor/clang/dist/lib/ASTMatchers/Dynamic/Marshallers.h vendor/clang/dist/lib/ASTMatchers/Dynamic/Parser.cpp vendor/clang/dist/lib/ASTMatchers/Dynamic/Registry.cpp vendor/clang/dist/lib/ASTMatchers/Dynamic/VariantValue.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/BackendUtil.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGCXXABI.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp vendor/clang/dist/lib/CodeGen/CGException.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp vendor/clang/dist/lib/Driver/CMakeLists.txt vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/SanitizerArgs.cpp vendor/clang/dist/lib/Driver/ToolChains/Arch/Mips.cpp vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp vendor/clang/dist/lib/Driver/ToolChains/Linux.cpp vendor/clang/dist/lib/Driver/ToolChains/MSVC.cpp vendor/clang/dist/lib/Edit/EditedSource.cpp vendor/clang/dist/lib/Format/ContinuationIndenter.cpp vendor/clang/dist/lib/Format/TokenAnnotator.cpp vendor/clang/dist/lib/Format/WhitespaceManager.cpp vendor/clang/dist/lib/Frontend/ASTMerge.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/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/Rewrite/CMakeLists.txt vendor/clang/dist/lib/Frontend/Rewrite/FrontendActions.cpp vendor/clang/dist/lib/FrontendTool/ExecuteCompilerInvocation.cpp vendor/clang/dist/lib/Headers/avxintrin.h vendor/clang/dist/lib/Headers/bmiintrin.h vendor/clang/dist/lib/Headers/emmintrin.h vendor/clang/dist/lib/Headers/xmmintrin.h vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParsePragma.cpp vendor/clang/dist/lib/Sema/SemaAttr.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOverload.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/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/BugReporter.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/PathDiagnostic.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp vendor/clang/dist/test/CXX/drs/dr13xx.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.mem/p5.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p4.cpp vendor/clang/dist/test/CodeGen/arm-long-calls.c vendor/clang/dist/test/CodeGen/arm-no-movt.c vendor/clang/dist/test/CodeGen/arm-target-features.c vendor/clang/dist/test/CodeGen/captured-statements.c vendor/clang/dist/test/CodeGenCXX/captured-statements.cpp vendor/clang/dist/test/CodeGenObjC/exceptions-asm-attribute.m vendor/clang/dist/test/CodeGenObjC/image-info.m vendor/clang/dist/test/CodeGenObjC/metadata-symbols-64.m vendor/clang/dist/test/CodeGenObjC/metadata_symbols.m vendor/clang/dist/test/CodeGenObjC/non-lazy-classes.m vendor/clang/dist/test/Driver/baremetal.cpp vendor/clang/dist/test/Driver/cl-link.c vendor/clang/dist/test/Driver/fsanitize-coverage.c vendor/clang/dist/test/Driver/fsanitize.c vendor/clang/dist/test/FixIt/fixit.c vendor/clang/dist/test/Modules/preprocess-module.cpp vendor/clang/dist/test/Modules/requires-coroutines.mm vendor/clang/dist/test/Modules/requires-gnuinlineasm.m vendor/clang/dist/test/Modules/requires.m vendor/clang/dist/test/Modules/requires.mm vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Sema/2010-05-31-palignr.c vendor/clang/dist/test/SemaCXX/cxx0x-cursory-default-delete.cpp vendor/clang/dist/test/SemaCXX/cxx1y-generic-lambdas-capturing.cpp vendor/clang/dist/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp vendor/clang/dist/test/SemaCXX/cxx1z-noexcept-function-type.cpp vendor/clang/dist/test/SemaTemplate/deduction.cpp vendor/clang/dist/test/SemaTemplate/dependent-template-recover.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_type.cpp vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/clang-check/ClangCheck.cpp vendor/clang/dist/tools/clang-format/ClangFormat.cpp vendor/clang/dist/tools/clang-offload-bundler/ClangOffloadBundler.cpp vendor/clang/dist/tools/driver/cc1as_main.cpp vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/CXType.cpp vendor/clang/dist/tools/libclang/libclang.exports vendor/clang/dist/unittests/ASTMatchers/Dynamic/ParserTest.cpp vendor/clang/dist/unittests/ASTMatchers/Dynamic/RegistryTest.cpp vendor/clang/dist/unittests/ASTMatchers/Dynamic/VariantValueTest.cpp vendor/clang/dist/unittests/Basic/SourceManagerTest.cpp vendor/clang/dist/unittests/Format/FormatTestComments.cpp vendor/clang/dist/unittests/Format/FormatTestJS.cpp vendor/clang/dist/unittests/Frontend/FrontendActionTest.cpp vendor/clang/dist/unittests/Lex/LexerTest.cpp vendor/clang/dist/unittests/Lex/PPCallbacksTest.cpp vendor/clang/dist/unittests/Lex/PPConditionalDirectiveRecordTest.cpp vendor/clang/dist/unittests/Tooling/CommentHandlerTest.cpp vendor/clang/dist/unittests/Tooling/ToolingTest.cpp Modified: vendor/clang/dist/bindings/python/clang/cindex.py ============================================================================== --- vendor/clang/dist/bindings/python/clang/cindex.py Sat Jun 10 13:44:13 2017 (r319781) +++ vendor/clang/dist/bindings/python/clang/cindex.py Sat Jun 10 13:44:22 2017 (r319782) @@ -2162,6 +2162,12 @@ class Type(Structure): return conf.lib.clang_isFunctionTypeVariadic(self) + def get_address_space(self): + return conf.lib.clang_getAddressSpace(self) + + def get_typedef_name(self): + return conf.lib.clang_getTypedefName(self) + def is_pod(self): """Determine whether this Type represents plain old data (POD).""" return conf.lib.clang_isPODType(self) @@ -3664,6 +3670,11 @@ functionList = [ [Cursor], Type, Type.from_result), + + ("clang_getTypedefName", + [Type], + _CXString, + _CXString.from_result), ("clang_getTypeKindSpelling", [c_uint], Modified: vendor/clang/dist/bindings/python/tests/cindex/test_type.py ============================================================================== --- vendor/clang/dist/bindings/python/tests/cindex/test_type.py Sat Jun 10 13:44:13 2017 (r319781) +++ vendor/clang/dist/bindings/python/tests/cindex/test_type.py Sat Jun 10 13:44:22 2017 (r319782) @@ -37,37 +37,44 @@ def test_a_struct(): assert not fields[0].type.is_const_qualified() assert fields[0].type.kind == TypeKind.INT assert fields[0].type.get_canonical().kind == TypeKind.INT + assert fields[0].type.get_typedef_name() == '' assert fields[1].spelling == 'b' assert not fields[1].type.is_const_qualified() assert fields[1].type.kind == TypeKind.TYPEDEF assert fields[1].type.get_canonical().kind == TypeKind.INT assert fields[1].type.get_declaration().spelling == 'I' + assert fields[1].type.get_typedef_name() == 'I' assert fields[2].spelling == 'c' assert not fields[2].type.is_const_qualified() assert fields[2].type.kind == TypeKind.LONG assert fields[2].type.get_canonical().kind == TypeKind.LONG + assert fields[2].type.get_typedef_name() == '' assert fields[3].spelling == 'd' assert not fields[3].type.is_const_qualified() assert fields[3].type.kind == TypeKind.ULONG assert fields[3].type.get_canonical().kind == TypeKind.ULONG + assert fields[3].type.get_typedef_name() == '' assert fields[4].spelling == 'e' assert not fields[4].type.is_const_qualified() assert fields[4].type.kind == TypeKind.LONG assert fields[4].type.get_canonical().kind == TypeKind.LONG + assert fields[4].type.get_typedef_name() == '' assert fields[5].spelling == 'f' assert fields[5].type.is_const_qualified() assert fields[5].type.kind == TypeKind.INT assert fields[5].type.get_canonical().kind == TypeKind.INT + assert fields[5].type.get_typedef_name() == '' assert fields[6].spelling == 'g' assert not fields[6].type.is_const_qualified() assert fields[6].type.kind == TypeKind.POINTER assert fields[6].type.get_pointee().kind == TypeKind.INT + assert fields[6].type.get_typedef_name() == '' assert fields[7].spelling == 'h' assert not fields[7].type.is_const_qualified() @@ -75,6 +82,7 @@ def test_a_struct(): assert fields[7].type.get_pointee().kind == TypeKind.POINTER assert fields[7].type.get_pointee().get_pointee().kind == TypeKind.POINTER assert fields[7].type.get_pointee().get_pointee().get_pointee().kind == TypeKind.INT + assert fields[7].type.get_typedef_name() == '' def test_references(): """Ensure that a Type maintains a reference to a TranslationUnit.""" @@ -404,3 +412,12 @@ def test_decay(): assert a.kind == TypeKind.INCOMPLETEARRAY assert a.element_type.kind == TypeKind.INT assert a.get_canonical().kind == TypeKind.INCOMPLETEARRAY + +def test_addrspace(): + """Ensure the address space can be queried""" + tu = get_tu('__attribute__((address_space(2))) int testInteger = 3;', 'c') + + testInteger = get_cursor(tu, 'testInteger') + + assert testInteger is not None, "Could not find testInteger." + assert testInteger.type.get_address_space() == 2 Modified: vendor/clang/dist/docs/ClangFormatStyleOptions.rst ============================================================================== --- vendor/clang/dist/docs/ClangFormatStyleOptions.rst Sat Jun 10 13:44:13 2017 (r319781) +++ vendor/clang/dist/docs/ClangFormatStyleOptions.rst Sat Jun 10 13:44:22 2017 (r319782) @@ -894,7 +894,7 @@ the configuration (without a prefix: ``Auto``). ? firstValue : SecondValueVeryVeryVeryVeryLong; - true: + false: veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongDescription ? firstValue : SecondValueVeryVeryVeryVeryLong; Modified: vendor/clang/dist/docs/LanguageExtensions.rst ============================================================================== --- vendor/clang/dist/docs/LanguageExtensions.rst Sat Jun 10 13:44:13 2017 (r319781) +++ vendor/clang/dist/docs/LanguageExtensions.rst Sat Jun 10 13:44:22 2017 (r319782) @@ -2521,3 +2521,45 @@ whether or not an attribute is supported by the pragma The attributes are applied to all matching declarations individually, even when the attribute is semantically incorrect. The attributes that aren't applied to any declaration are not verified semantically. + +Specifying section names for global objects (#pragma clang section) +=================================================================== + +The ``#pragma clang section`` directive provides a means to assign section-names +to global variables, functions and static variables. + +The section names can be specified as: + +.. code-block:: c++ + + #pragma clang section bss="myBSS" data="myData" rodata="myRodata" text="myText" + +The section names can be reverted back to default name by supplying an empty +string to the section kind, for example: + +.. code-block:: c++ + + #pragma clang section bss="" data="" text="" rodata="" + +The ``#pragma clang section`` directive obeys the following rules: + +* The pragma applies to all global variable, statics and function declarations + from the pragma to the end of the translation unit. + +* The pragma clang section is enabled automatically, without need of any flags. + +* This feature is only defined to work sensibly for ELF targets. + +* If section name is specified through _attribute_((section("myname"))), then + the attribute name gains precedence. + +* Global variables that are initialized to zero will be placed in the named + bss section, if one is present. + +* The ``#pragma clang section`` directive does not does try to infer section-kind + from the name. For example, naming a section "``.bss.mySec``" does NOT mean + it will be a bss section name. + +* The decision about which section-kind applies to each global is taken in the back-end. + Once the section-kind is known, appropriate section name, as specified by the user using + ``#pragma clang section`` directive, is applied to that global. Modified: vendor/clang/dist/docs/LibASTMatchersReference.html ============================================================================== --- vendor/clang/dist/docs/LibASTMatchersReference.html Sat Jun 10 13:44:13 2017 (r319781) +++ vendor/clang/dist/docs/LibASTMatchersReference.html Sat Jun 10 13:44:22 2017 (r319782) @@ -1859,17 +1859,36 @@ Example matches a || b (matcher = binaryOperator(hasOp
      -Matcher<CXXBoolLiteral>equalsValueT Value -
      Matches literals that are equal to the given value.
      +Matcher<CXXBoolLiteralExpr>equalsValueT  Value
      +
      Matches literals that are equal to the given value of type ValueT.
       
      -Example matches true (matcher = cxxBoolLiteral(equals(true)))
      -  true
      +Given
      +  f('false, 3.14, 42);
      +characterLiteral(equals(0))
      +  matches 'cxxBoolLiteral(equals(false)) and cxxBoolLiteral(equals(0))
      +  match false
      +floatLiteral(equals(3.14)) and floatLiteral(equals(314e-2))
      +  match 3.14
      +integerLiteral(equals(42))
      +  matches 42
       
      -Usable as: Matcher<CharacterLiteral>, Matcher<CXXBoolLiteral>,
      +Usable as: Matcher<CharacterLiteral>, Matcher<CXXBoolLiteralExpr>,
                  Matcher<FloatingLiteral>, Matcher<IntegerLiteral>
       
      +Matcher<CXXBoolLiteralExpr>equalsbool Value +
      
      +
      +
      +Matcher<CXXBoolLiteralExpr>equalsdouble Value
      +
      
      +
      +
      +Matcher<CXXBoolLiteralExpr>equalsunsigned Value
      +
      
      +
      +
       Matcher<CXXCatchStmt>isCatchAll
       
      Matches a C++ catch statement that has a catch-all handler.
       
      @@ -2296,16 +2315,35 @@ Example: matches the implicit cast around 0
       
       
       Matcher<CharacterLiteral>equalsValueT  Value
      -
      Matches literals that are equal to the given value.
      +
      Matches literals that are equal to the given value of type ValueT.
       
      -Example matches true (matcher = cxxBoolLiteral(equals(true)))
      -  true
      +Given
      +  f('false, 3.14, 42);
      +characterLiteral(equals(0))
      +  matches 'cxxBoolLiteral(equals(false)) and cxxBoolLiteral(equals(0))
      +  match false
      +floatLiteral(equals(3.14)) and floatLiteral(equals(314e-2))
      +  match 3.14
      +integerLiteral(equals(42))
      +  matches 42
       
      -Usable as: Matcher<CharacterLiteral>, Matcher<CXXBoolLiteral>,
      +Usable as: Matcher<CharacterLiteral>, Matcher<CXXBoolLiteralExpr>,
                  Matcher<FloatingLiteral>, Matcher<IntegerLiteral>
       
      +Matcher<CharacterLiteral>equalsbool Value +
      
      +
      +
      +Matcher<CharacterLiteral>equalsdouble Value
      +
      
      +
      +
      +Matcher<CharacterLiteral>equalsunsigned Value
      +
      
      +
      +
       Matcher<ClassTemplateSpecializationDecl>templateArgumentCountIsunsigned N
       
      Matches if the number of template arguments equals N.
       
      @@ -2533,16 +2571,27 @@ fieldDecl(isBitField())
       
       
       Matcher<FloatingLiteral>equalsValueT  Value
      -
      Matches literals that are equal to the given value.
      +
      Matches literals that are equal to the given value of type ValueT.
       
      -Example matches true (matcher = cxxBoolLiteral(equals(true)))
      -  true
      +Given
      +  f('false, 3.14, 42);
      +characterLiteral(equals(0))
      +  matches 'cxxBoolLiteral(equals(false)) and cxxBoolLiteral(equals(0))
      +  match false
      +floatLiteral(equals(3.14)) and floatLiteral(equals(314e-2))
      +  match 3.14
      +integerLiteral(equals(42))
      +  matches 42
       
      -Usable as: Matcher<CharacterLiteral>, Matcher<CXXBoolLiteral>,
      +Usable as: Matcher<CharacterLiteral>, Matcher<CXXBoolLiteralExpr>,
                  Matcher<FloatingLiteral>, Matcher<IntegerLiteral>
       
      +Matcher<FloatingLiteral>equalsdouble Value +
      
      +
      +
       Matcher<FunctionDecl>hasDynamicExceptionSpec
       
      Matches functions that have a dynamic exception specification.
       
      @@ -2805,14 +2854,33 @@ functionProtoType(parameterCountIs(3))
       
       
       Matcher<IntegerLiteral>equalsValueT  Value
      -
      Matches literals that are equal to the given value.
      +
      Matches literals that are equal to the given value of type ValueT.
       
      -Example matches true (matcher = cxxBoolLiteral(equals(true)))
      -  true
      +Given
      +  f('false, 3.14, 42);
      +characterLiteral(equals(0))
      +  matches 'cxxBoolLiteral(equals(false)) and cxxBoolLiteral(equals(0))
      +  match false
      +floatLiteral(equals(3.14)) and floatLiteral(equals(314e-2))
      +  match 3.14
      +integerLiteral(equals(42))
      +  matches 42
       
      -Usable as: Matcher<CharacterLiteral>, Matcher<CXXBoolLiteral>,
      +Usable as: Matcher<CharacterLiteral>, Matcher<CXXBoolLiteralExpr>,
                  Matcher<FloatingLiteral>, Matcher<IntegerLiteral>
       
      + + +Matcher<IntegerLiteral>equalsbool Value +
      
      +
      +
      +Matcher<IntegerLiteral>equalsdouble Value
      +
      
      +
      +
      +Matcher<IntegerLiteral>equalsunsigned Value
      +
      
       
       
       Matcher<MemberExpr>isArrow
      
      Modified: vendor/clang/dist/include/clang-c/Index.h
      ==============================================================================
      --- vendor/clang/dist/include/clang-c/Index.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang-c/Index.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -32,7 +32,7 @@
        * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable.
        */
       #define CINDEX_VERSION_MAJOR 0
      -#define CINDEX_VERSION_MINOR 41
      +#define CINDEX_VERSION_MINOR 43
       
       #define CINDEX_VERSION_ENCODE(major, minor) ( \
             ((major) * 10000)                       \
      @@ -1234,7 +1234,12 @@ enum CXTranslationUnit_Flags {
          * purposes of an IDE, this is undesirable behavior and as much information
          * as possible should be reported. Use this flag to enable this behavior.
          */
      -  CXTranslationUnit_KeepGoing = 0x200
      +  CXTranslationUnit_KeepGoing = 0x200,
      +
      +  /**
      +   * \brief Sets the preprocessor in a mode for parsing a single file only.
      +   */
      +  CXTranslationUnit_SingleFileParse = 0x400
       };
       
       /**
      @@ -3415,6 +3420,16 @@ CINDEX_LINKAGE unsigned clang_isVolatileQualifiedType(
        * different level.
        */
       CINDEX_LINKAGE unsigned clang_isRestrictQualifiedType(CXType T);
      +
      +/**
      + * \brief Returns the address space of the given type.
      + */
      +CINDEX_LINKAGE unsigned clang_getAddressSpace(CXType T);
      +
      +/**
      + * \brief Returns the typedef name of the given type.
      + */
      +CINDEX_LINKAGE CXString clang_getTypedefName(CXType CT);
       
       /**
        * \brief For pointer types, returns the type of the pointee.
      
      Modified: vendor/clang/dist/include/clang/AST/Decl.h
      ==============================================================================
      --- vendor/clang/dist/include/clang/AST/Decl.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/AST/Decl.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -851,6 +851,7 @@ class VarDecl : public DeclaratorDecl, public Redeclar
       
         class NonParmVarDeclBitfields {
           friend class VarDecl;
      +    friend class ImplicitParamDecl;
           friend class ASTDeclReader;
       
           unsigned : NumVarDeclBits;
      @@ -894,6 +895,10 @@ class VarDecl : public DeclaratorDecl, public Redeclar
           /// declared in the same block scope. This controls whether we should merge
           /// the type of this declaration with its previous declaration.
           unsigned PreviousDeclInSameBlockScope : 1;
      +
      +    /// Defines kind of the ImplicitParamDecl: 'this', 'self', 'vtt', '_cmd' or
      +    /// something else.
      +    unsigned ImplicitParamKind : 3;
         };
       
         union {
      @@ -1376,20 +1381,50 @@ class VarDecl : public DeclaratorDecl, public Redeclar
       
       class ImplicitParamDecl : public VarDecl {
         void anchor() override;
      +
       public:
      +  /// Defines the kind of the implicit parameter: is this an implicit parameter
      +  /// with pointer to 'this', 'self', '_cmd', virtual table pointers, captured
      +  /// context or something else.
      +  enum ImplicitParamKind : unsigned {
      +    ObjCSelf,        /// Parameter for Objective-C 'self' argument
      +    ObjCCmd,         /// Parameter for Objective-C '_cmd' argument
      +    CXXThis,         /// Parameter for C++ 'this' argument
      +    CXXVTT,          /// Parameter for C++ virtual table pointers
      +    CapturedContext, /// Parameter for captured context
      +    Other,           /// Other implicit parameter
      +  };
      +
      +  /// Create implicit parameter.
         static ImplicitParamDecl *Create(ASTContext &C, DeclContext *DC,
                                          SourceLocation IdLoc, IdentifierInfo *Id,
      -                                   QualType T);
      +                                   QualType T, ImplicitParamKind ParamKind);
      +  static ImplicitParamDecl *Create(ASTContext &C, QualType T,
      +                                   ImplicitParamKind ParamKind);
       
         static ImplicitParamDecl *CreateDeserialized(ASTContext &C, unsigned ID);
       
         ImplicitParamDecl(ASTContext &C, DeclContext *DC, SourceLocation IdLoc,
      -                    IdentifierInfo *Id, QualType Type)
      -    : VarDecl(ImplicitParam, C, DC, IdLoc, IdLoc, Id, Type,
      -              /*tinfo*/ nullptr, SC_None) {
      +                    IdentifierInfo *Id, QualType Type,
      +                    ImplicitParamKind ParamKind)
      +      : VarDecl(ImplicitParam, C, DC, IdLoc, IdLoc, Id, Type,
      +                /*TInfo=*/nullptr, SC_None) {
      +    NonParmVarDeclBits.ImplicitParamKind = ParamKind;
           setImplicit();
         }
       
      +  ImplicitParamDecl(ASTContext &C, QualType Type, ImplicitParamKind ParamKind)
      +      : VarDecl(ImplicitParam, C, /*DC=*/nullptr, SourceLocation(),
      +                SourceLocation(), /*Id=*/nullptr, Type,
      +                /*TInfo=*/nullptr, SC_None) {
      +    NonParmVarDeclBits.ImplicitParamKind = ParamKind;
      +    setImplicit();
      +  }
      +
      +  /// Returns the implicit parameter kind.
      +  ImplicitParamKind getParameterKind() const {
      +    return static_cast(NonParmVarDeclBits.ImplicitParamKind);
      +  }
         // Implement isa/cast/dyncast/etc.
         static bool classof(const Decl *D) { return classofKind(D->getKind()); }
         static bool classofKind(Kind K) { return K == ImplicitParam; }
      @@ -1829,14 +1864,15 @@ class FunctionDecl : public DeclaratorDecl, public Dec
           return getBody(Definition);
         }
       
      -  /// isThisDeclarationADefinition - Returns whether this specific
      -  /// declaration of the function is also a definition. This does not
      -  /// determine whether the function has been defined (e.g., in a
      -  /// previous definition); for that information, use isDefined. Note
      -  /// that this returns false for a defaulted function unless that function
      -  /// has been implicitly defined (possibly as deleted).
      +  /// Returns whether this specific declaration of the function is also a
      +  /// definition that does not contain uninstantiated body.
      +  ///
      +  /// This does not determine whether the function has been defined (e.g., in a
      +  /// previous definition); for that information, use isDefined.
      +  ///
         bool isThisDeclarationADefinition() const {
      -    return IsDeleted || Body || IsLateTemplateParsed;
      +    return IsDeleted || IsDefaulted || Body || IsLateTemplateParsed ||
      +      hasDefiningAttr();
         }
       
         /// doesThisDeclarationHaveABody - Returns whether this specific
      
      Modified: vendor/clang/dist/include/clang/AST/ExternalASTMerger.h
      ==============================================================================
      --- vendor/clang/dist/include/clang/AST/ExternalASTMerger.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/AST/ExternalASTMerger.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -45,6 +45,8 @@ class ExternalASTMerger : public ExternalASTSource { (
                                  llvm::function_ref IsKindWeWant,
                                  SmallVectorImpl &Result) override;
       
      +   using ExternalASTSource::CompleteType;
      +
          void CompleteType(TagDecl *Tag) override;
       };
       
      
      Modified: vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h
      ==============================================================================
      --- vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -1021,8 +1021,12 @@ DEF_TRAVERSE_TYPE(DeducedTemplateSpecializationType, {
       DEF_TRAVERSE_TYPE(RecordType, {})
       DEF_TRAVERSE_TYPE(EnumType, {})
       DEF_TRAVERSE_TYPE(TemplateTypeParmType, {})
      -DEF_TRAVERSE_TYPE(SubstTemplateTypeParmType, {})
      -DEF_TRAVERSE_TYPE(SubstTemplateTypeParmPackType, {})
      +DEF_TRAVERSE_TYPE(SubstTemplateTypeParmType, {
      +  TRY_TO(TraverseType(T->getReplacementType()));
      +})
      +DEF_TRAVERSE_TYPE(SubstTemplateTypeParmPackType, {
      +  TRY_TO(TraverseTemplateArgument(T->getArgumentPack()));
      +})
       
       DEF_TRAVERSE_TYPE(TemplateSpecializationType, {
         TRY_TO(TraverseTemplateName(T->getTemplateName()));
      @@ -1249,8 +1253,12 @@ DEF_TRAVERSE_TYPELOC(DeducedTemplateSpecializationType
       DEF_TRAVERSE_TYPELOC(RecordType, {})
       DEF_TRAVERSE_TYPELOC(EnumType, {})
       DEF_TRAVERSE_TYPELOC(TemplateTypeParmType, {})
      -DEF_TRAVERSE_TYPELOC(SubstTemplateTypeParmType, {})
      -DEF_TRAVERSE_TYPELOC(SubstTemplateTypeParmPackType, {})
      +DEF_TRAVERSE_TYPELOC(SubstTemplateTypeParmType, {
      +  TRY_TO(TraverseType(TL.getTypePtr()->getReplacementType()));
      +})
      +DEF_TRAVERSE_TYPELOC(SubstTemplateTypeParmPackType, {
      +  TRY_TO(TraverseTemplateArgument(TL.getTypePtr()->getArgumentPack()));
      +})
       
       // FIXME: use the loc for the template name?
       DEF_TRAVERSE_TYPELOC(TemplateSpecializationType, {
      
      Modified: vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h
      ==============================================================================
      --- vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -3806,14 +3806,22 @@ AST_MATCHER_P(CompoundStmt, statementCountIs, unsigned
         return Node.size() == N;
       }
       
      -/// \brief Matches literals that are equal to the given value.
      +/// \brief Matches literals that are equal to the given value of type ValueT.
       ///
      -/// Example matches true (matcher = cxxBoolLiteral(equals(true)))
      +/// Given
       /// \code
      -///   true
      +///   f('\0', false, 3.14, 42);
       /// \endcode
      +/// characterLiteral(equals(0))
      +///   matches '\0'
      +/// cxxBoolLiteral(equals(false)) and cxxBoolLiteral(equals(0))
      +///   match false
      +/// floatLiteral(equals(3.14)) and floatLiteral(equals(314e-2))
      +///   match 3.14
      +/// integerLiteral(equals(42))
      +///   matches 42
       ///
      -/// Usable as: Matcher, Matcher,
      +/// Usable as: Matcher, Matcher,
       ///            Matcher, Matcher
       template 
       internal::PolymorphicMatcherWithParam1
      @@ -3821,6 +3829,34 @@ equals(const ValueT &Value) {
         return internal::PolymorphicMatcherWithParam1<
           internal::ValueEqualsMatcher,
           ValueT>(Value);
      +}
      +
      +AST_POLYMORPHIC_MATCHER_P_OVERLOAD(equals,
      +                          AST_POLYMORPHIC_SUPPORTED_TYPES(CharacterLiteral,
      +                                                          CXXBoolLiteralExpr,
      +                                                          IntegerLiteral),
      +                          bool, Value, 0) {
      +  return internal::ValueEqualsMatcher(Value)
      +    .matchesNode(Node);
      +}
      +
      +AST_POLYMORPHIC_MATCHER_P_OVERLOAD(equals,
      +                          AST_POLYMORPHIC_SUPPORTED_TYPES(CharacterLiteral,
      +                                                          CXXBoolLiteralExpr,
      +                                                          IntegerLiteral),
      +                          unsigned, Value, 1) {
      +  return internal::ValueEqualsMatcher(Value)
      +    .matchesNode(Node);
      +}
      +
      +AST_POLYMORPHIC_MATCHER_P_OVERLOAD(equals,
      +                          AST_POLYMORPHIC_SUPPORTED_TYPES(CharacterLiteral,
      +                                                          CXXBoolLiteralExpr,
      +                                                          FloatingLiteral,
      +                                                          IntegerLiteral),
      +                          double, Value, 2) {
      +  return internal::ValueEqualsMatcher(Value)
      +    .matchesNode(Node);
       }
       
       /// \brief Matches the operator Name of operator expressions (binary or
      
      Modified: vendor/clang/dist/include/clang/ASTMatchers/Dynamic/Diagnostics.h
      ==============================================================================
      --- vendor/clang/dist/include/clang/ASTMatchers/Dynamic/Diagnostics.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/ASTMatchers/Dynamic/Diagnostics.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -76,7 +76,7 @@ class Diagnostics { (public)
           ET_ParserInvalidToken = 106,
           ET_ParserMalformedBindExpr = 107,
           ET_ParserTrailingCode = 108,
      -    ET_ParserUnsignedError = 109,
      +    ET_ParserNumberError = 109,
           ET_ParserOverloadedType = 110
         };
       
      
      Modified: vendor/clang/dist/include/clang/ASTMatchers/Dynamic/Parser.h
      ==============================================================================
      --- vendor/clang/dist/include/clang/ASTMatchers/Dynamic/Parser.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/ASTMatchers/Dynamic/Parser.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -19,8 +19,10 @@
       /// \code
       /// Grammar for the expressions supported:
       ///         :=  |  | 
      -///            :=  | 
      +///            :=  |  |  | 
       ///      := "quoted string"
      +///            := true | false
      +///             := [0-9]+.[0-9]* | [0-9]+.[0-9]*[eE][-+]?[0-9]+
       ///           := [0-9]+
       ///         := 
       ///  := () |
      
      Modified: vendor/clang/dist/include/clang/ASTMatchers/Dynamic/VariantValue.h
      ==============================================================================
      --- vendor/clang/dist/include/clang/ASTMatchers/Dynamic/VariantValue.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/ASTMatchers/Dynamic/VariantValue.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -35,6 +35,8 @@ class ArgKind {
        public:
         enum Kind {
           AK_Matcher,
      +    AK_Boolean,
      +    AK_Double,
           AK_Unsigned,
           AK_String
         };
      @@ -241,6 +243,8 @@ struct VariantMatcher::TypedMatcherOps final : Variant
       /// copy/assignment.
       ///
       /// Supported types:
      +///  - \c bool
      +//   - \c double
       ///  - \c unsigned
       ///  - \c llvm::StringRef
       ///  - \c VariantMatcher (\c DynTypedMatcher / \c Matcher)
      @@ -253,14 +257,29 @@ class VariantValue { (public)
         VariantValue &operator=(const VariantValue &Other);
       
         /// \brief Specific constructors for each supported type.
      +  VariantValue(bool Boolean);
      +  VariantValue(double Double);
         VariantValue(unsigned Unsigned);
         VariantValue(StringRef String);
         VariantValue(const VariantMatcher &Matchers);
       
      +  /// \brief Constructs an \c unsigned value (disambiguation from bool).
      +  VariantValue(int Signed) : VariantValue(static_cast(Signed)) {}
      +
         /// \brief Returns true iff this is not an empty value.
         explicit operator bool() const { return hasValue(); }
         bool hasValue() const { return Type != VT_Nothing; }
       
      +  /// \brief Boolean value functions.
      +  bool isBoolean() const;
      +  bool getBoolean() const;
      +  void setBoolean(bool Boolean);
      +
      +  /// \brief Double value functions.
      +  bool isDouble() const;
      +  double getDouble() const;
      +  void setDouble(double Double);
      +
         /// \brief Unsigned value functions.
         bool isUnsigned() const;
         unsigned getUnsigned() const;
      @@ -303,6 +322,8 @@ class VariantValue { (public)
         /// \brief All supported value types.
         enum ValueType {
           VT_Nothing,
      +    VT_Boolean,
      +    VT_Double,
           VT_Unsigned,
           VT_String,
           VT_Matcher
      @@ -311,6 +332,8 @@ class VariantValue { (public)
         /// \brief All supported value types.
         union AllValues {
           unsigned Unsigned;
      +    double Double;
      +    bool Boolean;
           std::string *String;
           VariantMatcher *Matcher;
         };
      
      Modified: vendor/clang/dist/include/clang/Basic/Attr.td
      ==============================================================================
      --- vendor/clang/dist/include/clang/Basic/Attr.td	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/Basic/Attr.td	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -1683,6 +1683,42 @@ def Section : InheritableAttr {
         let Documentation = [SectionDocs];
       }
       
      +def PragmaClangBSSSection : InheritableAttr {
      +  // This attribute has no spellings as it is only ever created implicitly.
      +  let Spellings = [];
      +  let Args = [StringArgument<"Name">];
      +  let Subjects = SubjectList<[GlobalVar], ErrorDiag,
      +                             "ExpectedFunctionMethodOrGlobalVar">;
      +  let Documentation = [Undocumented];
      +}
      +
      +def PragmaClangDataSection : InheritableAttr {
      +  // This attribute has no spellings as it is only ever created implicitly.
      +  let Spellings = [];
      +  let Args = [StringArgument<"Name">];
      +  let Subjects = SubjectList<[GlobalVar], ErrorDiag,
      +                             "ExpectedFunctionMethodOrGlobalVar">;
      +  let Documentation = [Undocumented];
      +}
      +
      +def PragmaClangRodataSection : InheritableAttr {
      +  // This attribute has no spellings as it is only ever created implicitly.
      +  let Spellings = [];
      +  let Args = [StringArgument<"Name">];
      +  let Subjects = SubjectList<[GlobalVar], ErrorDiag,
      +                             "ExpectedFunctionMethodOrGlobalVar">;
      +  let Documentation = [Undocumented];
      +}
      +
      +def PragmaClangTextSection : InheritableAttr {
      +  // This attribute has no spellings as it is only ever created implicitly.
      +  let Spellings = [];
      +  let Args = [StringArgument<"Name">];
      +  let Subjects = SubjectList<[Function], ErrorDiag,
      +                             "ExpectedFunctionMethodOrGlobalVar">;
      +  let Documentation = [Undocumented];
      +}
      +
       def Sentinel : InheritableAttr {
         let Spellings = [GCC<"sentinel">];
         let Args = [DefaultIntArgument<"Sentinel", 0>,
      
      Modified: vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td
      ==============================================================================
      --- vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -196,6 +196,7 @@ def err_no_submodule_suggest : Error<
         "no submodule named %0 in module '%1'; did you mean '%2'?">;
       def warn_missing_submodule : Warning<"missing submodule '%0'">,
         InGroup;
      +def note_module_import_here : Note<"module imported here">;
       def err_module_cannot_create_includes : Error<
         "cannot create includes file for module %0: %1">;
       def warn_module_config_macro_undef : Warning<
      
      Modified: vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td
      ==============================================================================
      --- vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -527,6 +527,10 @@ def err_pp_module_end_without_module_begin : Error<
         "'#pragma clang module end'">;
       def note_pp_module_begin_here : Note<
         "entering module '%0' due to this pragma">;
      +def err_pp_module_build_pth : Error<
      +  "'#pragma clang module build' not supported in pretokenized header">;
      +def err_pp_module_build_missing_end : Error<
      +  "no matching '#pragma clang module endbuild' for this '#pragma clang module build'">;
       
       def err_defined_macro_name : Error<"'defined' cannot be used as a macro name">;
       def err_paste_at_start : Error<
      
      Modified: vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td
      ==============================================================================
      --- vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -887,9 +887,18 @@ def warn_pragma_expected_rparen : Warning<
         "missing ')' after '#pragma %0' - ignoring">, InGroup;
       def warn_pragma_expected_identifier : Warning<
         "expected identifier in '#pragma %0' - ignored">, InGroup;
      +
      +// '#pragma clang section' related errors
      +def err_pragma_expected_clang_section_name : Error<
      +  "expected one of [bss|data|rodata|text] section kind in '#pragma %0'">;
      +def err_pragma_clang_section_expected_equal : Error<
      +  "expected '=' following '#pragma clang section %select{invalid|bss|data|rodata|text}0'">;
      +def err_pragma_clang_section_expected_name_or_clear : Error<
      +  "expected section name or '\"\"' following '#pragma clang section %select{invalid|bss|data|rodata|text}0'">;
       def warn_pragma_expected_section_name : Warning<
         "expected a string literal for the section name in '#pragma %0' - ignored">,
         InGroup;
      +
       def warn_pragma_expected_section_push_pop_or_name : Warning<
         "expected push, pop or a string literal for the section name in '#pragma %0' - ignored">,
         InGroup;
      
      Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
      ==============================================================================
      --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -5613,6 +5613,11 @@ def err_enumerator_does_not_exist : Error<
       def note_enum_specialized_here : Note<
         "enum %0 was explicitly specialized here">;
       
      +def err_specialization_not_primary_template : Error<
      +  "cannot reference member of primary template because deduced class "
      +  "template specialization %0 is %select{instantiated from a partial|"
      +  "an explicit}1 specialization">;
      +
       def err_member_redeclared : Error<"class member cannot be redeclared">;
       def ext_member_redeclared : ExtWarn<"class member cannot be redeclared">,
         InGroup;
      
      Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td
      ==============================================================================
      --- vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -174,6 +174,15 @@ def note_module_odr_violation_mismatch_decl_diff : Not
         "method %2 with %ordinal3 parameter of type %4%select{| decayed from %6}5|"
         "method %2 with %ordinal3 parameter named %4}1">;
       
      +def err_module_odr_violation_mismatch_decl_unknown : Error<
      +  "%q0 %select{with definition in module '%2'|defined here}1 has different "
      +  "definitions in different modules; first difference is this "
      +  "%select{||||static assert|field|method|unexpected decl}3">;
      +def note_module_odr_violation_mismatch_decl_unknown : Note<
      +  "but in '%0' found "
      +  "%select{||||different static assert|different field|different method|"
      +  "another unexpected decl}1">;
      +
       def warn_duplicate_module_file_extension : Warning<
         "duplicate module file extension block name '%0'">,
         InGroup;
      
      Modified: vendor/clang/dist/include/clang/Basic/LangOptions.h
      ==============================================================================
      --- vendor/clang/dist/include/clang/Basic/LangOptions.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/Basic/LangOptions.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -58,6 +58,7 @@ class LangOptions : public LangOptionsBase { (public)
           SOB_Trapping    // -ftrapv
         };
       
      +  // FIXME: Unify with TUKind.
         enum CompilingModuleKind {
           CMK_None,           ///< Not compiling a module interface at all.
           CMK_ModuleMap,      ///< Compiling a module from a module map.
      
      Modified: vendor/clang/dist/include/clang/Basic/SourceManager.h
      ==============================================================================
      --- vendor/clang/dist/include/clang/Basic/SourceManager.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/Basic/SourceManager.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -722,6 +722,10 @@ class SourceManager : public RefCountedBase;
       def fno_rewrite_includes : Flag<["-"], "fno-rewrite-includes">, Group;
       
      +def frewrite_imports : Flag<["-"], "frewrite-imports">, Group,
      +  Flags<[CC1Option]>;
      +def fno_rewrite_imports : Flag<["-"], "fno-rewrite-imports">, Group;
      +
       def frewrite_map_file : Separate<["-"], "frewrite-map-file">,
                               Group,
                               Flags<[ DriverOption, CC1Option ]>;
      @@ -2001,6 +2005,10 @@ def mdspr2 : Flag<["-"], "mdspr2">, Group;
       def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group;
       def msingle_float : Flag<["-"], "msingle-float">, Group;
       def mdouble_float : Flag<["-"], "mdouble-float">, Group;
      +def mmadd4 : Flag<["-"], "mmadd4">, Group,
      +  HelpText<"Enable the generation of 4-operand madd.s, madd.d and related instructions.">;
      +def mno_madd4 : Flag<["-"], "mno-madd4">, Group,
      +  HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">;
       def mmsa : Flag<["-"], "mmsa">, Group,
         HelpText<"Enable MSA ASE (MIPS only)">;
       def mno_msa : Flag<["-"], "mno-msa">, Group,
      
      Modified: vendor/clang/dist/include/clang/Edit/EditedSource.h
      ==============================================================================
      --- vendor/clang/dist/include/clang/Edit/EditedSource.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/Edit/EditedSource.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -41,9 +41,11 @@ class EditedSource {
         typedef std::map FileEditsTy;
         FileEditsTy FileEdits;
       
      -  llvm::DenseMap>
      +  // Location of argument use inside the macro body 
      +  typedef std::pair MacroArgUse;
      +  llvm::DenseMap>
           ExpansionToArgMap;
      -  SmallVector, 2>
      +  SmallVector, 2>
           CurrCommitMacroArgExps;
       
         IdentifierTable IdentTable;
      @@ -84,7 +86,7 @@ class EditedSource {
         FileEditsTy::iterator getActionForOffset(FileOffset Offs);
         void deconstructMacroArgLoc(SourceLocation Loc,
                                     SourceLocation &ExpansionLoc,
      -                              IdentifierInfo *&II);
      +                              MacroArgUse &ArgUse);
       
         void startingCommit();
         void finishedCommit();
      
      Modified: vendor/clang/dist/include/clang/Frontend/ASTUnit.h
      ==============================================================================
      --- vendor/clang/dist/include/clang/Frontend/ASTUnit.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/Frontend/ASTUnit.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -51,8 +51,10 @@ class DiagnosticsEngine;
       class FileEntry;
       class FileManager;
       class HeaderSearch;
      +class InputKind;
       class MemoryBufferCache;
       class Preprocessor;
      +class PreprocessorOptions;
       class PCHContainerOperations;
       class PCHContainerReader;
       class TargetInfo;
      @@ -65,7 +67,7 @@ class FileSystem;
       
       /// \brief Utility class for loading a ASTContext from an AST file.
       ///
      -class ASTUnit : public ModuleLoader {
      +class ASTUnit {
       public:
         struct StandaloneFixIt {
           std::pair RemoveRange;
      @@ -96,6 +98,7 @@ class ASTUnit : public ModuleLoader { (private)
         IntrusiveRefCntPtr          Ctx;
         std::shared_ptr          TargetOpts;
         std::shared_ptr    HSOpts;
      +  std::shared_ptr    PPOpts;
         IntrusiveRefCntPtr Reader;
         bool HadModuleLoaderFatalFailure;
       
      @@ -116,10 +119,13 @@ class ASTUnit : public ModuleLoader { (private)
         /// LoadFromCommandLine available.
         std::shared_ptr Invocation;
       
      +  /// Fake module loader: the AST unit doesn't need to load any modules.
      +  TrivialModuleLoader ModuleLoader;
      +
         // OnlyLocalDecls - when true, walking this AST should only visit declarations
         // that come from the AST itself, not from included precompiled headers.
         // FIXME: This is temporary; eventually, CIndex will always do this.
      -  bool                              OnlyLocalDecls;
      +  bool OnlyLocalDecls;
       
         /// \brief Whether to capture any diagnostics produced.
         bool CaptureDiagnostics;
      @@ -185,6 +191,14 @@ class ASTUnit : public ModuleLoader { (private)
         /// some number of calls.
         unsigned PreambleRebuildCounter;
       
      +  /// \brief Cache pairs "filename - source location"
      +  ///
      +  /// Cache contains only source locations from preamble so it is
      +  /// guaranteed that they stay valid when the SourceManager is recreated.
      +  /// This cache is used when loading preambule to increase performance
      +  /// of that loading. It must be cleared when preamble is recreated.
      +  llvm::StringMap PreambleSrcLocCache;
      +
       public:
         class PreambleData {
           const FileEntry *File;
      @@ -305,9 +319,6 @@ class ASTUnit : public ModuleLoader { (private)
         /// (likely to change while trying to use them).
         bool UserFilesAreVolatile : 1;
        
      -  /// \brief The language options used when we load an AST file.
      -  LangOptions ASTFileLangOpts;
      -
         static void ConfigureDiags(IntrusiveRefCntPtr Diags,
                                    ASTUnit &AST, bool CaptureDiagnostics);
       
      @@ -488,7 +499,7 @@ class ASTUnit : public ModuleLoader { (private)
         };
         friend class ConcurrencyCheck;
       
      -  ~ASTUnit() override;
      +  ~ASTUnit();
       
         bool isMainFileAST() const { return MainFileIsAST; }
       
      @@ -518,10 +529,20 @@ class ASTUnit : public ModuleLoader { (private)
         }
       
         const LangOptions &getLangOpts() const {
      -    assert(LangOpts && " ASTUnit does not have language options");
      +    assert(LangOpts && "ASTUnit does not have language options");
           return *LangOpts;
         }
      +
      +  const HeaderSearchOptions &getHeaderSearchOpts() const {
      +    assert(HSOpts && "ASTUnit does not have header search options");
      +    return *HSOpts;
      +  }
         
      +  const PreprocessorOptions &getPreprocessorOpts() const {
      +    assert(PPOpts && "ASTUnit does not have preprocessor options");
      +    return *PPOpts;
      +  }
      +  
         const FileManager &getFileManager() const { return *FileMgr; }
               FileManager &getFileManager()       { return *FileMgr; }
       
      @@ -702,6 +723,9 @@ class ASTUnit : public ModuleLoader { (private)
         /// \brief Determine what kind of translation unit this AST represents.
         TranslationUnitKind getTranslationUnitKind() const { return TUKind; }
       
      +  /// \brief Determine the input kind this AST unit represents.
      +  InputKind getInputKind() const;
      +
         /// \brief A mapping from a file name to the memory buffer that stores the
         /// remapped contents of that file.
         typedef std::pair RemappedFile;
      @@ -858,6 +882,7 @@ class ASTUnit : public ModuleLoader { (private)
             bool CacheCodeCompletionResults = false,
             bool IncludeBriefCommentsInCodeCompletion = false,
             bool AllowPCHWithCompilerErrors = false, bool SkipFunctionBodies = false,
      +      bool SingleFileParse = false,
             bool UserFilesAreVolatile = false, bool ForSerialization = false,
             llvm::Optional ModuleFormat = llvm::None,
             std::unique_ptr *ErrAST = nullptr,
      @@ -923,21 +948,6 @@ class ASTUnit : public ModuleLoader { (private)
         ///
         /// \returns True if an error occurred, false otherwise.
         bool serialize(raw_ostream &OS);
      -
      -  ModuleLoadResult loadModule(SourceLocation ImportLoc, ModuleIdPath Path,
      -                              Module::NameVisibilityKind Visibility,
      -                              bool IsInclusionDirective) override {
      -    // ASTUnit doesn't know how to load modules (not that this matters).
      -    return ModuleLoadResult();
      -  }
      -
      -  void makeModuleVisible(Module *Mod, Module::NameVisibilityKind Visibility,
      -                         SourceLocation ImportLoc) override {}
      -
      -  GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc) override
      -    { return nullptr; }
      -  bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc) override
      -    { return 0; }
       };
       
       } // namespace clang
      
      Modified: vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def
      ==============================================================================
      --- vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -29,7 +29,8 @@ CODEGENOPT(Name, Bits, Default)
       #endif
       
       CODEGENOPT(DisableIntegratedAS, 1, 0) ///< -no-integrated-as
      -CODEGENOPT(CompressDebugSections, 1, 0) ///< -Wa,-compress-debug-sections
      +ENUM_CODEGENOPT(CompressDebugSections, llvm::DebugCompressionType, 2,
      +                llvm::DebugCompressionType::None)
       CODEGENOPT(RelaxELFRelocations, 1, 0) ///< -Wa,--mrelax-relocations
       CODEGENOPT(AsmVerbose        , 1, 0) ///< -dA, -fverbose-asm.
       CODEGENOPT(PreserveAsmComments, 1, 1) ///< -dA, -fno-preserve-as-comments.
      
      Modified: vendor/clang/dist/include/clang/Frontend/CompilerInstance.h
      ==============================================================================
      --- vendor/clang/dist/include/clang/Frontend/CompilerInstance.h	Sat Jun 10 13:44:13 2017	(r319781)
      +++ vendor/clang/dist/include/clang/Frontend/CompilerInstance.h	Sat Jun 10 13:44:22 2017	(r319782)
      @@ -136,6 +136,13 @@ class CompilerInstance : public ModuleLoader {
         /// along with the module map
         llvm::DenseMap KnownModules;
      
      *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
      
      From owner-svn-src-vendor@freebsd.org  Sat Jun 10 13:44:31 2017
      Return-Path: 
      Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org
      Received: from mx1.freebsd.org (mx1.freebsd.org
       [IPv6:2001:1900:2254:206a::19:1])
       by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21453B953F0;
       Sat, 10 Jun 2017 13:44:31 +0000 (UTC) (envelope-from dim@FreeBSD.org)
      Received: from repo.freebsd.org (repo.freebsd.org
       [IPv6:2610:1c1:1:6068::e6a:0])
       (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
       (Client did not present a certificate)
       by mx1.freebsd.org (Postfix) with ESMTPS id C829478907;
       Sat, 10 Jun 2017 13:44:30 +0000 (UTC) (envelope-from dim@FreeBSD.org)
      Received: from repo.freebsd.org ([127.0.1.37])
       by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ADiT5N094773;
       Sat, 10 Jun 2017 13:44:29 GMT (envelope-from dim@FreeBSD.org)
      Received: (from dim@localhost)
       by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ADiTLI094772;
       Sat, 10 Jun 2017 13:44:29 GMT (envelope-from dim@FreeBSD.org)
      Message-Id: <201706101344.v5ADiTLI094772@repo.freebsd.org>
      X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
       using -f
      From: Dimitry Andric 
      Date: Sat, 10 Jun 2017 13:44:29 +0000 (UTC)
      To: src-committers@freebsd.org, svn-src-all@freebsd.org,
       svn-src-vendor@freebsd.org
      Subject: svn commit: r319783 - vendor/clang/clang-trunk-r305145
      X-SVN-Group: vendor
      MIME-Version: 1.0
      Content-Type: text/plain; charset=UTF-8
      Content-Transfer-Encoding: 8bit
      X-BeenThere: svn-src-vendor@freebsd.org
      X-Mailman-Version: 2.1.23
      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: Sat, 10 Jun 2017 13:44:31 -0000
      
      Author: dim
      Date: Sat Jun 10 13:44:29 2017
      New Revision: 319783
      URL: https://svnweb.freebsd.org/changeset/base/319783
      
      Log:
        Tag clang trunk r305145.
      
      Added:
        vendor/clang/clang-trunk-r305145/
           - copied from r319782, vendor/clang/dist/
      
      From owner-svn-src-vendor@freebsd.org  Sat Jun 10 13:44:35 2017
      Return-Path: 
      Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org
      Received: from mx1.freebsd.org (mx1.freebsd.org
       [IPv6:2001:1900:2254:206a::19:1])
       by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1262B9543D;
       Sat, 10 Jun 2017 13:44:35 +0000 (UTC) (envelope-from dim@FreeBSD.org)
      Received: from repo.freebsd.org (repo.freebsd.org
       [IPv6:2610:1c1:1:6068::e6a:0])
       (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
       (Client did not present a certificate)
       by mx1.freebsd.org (Postfix) with ESMTPS id A8F9278964;
       Sat, 10 Jun 2017 13:44:35 +0000 (UTC) (envelope-from dim@FreeBSD.org)
      Received: from repo.freebsd.org ([127.0.1.37])
       by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ADiYAC094846;
       Sat, 10 Jun 2017 13:44:34 GMT (envelope-from dim@FreeBSD.org)
      Received: (from dim@localhost)
       by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ADiWx2094820;
       Sat, 10 Jun 2017 13:44:32 GMT (envelope-from dim@FreeBSD.org)
      Message-Id: <201706101344.v5ADiWx2094820@repo.freebsd.org>
      X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
       using -f
      From: Dimitry Andric 
      Date: Sat, 10 Jun 2017 13:44:32 +0000 (UTC)
      To: src-committers@freebsd.org, svn-src-all@freebsd.org,
       svn-src-vendor@freebsd.org
      Subject: svn commit: r319784 - in vendor/compiler-rt/dist: . lib/asan lib/lsan
       lib/msan lib/sanitizer_common lib/sanitizer_common/symbolizer/scripts
       lib/tsan/rtl test/asan/TestCases/Darwin test/asan/TestCas...
      X-SVN-Group: vendor
      MIME-Version: 1.0
      Content-Type: text/plain; charset=UTF-8
      Content-Transfer-Encoding: 8bit
      X-BeenThere: svn-src-vendor@freebsd.org
      X-Mailman-Version: 2.1.23
      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: Sat, 10 Jun 2017 13:44:36 -0000
      
      Author: dim
      Date: Sat Jun 10 13:44:32 2017
      New Revision: 319784
      URL: https://svnweb.freebsd.org/changeset/base/319784
      
      Log:
        Vendor import of compiler-rt trunk r305145:
        https://llvm.org/svn/llvm-project/compiler-rt/trunk@305145
      
      Added:
        vendor/compiler-rt/dist/test/asan/TestCases/Linux/asan_preload_test-3.cc   (contents, props changed)
        vendor/compiler-rt/dist/test/msan/Linux/strerror_r.cc   (contents, props changed)
        vendor/compiler-rt/dist/test/tsan/strerror_r.cc   (contents, props changed)
      Deleted:
        vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/allocator_fork_no_hang.cc
      Modified:
        vendor/compiler-rt/dist/CMakeLists.txt
        vendor/compiler-rt/dist/lib/asan/asan_allocator.cc
        vendor/compiler-rt/dist/lib/asan/asan_allocator.h
        vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc
        vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc
        vendor/compiler-rt/dist/lib/lsan/lsan_common.cc
        vendor/compiler-rt/dist/lib/lsan/lsan_common_linux.cc
        vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc
        vendor/compiler-rt/dist/lib/msan/msan_allocator.cc
        vendor/compiler-rt/dist/lib/msan/msan_allocator.h
        vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc
        vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc
        vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc
        vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform.h
        vendor/compiler-rt/dist/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
        vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc
        vendor/compiler-rt/dist/test/asan/TestCases/Darwin/atos-symbolizer.cc
        vendor/compiler-rt/dist/test/asan/TestCases/Posix/halt_on_error-torture.cc
        vendor/compiler-rt/dist/test/profile/Linux/instrprof-alloc.test
        vendor/compiler-rt/dist/test/profile/Linux/instrprof-value-prof-warn.test
        vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc
      
      Modified: vendor/compiler-rt/dist/CMakeLists.txt
      ==============================================================================
      --- vendor/compiler-rt/dist/CMakeLists.txt	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/CMakeLists.txt	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -255,7 +255,7 @@ if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_B
         set(COMPILER_RT_HAS_LLD TRUE)
       else()
         set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/../lld)
      -  if(EXISTS ${COMPILER_RT_LLD_PATH}/)
      +  if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
           set(COMPILER_RT_HAS_LLD TRUE)
         else()
           set(COMPILER_RT_HAS_LLD FALSE)
      
      Modified: vendor/compiler-rt/dist/lib/asan/asan_allocator.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/asan/asan_allocator.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/asan/asan_allocator.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -47,6 +47,8 @@ static u32 RZSize2Log(u32 rz_size) {
         return res;
       }
       
      +static AsanAllocator &get_allocator();
      +
       // The memory chunk allocated from the underlying allocator looks like this:
       // L L L L L L H H U U U U U U R R
       //   L -- left redzone words (0 or more bytes)
      @@ -717,7 +719,7 @@ struct Allocator {
       
       static Allocator instance(LINKER_INITIALIZED);
       
      -AsanAllocator &get_allocator() {
      +static AsanAllocator &get_allocator() {
         return instance.allocator;
       }
       
      
      Modified: vendor/compiler-rt/dist/lib/asan/asan_allocator.h
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/asan/asan_allocator.h	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/asan/asan_allocator.h	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -213,7 +213,5 @@ void asan_mz_force_unlock();
       void PrintInternalAllocatorStats();
       void AsanSoftRssLimitExceededCallback(bool exceeded);
       
      -AsanAllocator &get_allocator();
      -
       }  // namespace __asan
       #endif  // ASAN_ALLOCATOR_H
      
      Modified: vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -22,7 +22,6 @@
       #include "asan_stats.h"
       #include "asan_suppressions.h"
       #include "lsan/lsan_common.h"
      -#include "sanitizer_common/sanitizer_stackdepot.h"
       #include "sanitizer_common/sanitizer_libc.h"
       
       #if SANITIZER_POSIX
      @@ -705,25 +704,9 @@ INTERCEPTOR(int, __cxa_atexit, void (*func)(void *), v
       #endif  // ASAN_INTERCEPT___CXA_ATEXIT
       
       #if ASAN_INTERCEPT_FORK
      -static void BeforeFork() {
      -  if (SANITIZER_LINUX) {
      -    get_allocator().ForceLock();
      -    StackDepotLockAll();
      -  }
      -}
      -
      -static void AfterFork() {
      -  if (SANITIZER_LINUX) {
      -    StackDepotUnlockAll();
      -    get_allocator().ForceUnlock();
      -  }
      -}
      -
       INTERCEPTOR(int, fork, void) {
         ENSURE_ASAN_INITED();
      -  BeforeFork();
         int pid = REAL(fork)();
      -  AfterFork();
         return pid;
       }
       #endif  // ASAN_INTERCEPT_FORK
      
      Modified: vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -60,36 +60,42 @@ INTERCEPTOR(void, cfree, void *ptr) {
       #endif // SANITIZER_INTERCEPT_CFREE
       
       INTERCEPTOR(void*, malloc, uptr size) {
      -  if (UNLIKELY(!asan_inited))
      +  if (UNLIKELY(asan_init_is_running))
           // Hack: dlsym calls malloc before REAL(malloc) is retrieved from dlsym.
           return AllocateFromLocalPool(size);
      +  ENSURE_ASAN_INITED();
         GET_STACK_TRACE_MALLOC;
         return asan_malloc(size, &stack);
       }
       
       INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) {
      -  if (UNLIKELY(!asan_inited))
      +  if (UNLIKELY(asan_init_is_running))
           // Hack: dlsym calls calloc before REAL(calloc) is retrieved from dlsym.
           return AllocateFromLocalPool(nmemb * size);
      +  ENSURE_ASAN_INITED();
         GET_STACK_TRACE_MALLOC;
         return asan_calloc(nmemb, size, &stack);
       }
       
       INTERCEPTOR(void*, realloc, void *ptr, uptr size) {
      -  GET_STACK_TRACE_MALLOC;
         if (UNLIKELY(IsInDlsymAllocPool(ptr))) {
      -    uptr offset = (uptr)ptr - (uptr)alloc_memory_for_dlsym;
      -    uptr copy_size = Min(size, kDlsymAllocPoolSize - offset);
      +    const uptr offset = (uptr)ptr - (uptr)alloc_memory_for_dlsym;
      +    const uptr copy_size = Min(size, kDlsymAllocPoolSize - offset);
           void *new_ptr;
      -    if (UNLIKELY(!asan_inited)) {
      +    if (UNLIKELY(asan_init_is_running)) {
             new_ptr = AllocateFromLocalPool(size);
           } else {
      -      copy_size = size;
      -      new_ptr = asan_malloc(copy_size, &stack);
      +      ENSURE_ASAN_INITED();
      +      GET_STACK_TRACE_MALLOC;
      +      new_ptr = asan_malloc(size, &stack);
           }
           internal_memcpy(new_ptr, ptr, copy_size);
           return new_ptr;
         }
      +  if (UNLIKELY(asan_init_is_running))
      +    return AllocateFromLocalPool(size);
      +  ENSURE_ASAN_INITED();
      +  GET_STACK_TRACE_MALLOC;
         return asan_realloc(ptr, size, &stack);
       }
       
      
      Modified: vendor/compiler-rt/dist/lib/lsan/lsan_common.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/lsan/lsan_common.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/lsan/lsan_common.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -408,9 +408,6 @@ static void MarkInvalidPCCb(uptr chunk, void *arg) {
       
       // On Linux, handles dynamically allocated TLS blocks by treating all chunks
       // allocated from ld-linux.so as reachable.
      -// On Linux, treats all chunks allocated from ld-linux.so as reachable, which
      -// covers dynamically allocated TLS blocks, internal dynamic loader's loaded
      -// modules accounting etc.
       // Dynamic TLS blocks contain the TLS variables of dynamically loaded modules.
       // They are allocated with a __libc_memalign() call in allocate_and_init()
       // (elf/dl-tls.c). Glibc won't tell us the address ranges occupied by those
      
      Modified: vendor/compiler-rt/dist/lib/lsan/lsan_common_linux.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/lsan/lsan_common_linux.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/lsan/lsan_common_linux.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -23,10 +23,6 @@
       #include "sanitizer_common/sanitizer_linux.h"
       #include "sanitizer_common/sanitizer_stackdepot.h"
       
      -#if SANITIZER_USE_GETAUXVAL
      -#include 
      -#endif  // SANITIZER_USE_GETAUXVAL
      -
       namespace __lsan {
       
       static const char kLinkerName[] = "ld";
      @@ -34,12 +30,8 @@ static const char kLinkerName[] = "ld";
       static char linker_placeholder[sizeof(LoadedModule)] ALIGNED(64);
       static LoadedModule *linker = nullptr;
       
      -static bool IsLinker(const LoadedModule& module) {
      -#if SANITIZER_USE_GETAUXVAL
      -  return module.base_address() == getauxval(AT_BASE);
      -#else
      -  return LibraryNameIs(module.full_name(), kLinkerName);
      -#endif  // SANITIZER_USE_GETAUXVAL
      +static bool IsLinker(const char* full_name) {
      +  return LibraryNameIs(full_name, kLinkerName);
       }
       
       __attribute__((tls_model("initial-exec")))
      @@ -57,25 +49,22 @@ void InitializePlatformSpecificModules() {
         ListOfModules modules;
         modules.init();
         for (LoadedModule &module : modules) {
      -    if (!IsLinker(module))
      -      continue;
      +    if (!IsLinker(module.full_name())) continue;
           if (linker == nullptr) {
             linker = reinterpret_cast(linker_placeholder);
             *linker = module;
             module = LoadedModule();
           } else {
             VReport(1, "LeakSanitizer: Multiple modules match \"%s\". "
      -                 "TLS and other allocations originating from linker might be "
      -                 "falsely reported as leaks.\n", kLinkerName);
      +              "TLS will not be handled correctly.\n", kLinkerName);
             linker->clear();
             linker = nullptr;
             return;
           }
         }
         if (linker == nullptr) {
      -    VReport(1, "LeakSanitizer: Dynamic linker not found. TLS and other "
      -               "allocations originating from linker might be falsely reported "
      -                "as leaks.\n");
      +    VReport(1, "LeakSanitizer: Dynamic linker not found. "
      +               "TLS will not be handled correctly.\n");
         }
       }
       
      
      Modified: vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -22,7 +22,6 @@
       #include "sanitizer_common/sanitizer_platform_interceptors.h"
       #include "sanitizer_common/sanitizer_platform_limits_posix.h"
       #include "sanitizer_common/sanitizer_posix.h"
      -#include "sanitizer_common/sanitizer_stackdepot.h"
       #include "sanitizer_common/sanitizer_tls_get_addr.h"
       #include "lsan.h"
       #include "lsan_allocator.h"
      @@ -98,28 +97,6 @@ INTERCEPTOR(void*, valloc, uptr size) {
       }
       #endif
       
      -static void BeforeFork() {
      -  if (SANITIZER_LINUX) {
      -    LockAllocator();
      -    StackDepotLockAll();
      -  }
      -}
      -
      -static void AfterFork() {
      -  if (SANITIZER_LINUX) {
      -    StackDepotUnlockAll();
      -    UnlockAllocator();
      -  }
      -}
      -
      -INTERCEPTOR(int, fork, void) {
      -  ENSURE_LSAN_INITED;
      -  BeforeFork();
      -  int pid = REAL(fork)();
      -  AfterFork();
      -  return pid;
      -}
      -
       #if SANITIZER_INTERCEPT_MEMALIGN
       INTERCEPTOR(void*, memalign, uptr alignment, uptr size) {
         ENSURE_LSAN_INITED;
      @@ -359,7 +336,6 @@ void InitializeInterceptors() {
         LSAN_MAYBE_INTERCEPT_MALLOPT;
         INTERCEPT_FUNCTION(pthread_create);
         INTERCEPT_FUNCTION(pthread_join);
      -  INTERCEPT_FUNCTION(fork);
       
         if (pthread_key_create(&g_thread_finalize_key, &thread_finalize)) {
           Report("LeakSanitizer: failed to create thread key.\n");
      
      Modified: vendor/compiler-rt/dist/lib/msan/msan_allocator.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/msan/msan_allocator.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/msan/msan_allocator.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -12,6 +12,8 @@
       // MemorySanitizer allocator.
       //===----------------------------------------------------------------------===//
       
      +#include "sanitizer_common/sanitizer_allocator.h"
      +#include "sanitizer_common/sanitizer_allocator_interface.h"
       #include "msan.h"
       #include "msan_allocator.h"
       #include "msan_origin.h"
      @@ -20,11 +22,101 @@
       
       namespace __msan {
       
      +struct Metadata {
      +  uptr requested_size;
      +};
      +
      +struct MsanMapUnmapCallback {
      +  void OnMap(uptr p, uptr size) const {}
      +  void OnUnmap(uptr p, uptr size) const {
      +    __msan_unpoison((void *)p, size);
      +
      +    // We are about to unmap a chunk of user memory.
      +    // Mark the corresponding shadow memory as not needed.
      +    uptr shadow_p = MEM_TO_SHADOW(p);
      +    ReleaseMemoryPagesToOS(shadow_p, shadow_p + size);
      +    if (__msan_get_track_origins()) {
      +      uptr origin_p = MEM_TO_ORIGIN(p);
      +      ReleaseMemoryPagesToOS(origin_p, origin_p + size);
      +    }
      +  }
      +};
      +
      +#if defined(__mips64)
      +  static const uptr kMaxAllowedMallocSize = 2UL << 30;
      +  static const uptr kRegionSizeLog = 20;
      +  static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog;
      +  typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap;
      +
      +  struct AP32 {
      +    static const uptr kSpaceBeg = 0;
      +    static const u64 kSpaceSize = SANITIZER_MMAP_RANGE_SIZE;
      +    static const uptr kMetadataSize = sizeof(Metadata);
      +    typedef __sanitizer::CompactSizeClassMap SizeClassMap;
      +    static const uptr kRegionSizeLog = __msan::kRegionSizeLog;
      +    typedef __msan::ByteMap ByteMap;
      +    typedef MsanMapUnmapCallback MapUnmapCallback;
      +    static const uptr kFlags = 0;
      +  };
      +  typedef SizeClassAllocator32 PrimaryAllocator;
      +#elif defined(__x86_64__)
      +#if SANITIZER_LINUX && !defined(MSAN_LINUX_X86_64_OLD_MAPPING)
      +  static const uptr kAllocatorSpace = 0x700000000000ULL;
      +#else
      +  static const uptr kAllocatorSpace = 0x600000000000ULL;
      +#endif
      +  static const uptr kMaxAllowedMallocSize = 8UL << 30;
      +
      +  struct AP64 {  // Allocator64 parameters. Deliberately using a short name.
      +    static const uptr kSpaceBeg = kAllocatorSpace;
      +    static const uptr kSpaceSize = 0x40000000000; // 4T.
      +    static const uptr kMetadataSize = sizeof(Metadata);
      +    typedef DefaultSizeClassMap SizeClassMap;
      +    typedef MsanMapUnmapCallback MapUnmapCallback;
      +    static const uptr kFlags = 0;
      +  };
      +
      +  typedef SizeClassAllocator64 PrimaryAllocator;
      +
      +#elif defined(__powerpc64__)
      +  static const uptr kMaxAllowedMallocSize = 2UL << 30;  // 2G
      +
      +  struct AP64 {  // Allocator64 parameters. Deliberately using a short name.
      +    static const uptr kSpaceBeg = 0x300000000000;
      +    static const uptr kSpaceSize = 0x020000000000; // 2T.
      +    static const uptr kMetadataSize = sizeof(Metadata);
      +    typedef DefaultSizeClassMap SizeClassMap;
      +    typedef MsanMapUnmapCallback MapUnmapCallback;
      +    static const uptr kFlags = 0;
      +  };
      +
      +  typedef SizeClassAllocator64 PrimaryAllocator;
      +#elif defined(__aarch64__)
      +  static const uptr kMaxAllowedMallocSize = 2UL << 30;  // 2G
      +  static const uptr kRegionSizeLog = 20;
      +  static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog;
      +  typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap;
      +
      +  struct AP32 {
      +    static const uptr kSpaceBeg = 0;
      +    static const u64 kSpaceSize = SANITIZER_MMAP_RANGE_SIZE;
      +    static const uptr kMetadataSize = sizeof(Metadata);
      +    typedef __sanitizer::CompactSizeClassMap SizeClassMap;
      +    static const uptr kRegionSizeLog = __msan::kRegionSizeLog;
      +    typedef __msan::ByteMap ByteMap;
      +    typedef MsanMapUnmapCallback MapUnmapCallback;
      +    static const uptr kFlags = 0;
      +  };
      +  typedef SizeClassAllocator32 PrimaryAllocator;
      +#endif
      +typedef SizeClassAllocatorLocalCache AllocatorCache;
      +typedef LargeMmapAllocator SecondaryAllocator;
      +typedef CombinedAllocator Allocator;
      +
       static Allocator allocator;
       static AllocatorCache fallback_allocator_cache;
       static SpinMutex fallback_mutex;
      -
      -Allocator &get_allocator() { return allocator; }
       
       void MsanAllocatorInit() {
         allocator.Init(
      
      Modified: vendor/compiler-rt/dist/lib/msan/msan_allocator.h
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/msan/msan_allocator.h	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/msan/msan_allocator.h	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -15,105 +15,8 @@
       #define MSAN_ALLOCATOR_H
       
       #include "sanitizer_common/sanitizer_common.h"
      -#include "sanitizer_common/sanitizer_allocator.h"
      -#include "sanitizer_common/sanitizer_allocator_interface.h"
       
       namespace __msan {
      -
      -struct Metadata {
      -  uptr requested_size;
      -};
      -
      -struct MsanMapUnmapCallback {
      -  void OnMap(uptr p, uptr size) const {}
      -  void OnUnmap(uptr p, uptr size) const {
      -    __msan_unpoison((void *)p, size);
      -
      -    // We are about to unmap a chunk of user memory.
      -    // Mark the corresponding shadow memory as not needed.
      -    uptr shadow_p = MEM_TO_SHADOW(p);
      -    ReleaseMemoryPagesToOS(shadow_p, shadow_p + size);
      -    if (__msan_get_track_origins()) {
      -      uptr origin_p = MEM_TO_ORIGIN(p);
      -      ReleaseMemoryPagesToOS(origin_p, origin_p + size);
      -    }
      -  }
      -};
      -
      -#if defined(__mips64)
      -  static const uptr kMaxAllowedMallocSize = 2UL << 30;
      -  static const uptr kRegionSizeLog = 20;
      -  static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog;
      -  typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap;
      -
      -  struct AP32 {
      -    static const uptr kSpaceBeg = 0;
      -    static const u64 kSpaceSize = SANITIZER_MMAP_RANGE_SIZE;
      -    static const uptr kMetadataSize = sizeof(Metadata);
      -    typedef __sanitizer::CompactSizeClassMap SizeClassMap;
      -    static const uptr kRegionSizeLog = __msan::kRegionSizeLog;
      -    typedef __msan::ByteMap ByteMap;
      -    typedef MsanMapUnmapCallback MapUnmapCallback;
      -    static const uptr kFlags = 0;
      -  };
      -  typedef SizeClassAllocator32 PrimaryAllocator;
      -#elif defined(__x86_64__)
      -#if SANITIZER_LINUX && !defined(MSAN_LINUX_X86_64_OLD_MAPPING)
      -  static const uptr kAllocatorSpace = 0x700000000000ULL;
      -#else
      -  static const uptr kAllocatorSpace = 0x600000000000ULL;
      -#endif
      -  static const uptr kMaxAllowedMallocSize = 8UL << 30;
      -
      -  struct AP64 {  // Allocator64 parameters. Deliberately using a short name.
      -    static const uptr kSpaceBeg = kAllocatorSpace;
      -    static const uptr kSpaceSize = 0x40000000000; // 4T.
      -    static const uptr kMetadataSize = sizeof(Metadata);
      -    typedef DefaultSizeClassMap SizeClassMap;
      -    typedef MsanMapUnmapCallback MapUnmapCallback;
      -    static const uptr kFlags = 0;
      -  };
      -
      -  typedef SizeClassAllocator64 PrimaryAllocator;
      -
      -#elif defined(__powerpc64__)
      -  static const uptr kMaxAllowedMallocSize = 2UL << 30;  // 2G
      -
      -  struct AP64 {  // Allocator64 parameters. Deliberately using a short name.
      -    static const uptr kSpaceBeg = 0x300000000000;
      -    static const uptr kSpaceSize = 0x020000000000; // 2T.
      -    static const uptr kMetadataSize = sizeof(Metadata);
      -    typedef DefaultSizeClassMap SizeClassMap;
      -    typedef MsanMapUnmapCallback MapUnmapCallback;
      -    static const uptr kFlags = 0;
      -  };
      -
      -  typedef SizeClassAllocator64 PrimaryAllocator;
      -#elif defined(__aarch64__)
      -  static const uptr kMaxAllowedMallocSize = 2UL << 30;  // 2G
      -  static const uptr kRegionSizeLog = 20;
      -  static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog;
      -  typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap;
      -
      -  struct AP32 {
      -    static const uptr kSpaceBeg = 0;
      -    static const u64 kSpaceSize = SANITIZER_MMAP_RANGE_SIZE;
      -    static const uptr kMetadataSize = sizeof(Metadata);
      -    typedef __sanitizer::CompactSizeClassMap SizeClassMap;
      -    static const uptr kRegionSizeLog = __msan::kRegionSizeLog;
      -    typedef __msan::ByteMap ByteMap;
      -    typedef MsanMapUnmapCallback MapUnmapCallback;
      -    static const uptr kFlags = 0;
      -  };
      -  typedef SizeClassAllocator32 PrimaryAllocator;
      -#endif
      -typedef SizeClassAllocatorLocalCache AllocatorCache;
      -typedef LargeMmapAllocator SecondaryAllocator;
      -typedef CombinedAllocator Allocator;
      -
      -
      -Allocator &get_allocator();
       
       struct MsanThreadLocalMallocStorage {
         uptr quarantine_cache[16];
      
      Modified: vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -1201,7 +1201,6 @@ INTERCEPTOR(void *, shmat, int shmid, const void *shma
       }
       
       static void BeforeFork() {
      -  get_allocator().ForceLock();
         StackDepotLockAll();
         ChainedOriginDepotLockAll();
       }
      @@ -1209,7 +1208,6 @@ static void BeforeFork() {
       static void AfterFork() {
         ChainedOriginDepotUnlockAll();
         StackDepotUnlockAll();
      -  get_allocator().ForceUnlock();
       }
       
       INTERCEPTOR(int, fork, void) {
      
      Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -3395,7 +3395,10 @@ INTERCEPTOR(char *, strerror_r, int errnum, char *buf,
         // its metadata. See
         // https://github.com/google/sanitizers/issues/321.
         char *res = REAL(strerror_r)(errnum, buf, buflen);
      -  COMMON_INTERCEPTOR_WRITE_RANGE(ctx, res, REAL(strlen)(res) + 1);
      +  if (res == buf)
      +    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, res, REAL(strlen)(res) + 1);
      +  else
      +    COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, REAL(strlen)(res) + 1);
         return res;
       }
       #endif //(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE ||
      
      Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -75,6 +75,16 @@ extern char **environ;  // provided by crt1
       #include 
       #endif
       
      +#ifndef __GLIBC_PREREQ
      +#define __GLIBC_PREREQ(x, y) 0
      +#endif
      +
      +#if SANITIZER_LINUX && __GLIBC_PREREQ(2, 16)
      +# define SANITIZER_USE_GETAUXVAL 1
      +#else
      +# define SANITIZER_USE_GETAUXVAL 0
      +#endif
      +
       #if SANITIZER_USE_GETAUXVAL
       #include 
       #endif
      
      Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform.h
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform.h	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform.h	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -269,14 +269,5 @@
       # define SANITIZER_SUPPRESS_LEAK_ON_PTHREAD_EXIT 0
       #endif
       
      -#ifndef __GLIBC_PREREQ
      -#define __GLIBC_PREREQ(x, y) 0
      -#endif
      -
      -#if SANITIZER_LINUX && __GLIBC_PREREQ(2, 16)
      -# define SANITIZER_USE_GETAUXVAL 1
      -#else
      -# define SANITIZER_USE_GETAUXVAL 0
      -#endif
       
       #endif // SANITIZER_PLATFORM_H
      
      Modified: vendor/compiler-rt/dist/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -129,7 +129,7 @@ if [[ ! -d ${LLVM_BUILD} ]]; then
         $LLVM_SRC
       fi
       cd ${LLVM_BUILD}
      -ninja LLVMSymbolize LLVMObject LLVMDebugInfoDWARF LLVMSupport LLVMDebugInfoPDB LLVMMC
      +ninja LLVMSymbolize LLVMObject LLVMBinaryFormat LLVMDebugInfoDWARF LLVMSupport LLVMDebugInfoPDB LLVMMC
       
       cd ${BUILD_DIR}
       rm -rf ${SYMBOLIZER_BUILD}
      @@ -148,6 +148,7 @@ $SCRIPT_DIR/ar_to_bc.sh $LIBCXX_BUILD/lib/libc++.a \
                               $LIBCXX_BUILD/lib/libc++abi.a \
                               $LLVM_BUILD/lib/libLLVMSymbolize.a \
                               $LLVM_BUILD/lib/libLLVMObject.a \
      +                        $LLVM_BUILD/lib/libLLVMBinaryFormat.a \
                               $LLVM_BUILD/lib/libLLVMDebugInfoDWARF.a \
                               $LLVM_BUILD/lib/libLLVMSupport.a \
                               $LLVM_BUILD/lib/libLLVMDebugInfoPDB.a \
      
      Modified: vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -345,6 +345,7 @@ void MemoryAccessRange(ThreadState *thr, uptr pc, uptr
         StatInc(thr, StatMopRange);
       
         if (*shadow_mem == kShadowRodata) {
      +    DCHECK(!is_write);
           // Access to .rodata section, no races here.
           // Measurements show that it can be 10-20% of all memory accesses.
           StatInc(thr, StatMopRangeRodata);
      
      Modified: vendor/compiler-rt/dist/test/asan/TestCases/Darwin/atos-symbolizer.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/test/asan/TestCases/Darwin/atos-symbolizer.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/test/asan/TestCases/Darwin/atos-symbolizer.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -4,7 +4,7 @@
       // RUN: %env_asan_opts=verbosity=2 ASAN_SYMBOLIZER_PATH=$(which atos) not %run %t 2>&1 | FileCheck %s
       
       // Path returned by `which atos` is invalid on iOS.
      -// UNSUPPORTED: ios
      +// UNSUPPORTED: ios, i386-darwin
       
       #include 
       #include 
      
      Added: vendor/compiler-rt/dist/test/asan/TestCases/Linux/asan_preload_test-3.cc
      ==============================================================================
      --- /dev/null	00:00:00 1970	(empty, because file is newly added)
      +++ vendor/compiler-rt/dist/test/asan/TestCases/Linux/asan_preload_test-3.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -0,0 +1,33 @@
      +// Regression test for PR33206
      +//
      +// RUN: %clang -DDYN=1 -DMALLOC=1 -fPIC -shared %s -o %t-dso1.so
      +// RUN: %clang -DDYN=1 -DMALLOC=1 -fPIC -shared %s -o %t-dso2.so %t-dso1.so
      +// RUN: %clang %s -o %t-1 %t-dso2.so
      +// RUN: env LD_PRELOAD=%shared_libasan %run %t-1 2>&1 | FileCheck %s
      +// RUN: %clang -DDYN=1 -DREALLOC=1 -fPIC -shared %s -o %t-dso3.so
      +// RUN: %clang -DDYN=1 -DREALLOC=1 -fPIC -shared %s -o %t-dso4.so %t-dso3.so
      +// RUN: %clang %s -o %t-2 %t-dso4.so
      +// RUN: env LD_PRELOAD=%shared_libasan %run %t-2 2>&1 | FileCheck %s
      +// REQUIRES: asan-dynamic-runtime
      +
      +#include 
      +#include 
      +
      +#ifdef DYN
      +__attribute__((constructor)) void foo() {
      +  void *p;
      +#ifdef MALLOC
      +  p = malloc(1 << 20);
      +#endif
      +#ifdef REALLOC
      +  p = realloc (0, 1 << 20);
      +#endif
      +  free(p);
      +}
      +#else
      +int main() {
      +  // CHECK: Success
      +  printf("Success\n");
      +  return 0;
      +}
      +#endif
      
      Modified: vendor/compiler-rt/dist/test/asan/TestCases/Posix/halt_on_error-torture.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/test/asan/TestCases/Posix/halt_on_error-torture.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/test/asan/TestCases/Posix/halt_on_error-torture.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -10,12 +10,12 @@
       //
       // Collisions are unlikely but still possible so we need the ||.
       // RUN: rm -f 10.txt
      -// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t 10 20 >>10.txt 2>&1 || true
      +// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false:exitcode=0 %run %t 10 20 2>&1 | cat > 10.txt
       // RUN: FileCheck --check-prefix=CHECK-COLLISION %s < 10.txt || FileCheck --check-prefix=CHECK-NO-COLLISION %s < 10.txt
       //
       // Collisions are unlikely but still possible so we need the ||.
       // RUN: rm -f 20.txt
      -// RUN: %env_asan_opts=halt_on_error=false %run %t 10 20 >>20.txt 2>&1 || true
      +// RUN: %env_asan_opts=halt_on_error=false:exitcode=0 %run %t 10 20 2>&1 | cat > 20.txt
       // RUN: FileCheck --check-prefix=CHECK-COLLISION %s < 20.txt || FileCheck --check-prefix=CHECK-NO-COLLISION %s < 20.txt
       
       #include 
      @@ -38,7 +38,7 @@ void *run(void *arg) {
         unsigned seed = (unsigned)(size_t)arg;
       
         volatile char tmp[2];
      -  __asan_poison_memory_region(&tmp, sizeof(tmp)); 
      +  __asan_poison_memory_region(&tmp, sizeof(tmp));
       
         for (size_t i = 0; i < niter; ++i) {
           random_delay(&seed);
      
      Added: vendor/compiler-rt/dist/test/msan/Linux/strerror_r.cc
      ==============================================================================
      --- /dev/null	00:00:00 1970	(empty, because file is newly added)
      +++ vendor/compiler-rt/dist/test/msan/Linux/strerror_r.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -0,0 +1,18 @@
      +// RUN: %clang_msan -O0 -g %s -o %t && %run %t
      +
      +#include 
      +#include 
      +#include 
      +
      +int main() {
      +  char buf[1000];
      +  char *res = strerror_r(EINVAL, buf, sizeof(buf));
      +  assert(res);
      +  volatile int z = strlen(res);
      +
      +  res = strerror_r(-1, buf, sizeof(buf));
      +  assert(res);
      +  z = strlen(res);
      +
      +  return 0;
      +}
      
      Modified: vendor/compiler-rt/dist/test/profile/Linux/instrprof-alloc.test
      ==============================================================================
      --- vendor/compiler-rt/dist/test/profile/Linux/instrprof-alloc.test	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/test/profile/Linux/instrprof-alloc.test	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -1,6 +1,6 @@
      -// RUN: %clang_profgen -Xclang -fprofile-instrument=llvm  -fuse-ld=gold -Wl,-wrap,malloc -Wl,-wrap,calloc -o %t -O3 %S/../Inputs/instrprof-alloc.c
      +// RUN: %clang_pgogen  -fuse-ld=gold -Wl,-wrap,malloc -Wl,-wrap,calloc -o %t -O3 %S/../Inputs/instrprof-alloc.c
       // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
       
      -// RUN: %clang_profgen  -Xclang -fprofile-instrument=llvm -mllvm -vp-static-alloc=false -fuse-ld=gold -Wl,-wrap,malloc -Wl,-wrap,calloc -o %t.dyn -O3 %S/../Inputs/instrprof-alloc.c
      +// RUN: %clang_pgogen  -mllvm -vp-static-alloc=false -fuse-ld=gold -Wl,-wrap,malloc -Wl,-wrap,calloc -o %t.dyn -O3 %S/../Inputs/instrprof-alloc.c
       // RUN: env LLVM_PROFILE_FILE=%t.profraw not %run %t.dyn
       
      
      Modified: vendor/compiler-rt/dist/test/profile/Linux/instrprof-value-prof-warn.test
      ==============================================================================
      --- vendor/compiler-rt/dist/test/profile/Linux/instrprof-value-prof-warn.test	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/test/profile/Linux/instrprof-value-prof-warn.test	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -1,4 +1,4 @@
      -RUN: %clang_profgen -O2 -mllvm -disable-vp=false -Xclang -fprofile-instrument=llvm -mllvm -vp-static-alloc=true -DSTRESS=1 -o %t.ir.warn  %S/../Inputs/instrprof-value-prof-real.c
      +RUN: %clang_pgogen -O2 -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -DSTRESS=1 -o %t.ir.warn  %S/../Inputs/instrprof-value-prof-real.c
       RUN: env LLVM_PROFILE_FILE=%t.ir.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255  %run %t.ir.warn 2>&1 |FileCheck --check-prefix=WARNING %s
       #  Test that enough static counters have been allocated
       RUN: env LLVM_PROFILE_FILE=%t.ir.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=150  %run %t.ir.warn 2>&1 |FileCheck --check-prefix=NOWARNING --allow-empty %s
      
      Modified: vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc
      ==============================================================================
      --- vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc	Sat Jun 10 13:44:29 2017	(r319783)
      +++ vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -1,7 +1,7 @@
       // Tests -fsanitize-coverage=inline-8bit-counters
       //
       // REQUIRES: has_sancovcc,stable-runtime
      -// UNSUPPORTED: i386-darwin
      +// UNSUPPORTED: i386-darwin, x86_64-darwin, x86_64h-darwin
       //
       // RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters 2>&1
       
      
      Added: vendor/compiler-rt/dist/test/tsan/strerror_r.cc
      ==============================================================================
      --- /dev/null	00:00:00 1970	(empty, because file is newly added)
      +++ vendor/compiler-rt/dist/test/tsan/strerror_r.cc	Sat Jun 10 13:44:32 2017	(r319784)
      @@ -0,0 +1,29 @@
      +// RUN: %clangxx_tsan -O1 -DTEST_ERROR=ERANGE %s -o %t && %run %t 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-SYS %s
      +// RUN: %clangxx_tsan -O1 -DTEST_ERROR=-1 %s -o %t && not %run %t 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-USER %s
      +// UNSUPPORTED: darwin
      +
      +#include 
      +#include 
      +#include 
      +#include 
      +#include 
      +
      +char buffer[1000];
      +
      +void *Thread(void *p) {
      +  return strerror_r(TEST_ERROR, buffer, sizeof(buffer));
      +}
      +
      +int main() {
      +  pthread_t th[2];
      +  pthread_create(&th[0], 0, Thread, 0);
      +  pthread_create(&th[1], 0, Thread, 0);
      +  pthread_join(th[0], 0);
      +  pthread_join(th[1], 0);
      +  fprintf(stderr, "DONE\n");
      +}
      +
      +// CHECK-USER: WARNING: ThreadSanitizer: data race
      +// CHECK-SYS-NOT: WARNING: ThreadSanitizer: data race
      +
      +// CHECK: DONE
      
      From owner-svn-src-vendor@freebsd.org  Sat Jun 10 13:44:39 2017
      Return-Path: 
      Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org
      Received: from mx1.freebsd.org (mx1.freebsd.org
       [IPv6:2001:1900:2254:206a::19:1])
       by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEB4BB95474;
       Sat, 10 Jun 2017 13:44:39 +0000 (UTC) (envelope-from dim@FreeBSD.org)
      Received: from repo.freebsd.org (repo.freebsd.org
       [IPv6:2610:1c1:1:6068::e6a:0])
       (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
       (Client did not present a certificate)
       by mx1.freebsd.org (Postfix) with ESMTPS id 73252789C2;
       Sat, 10 Jun 2017 13:44:39 +0000 (UTC) (envelope-from dim@FreeBSD.org)
      Received: from repo.freebsd.org ([127.0.1.37])
       by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ADicKT094892;
       Sat, 10 Jun 2017 13:44:38 GMT (envelope-from dim@FreeBSD.org)
      Received: (from dim@localhost)
       by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ADicww094891;
       Sat, 10 Jun 2017 13:44:38 GMT (envelope-from dim@FreeBSD.org)
      Message-Id: <201706101344.v5ADicww094891@repo.freebsd.org>
      X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
       using -f
      From: Dimitry Andric 
      Date: Sat, 10 Jun 2017 13:44:38 +0000 (UTC)
      To: src-committers@freebsd.org, svn-src-all@freebsd.org,
       svn-src-vendor@freebsd.org
      Subject: svn commit: r319785 - vendor/compiler-rt/compiler-rt-trunk-r305145
      X-SVN-Group: vendor
      MIME-Version: 1.0
      Content-Type: text/plain; charset=UTF-8
      Content-Transfer-Encoding: 8bit
      X-BeenThere: svn-src-vendor@freebsd.org
      X-Mailman-Version: 2.1.23
      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: Sat, 10 Jun 2017 13:44:39 -0000
      
      Author: dim
      Date: Sat Jun 10 13:44:38 2017
      New Revision: 319785
      URL: https://svnweb.freebsd.org/changeset/base/319785
      
      Log:
        Tag compiler-rt trunk r305145.
      
      Added:
        vendor/compiler-rt/compiler-rt-trunk-r305145/
           - copied from r319784, vendor/compiler-rt/dist/
      
      From owner-svn-src-vendor@freebsd.org  Sat Jun 10 13:44:44 2017
      Return-Path: 
      Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org
      Received: from mx1.freebsd.org (mx1.freebsd.org
       [IPv6:2001:1900:2254:206a::19:1])
       by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20E6FB954CF;
       Sat, 10 Jun 2017 13:44:44 +0000 (UTC) (envelope-from dim@FreeBSD.org)
      Received: from repo.freebsd.org (repo.freebsd.org
       [IPv6:2610:1c1:1:6068::e6a:0])
       (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
       (Client did not present a certificate)
       by mx1.freebsd.org (Postfix) with ESMTPS id CB11578A53;
       Sat, 10 Jun 2017 13:44:43 +0000 (UTC) (envelope-from dim@FreeBSD.org)
      Received: from repo.freebsd.org ([127.0.1.37])
       by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ADihYu094958;
       Sat, 10 Jun 2017 13:44:43 GMT (envelope-from dim@FreeBSD.org)
      Received: (from dim@localhost)
       by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ADifoO094939;
       Sat, 10 Jun 2017 13:44:41 GMT (envelope-from dim@FreeBSD.org)
      Message-Id: <201706101344.v5ADifoO094939@repo.freebsd.org>
      X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
       using -f
      From: Dimitry Andric 
      Date: Sat, 10 Jun 2017 13:44:41 +0000 (UTC)
      To: src-committers@freebsd.org, svn-src-all@freebsd.org,
       svn-src-vendor@freebsd.org
      Subject: svn commit: r319786 - in vendor/libc++/dist: include
       test/libcxx/utilities/variant/variant.variant/variant.assign
       test/libcxx/utilities/variant/variant.variant/variant.ctor
       test/std/localization/lo...
      X-SVN-Group: vendor
      MIME-Version: 1.0
      Content-Type: text/plain; charset=UTF-8
      Content-Transfer-Encoding: 8bit
      X-BeenThere: svn-src-vendor@freebsd.org
      X-Mailman-Version: 2.1.23
      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: Sat, 10 Jun 2017 13:44:44 -0000
      
      Author: dim
      Date: Sat Jun 10 13:44:41 2017
      New Revision: 319786
      URL: https://svnweb.freebsd.org/changeset/base/319786
      
      Log:
        Vendor import of libc++ trunk r305145:
        https://llvm.org/svn/llvm-project/libcxx/trunk@305145
      
      Added:
        vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/
        vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_iter_iter_iter.pass.cpp   (contents, props changed)
        vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_iter_iter_iter_init_op.pass.cpp   (contents, props changed)
        vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/
        vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_iter_iter_iter_init_bop_uop.pass.cpp   (contents, props changed)
        vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/implicit_deduction_guides.pass.cpp   (contents, props changed)
      Deleted:
        vendor/libc++/dist/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
        vendor/libc++/dist/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp
        vendor/libc++/dist/test/libcxx/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp
        vendor/libc++/dist/test/libcxx/utilities/variant/variant.variant/variant.ctor/move.pass.cpp
        vendor/libc++/dist/test/support/test.workarounds/c1xx_empty_parameter_pack_expansion.pass.cpp
      Modified:
        vendor/libc++/dist/include/__mutex_base
        vendor/libc++/dist/include/mutex
        vendor/libc++/dist/include/numeric
        vendor/libc++/dist/include/optional
        vendor/libc++/dist/include/tuple
        vendor/libc++/dist/include/variant
        vendor/libc++/dist/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp
        vendor/libc++/dist/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/default.pass.cpp
        vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp
        vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.observe/value_or.pass.cpp
        vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp
        vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
        vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp
        vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp
        vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp
        vendor/libc++/dist/test/support/msvc_stdlib_force_include.hpp
        vendor/libc++/dist/test/support/platform_support.h
        vendor/libc++/dist/test/support/test_workarounds.h
        vendor/libc++/dist/test/support/uses_alloc_types.hpp
        vendor/libc++/dist/test/support/variant_test_helpers.hpp
        vendor/libc++/dist/www/cxx1z_status.html
      
      Modified: vendor/libc++/dist/include/__mutex_base
      ==============================================================================
      --- vendor/libc++/dist/include/__mutex_base	Sat Jun 10 13:44:38 2017	(r319785)
      +++ vendor/libc++/dist/include/__mutex_base	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -48,7 +48,7 @@ class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATIO
       public:
           _LIBCPP_INLINE_VISIBILITY
       #ifndef _LIBCPP_CXX03_LANG
      -    constexpr mutex() _NOEXCEPT = default;
      +    constexpr mutex() = default;
       #else
           mutex() _NOEXCEPT {__m_ = (__libcpp_mutex_t)_LIBCPP_MUTEX_INITIALIZER;}
       #endif
      @@ -66,6 +66,9 @@ class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATIO
           typedef __libcpp_mutex_t* native_handle_type;
           _LIBCPP_INLINE_VISIBILITY native_handle_type native_handle() {return &__m_;}
       };
      +
      +static_assert(is_nothrow_default_constructible::value,
      +              "the default constructor for std::mutex must be nothrow");
       
       struct _LIBCPP_TYPE_VIS defer_lock_t {};
       struct _LIBCPP_TYPE_VIS try_to_lock_t {};
      
      Modified: vendor/libc++/dist/include/mutex
      ==============================================================================
      --- vendor/libc++/dist/include/mutex	Sat Jun 10 13:44:38 2017	(r319785)
      +++ vendor/libc++/dist/include/mutex	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -502,7 +502,6 @@ class _LIBCPP_TEMPLATE_VIS scoped_lock<_Mutex> { (publ
           _LIBCPP_INLINE_VISIBILITY
           explicit scoped_lock(mutex_type& __m, adopt_lock_t) _LIBCPP_THREAD_SAFETY_ANNOTATION(requires_capability(__m))
               : __m_(__m) {}
      -    
       
           scoped_lock(scoped_lock const&) = delete;
           scoped_lock& operator=(scoped_lock const&) = delete;
      
      Modified: vendor/libc++/dist/include/numeric
      ==============================================================================
      --- vendor/libc++/dist/include/numeric	Sat Jun 10 13:44:38 2017	(r319785)
      +++ vendor/libc++/dist/include/numeric	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -42,6 +42,23 @@ template 
      +    OutputIterator
      +    exclusive_scan(InputIterator first, InputIterator last,
      +                   OutputIterator result, T init); // C++17
      +                           
      +template
      +    OutputIterator
      +    exclusive_scan(InputIterator first, InputIterator last, 
      +                   OutputIterator result, T init, BinaryOperation binary_op); // C++17
      +
      +template
      +    OutputIterator
      +    transform_exclusive_scan(InputIterator first, InputIterator last,
      +                             OutputIterator result, T init,
      +                             BinaryOperation binary_op, UnaryOperation unary_op);  // C++17
      +
       template 
           OutputIterator
           adjacent_difference(InputIterator first, InputIterator last, OutputIterator result);
      @@ -66,6 +83,7 @@ template 
       #include <__config>
       #include 
       #include  // for numeric_limits
      +#include 
       
       #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
       #pragma GCC system_header
      @@ -153,6 +171,59 @@ partial_sum(_InputIterator __first, _InputIterator __l
           }
           return __result;
       }
      +
      +#if _LIBCPP_STD_VER > 14
      +template 
      +inline _LIBCPP_INLINE_VISIBILITY
      +_OutputIterator
      +exclusive_scan(_InputIterator __first, _InputIterator __last, 
      +               _OutputIterator __result, _Tp __init, _BinaryOp __b)
      +{
      +    if (__first != __last)
      +    {
      +        _Tp __saved = __init;
      +        do
      +        {
      +            __init = __b(__init, *__first);
      +            *__result = __saved;
      +            __saved = __init;
      +            ++__result;
      +        } while (++__first != __last);
      +    }
      +    return __result;
      +}
      +
      +template 
      +inline _LIBCPP_INLINE_VISIBILITY
      +_OutputIterator
      +exclusive_scan(_InputIterator __first, _InputIterator __last, 
      +               _OutputIterator __result, _Tp __init)
      +{
      +    return _VSTD::exclusive_scan(__first, __last, __result, __init, _VSTD::plus<>());
      +}
      +
      +template 
      +inline _LIBCPP_INLINE_VISIBILITY
      +_OutputIterator
      +transform_exclusive_scan(_InputIterator __first, _InputIterator __last, 
      +                           _OutputIterator __result, _Tp __init,
      +                           _BinaryOp __b, _UnaryOp __u)
      +{
      +    if (__first != __last)
      +    {
      +        _Tp __saved = __init;
      +        do
      +        {
      +            __init = __b(__init, __u(*__first));
      +            *__result = __saved;
      +            __saved = __init;
      +            ++__result;
      +        } while (++__first != __last);
      +    }
      +    return __result;
      +}
      +#endif
       
       template 
       inline _LIBCPP_INLINE_VISIBILITY
      
      Modified: vendor/libc++/dist/include/optional
      ==============================================================================
      --- vendor/libc++/dist/include/optional	Sat Jun 10 13:44:38 2017	(r319785)
      +++ vendor/libc++/dist/include/optional	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -897,7 +897,7 @@ class optional (public)
       
           template 
           _LIBCPP_INLINE_VISIBILITY
      -    value_type value_or(_Up&& __v) &&
      +    constexpr value_type value_or(_Up&& __v) &&
           {
               static_assert(is_move_constructible_v,
                             "optional::value_or: T must be move constructible");
      
      Modified: vendor/libc++/dist/include/tuple
      ==============================================================================
      --- vendor/libc++/dist/include/tuple	Sat Jun 10 13:44:38 2017	(r319785)
      +++ vendor/libc++/dist/include/tuple	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -929,6 +929,16 @@ class _LIBCPP_TEMPLATE_VIS tuple<> (public)
           void swap(tuple&) _NOEXCEPT {}
       };
       
      +#ifdef __cpp_deduction_guides
      +// NOTE: These are not yet standardized, but are required to simulate the
      +// implicit deduction guide that should be generated had libc++ declared the
      +// tuple-like constructors "correctly"
      +template 
      +tuple(allocator_arg_t, const _Alloc&, tuple<_Args...> const&) -> tuple<_Args...>;
      +template 
      +tuple(allocator_arg_t, const _Alloc&, tuple<_Args...>&&) -> tuple<_Args...>;
      +#endif
      +
       template 
       inline _LIBCPP_INLINE_VISIBILITY
       typename enable_if
      
      Modified: vendor/libc++/dist/include/variant
      ==============================================================================
      --- vendor/libc++/dist/include/variant	Sat Jun 10 13:44:38 2017	(r319785)
      +++ vendor/libc++/dist/include/variant	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -358,7 +358,6 @@ struct __traits {
       
         static constexpr _Trait __copy_assignable_trait = __common_trait(
             {__copy_constructible_trait,
      -       __move_constructible_trait,
              __trait<_Types, is_trivially_copy_assignable, is_copy_assignable>...});
       
         static constexpr _Trait __move_assignable_trait = __common_trait(
      @@ -877,25 +876,24 @@ class _LIBCPP_TEMPLATE_VIS __assignment : public __cop
         }
       
       protected:
      -  template 
      +  template 
         inline _LIBCPP_INLINE_VISIBILITY
      -  void __assign_alt(__alt<_Ip, _Tp>& __a,
      -                    _Arg&& __arg,
      -                    bool_constant<_CopyAssign> __tag) {
      +  void __assign_alt(__alt<_Ip, _Tp>& __a, _Arg&& __arg) {
           if (this->index() == _Ip) {
             __a.__value = _VSTD::forward<_Arg>(__arg);
           } else {
             struct {
               void operator()(true_type) const {
      -          __this->__emplace<_Ip>(_Tp(_VSTD::forward<_Arg>(__arg)));
      +          __this->__emplace<_Ip>(_VSTD::forward<_Arg>(__arg));
               }
               void operator()(false_type) const {
      -          __this->__emplace<_Ip>(_VSTD::forward<_Arg>(__arg));
      +          __this->__emplace<_Ip>(_Tp(_VSTD::forward<_Arg>(__arg)));
               }
               __assignment* __this;
               _Arg&& __arg;
             } __impl{this, _VSTD::forward<_Arg>(__arg)};
      -      __impl(__tag);
      +      __impl(bool_constant ||
      +                           !is_nothrow_move_constructible_v<_Tp>>{});
           }
         }
       
      @@ -912,8 +910,7 @@ class _LIBCPP_TEMPLATE_VIS __assignment : public __cop
                 [this](auto& __this_alt, auto&& __that_alt) {
                   this->__assign_alt(
                       __this_alt,
      -                _VSTD::forward(__that_alt).__value,
      -                is_lvalue_reference<_That>{});
      +                _VSTD::forward(__that_alt).__value);
                 },
                 *this, _VSTD::forward<_That>(__that));
           }
      @@ -1013,8 +1010,7 @@ class _LIBCPP_TEMPLATE_VIS __impl (public)
         inline _LIBCPP_INLINE_VISIBILITY
         void __assign(_Arg&& __arg) {
           this->__assign_alt(__access::__base::__get_alt<_Ip>(*this),
      -                       _VSTD::forward<_Arg>(__arg),
      -                       false_type{});
      +                       _VSTD::forward<_Arg>(__arg));
         }
       
         inline _LIBCPP_INLINE_VISIBILITY
      @@ -1088,7 +1084,6 @@ class _LIBCPP_TEMPLATE_VIS variant
                 __all...>::value>,
             private __sfinae_assign_base<
                 __all<(is_copy_constructible_v<_Types> &&
      -                 is_move_constructible_v<_Types> &&
                        is_copy_assignable_v<_Types>)...>::value,
                 __all<(is_move_constructible_v<_Types> &&
                        is_move_assignable_v<_Types>)...>::value> {
      
      Modified: vendor/libc++/dist/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp
      ==============================================================================
      --- vendor/libc++/dist/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp	Sat Jun 10 13:44:38 2017	(r319785)
      +++ vendor/libc++/dist/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -17,6 +17,8 @@
       #include 
       #include 
       
      +#include "platform_support.h"
      +
       typedef std::codecvt_byname F;
       
       class my_facet
      @@ -38,12 +40,12 @@ int my_facet::count = 0;
       int main()
       {
           {
      -        std::locale l(std::locale::classic(), new my_facet("en_US"));
      +        std::locale l(std::locale::classic(), new my_facet(LOCALE_en_US));
               assert(my_facet::count == 1);
           }
           assert(my_facet::count == 0);
           {
      -        my_facet f("en_US", 1);
      +        my_facet f(LOCALE_en_US, 1);
               assert(my_facet::count == 1);
               {
                   std::locale l(std::locale::classic(), &f);
      @@ -53,12 +55,12 @@ int main()
           }
           assert(my_facet::count == 0);
           {
      -        std::locale l(std::locale::classic(), new my_facet(std::string("en_US")));
      +        std::locale l(std::locale::classic(), new my_facet(std::string(LOCALE_en_US)));
               assert(my_facet::count == 1);
           }
           assert(my_facet::count == 0);
           {
      -        my_facet f(std::string("en_US"), 1);
      +        my_facet f(std::string(LOCALE_en_US), 1);
               assert(my_facet::count == 1);
               {
                   std::locale l(std::locale::classic(), &f);
      
      Added: vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_iter_iter_iter.pass.cpp
      ==============================================================================
      --- /dev/null	00:00:00 1970	(empty, because file is newly added)
      +++ vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_iter_iter_iter.pass.cpp	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -0,0 +1,97 @@
      +//===----------------------------------------------------------------------===//
      +//
      +//                     The LLVM Compiler Infrastructure
      +//
      +// This file is dual licensed under the MIT and the University of Illinois Open
      +// Source Licenses. See LICENSE.TXT for details.
      +//
      +//===----------------------------------------------------------------------===//
      +
      +// 
      +// UNSUPPORTED: c++98, c++03, c++11, c++14
      +
      +// template
      +//     OutputIterator exclusive_scan(InputIterator first, InputIterator last,
      +//                                   OutputIterator result, T init);
      +// 
      +
      +#include 
      +#include 
      +#include 
      +
      +#include "test_iterators.h"
      +
      +template 
      +void
      +test(Iter1 first, Iter1 last, T init, Iter2 rFirst, Iter2 rLast)
      +{
      +    std::vector::value_type> v;
      +    
      +//  Not in place
      +    std::exclusive_scan(first, last, std::back_inserter(v), init);
      +    assert(std::equal(v.begin(), v.end(), rFirst, rLast));
      +
      +//  In place
      +    v.clear();
      +    v.assign(first, last);
      +    std::exclusive_scan(v.begin(), v.end(), v.begin(), init);
      +    assert(std::equal(v.begin(), v.end(), rFirst, rLast));  
      +}
      +
      +
      +template 
      +void
      +test()
      +{
      +          int ia[]   = {1, 3, 5, 7,  9};
      +    const int pRes[] = {0, 1, 4, 9, 16};
      +    const unsigned sa = sizeof(ia) / sizeof(ia[0]);
      +    static_assert(sa == sizeof(pRes) / sizeof(pRes[0]));       // just to be sure
      +
      +    for (unsigned int i = 0; i < sa; ++i )
      +        test(Iter(ia), Iter(ia + i), 0, pRes, pRes + i);
      +}
      +
      +int triangle(int n) { return n*(n+1)/2; }
      +
      +//  Basic sanity
      +void basic_tests()
      +{
      +    {
      +    std::vector v(10);
      +    std::fill(v.begin(), v.end(), 3);
      +    std::exclusive_scan(v.begin(), v.end(), v.begin(), 50);
      +    for (size_t i = 0; i < v.size(); ++i)
      +        assert(v[i] == 50 + (int) i * 3);
      +    }
      +
      +    {
      +    std::vector v(10);
      +    std::iota(v.begin(), v.end(), 0);
      +    std::exclusive_scan(v.begin(), v.end(), v.begin(), 30);
      +    for (size_t i = 0; i < v.size(); ++i)
      +        assert(v[i] == 30 + triangle(i-1));
      +    }
      +
      +    {
      +    std::vector v(10);
      +    std::iota(v.begin(), v.end(), 1);
      +    std::exclusive_scan(v.begin(), v.end(), v.begin(), 40);
      +    for (size_t i = 0; i < v.size(); ++i)
      +        assert(v[i] == 40 + triangle(i));
      +    }
      +
      +}
      +
      +int main()
      +{
      +    basic_tests();
      +
      +//  All the iterator categories
      +    test >();
      +    test >();
      +    test >();
      +    test >();
      +    test();
      +    test<      int*>();
      +}
      
      Added: vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_iter_iter_iter_init_op.pass.cpp
      ==============================================================================
      --- /dev/null	00:00:00 1970	(empty, because file is newly added)
      +++ vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_iter_iter_iter_init_op.pass.cpp	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -0,0 +1,87 @@
      +//===----------------------------------------------------------------------===//
      +//
      +//                     The LLVM Compiler Infrastructure
      +//
      +// This file is dual licensed under the MIT and the University of Illinois Open
      +// Source Licenses. See LICENSE.TXT for details.
      +//
      +//===----------------------------------------------------------------------===//
      +
      +// 
      +// UNSUPPORTED: c++98, c++03, c++11, c++14
      +
      +// template
      +//     OutputIterator
      +//     exclusive_scan(InputIterator first, InputIterator last,
      +//                    OutputIterator result, 
      +//                    T init, BinaryOperation binary_op); // C++17
      +
      +#include 
      +#include 
      +#include 
      +
      +#include "test_iterators.h"
      +
      +template 
      +void
      +test(Iter1 first, Iter1 last, T init, Op op, Iter2 rFirst, Iter2 rLast)
      +{
      +    std::vector::value_type> v;
      +
      +//  Not in place
      +    std::exclusive_scan(first, last, std::back_inserter(v), init, op);
      +    assert(std::equal(v.begin(), v.end(), rFirst, rLast));
      +
      +//  In place
      +    v.clear();
      +    v.assign(first, last);
      +    std::exclusive_scan(v.begin(), v.end(), v.begin(), init, op);
      +    assert(std::equal(v.begin(), v.end(), rFirst, rLast));  
      +}
      +
      +
      +template 
      +void
      +test()
      +{
      +          int ia[]   = {1, 3, 5,  7,   9};
      +    const int pRes[] = {0, 1, 4,  9,  16};
      +    const int mRes[] = {1, 1, 3, 15, 105};
      +    const unsigned sa = sizeof(ia) / sizeof(ia[0]);
      +    static_assert(sa == sizeof(pRes) / sizeof(pRes[0]));       // just to be sure
      +    static_assert(sa == sizeof(mRes) / sizeof(mRes[0]));       // just to be sure
      +
      +    for (unsigned int i = 0; i < sa; ++i ) {
      +        test(Iter(ia), Iter(ia + i), 0, std::plus<>(),       pRes, pRes + i);
      +        test(Iter(ia), Iter(ia + i), 1, std::multiplies<>(), mRes, mRes + i);
      +        }
      +}
      +
      +int main()
      +{
      +//  All the iterator categories
      +    test >();
      +    test >();
      +    test >();
      +    test >();
      +    test();
      +    test<      int*>();
      +
      +//  Make sure that the calculations are done using the init typedef
      +    {
      +    std::vector v(10);
      +    std::iota(v.begin(), v.end(), 1);
      +    std::vector res;
      +    std::exclusive_scan(v.begin(), v.end(), std::back_inserter(res), 1, std::multiplies<>());
      +
      +    assert(res.size() == 10);
      +    int j = 1;
      +    assert(res[0] == 1);
      +    for (size_t i = 1; i < v.size(); ++i)
      +    {
      +        j *= i;
      +        assert(res[i] == j);
      +    }
      +    }
      +}
      + 
      \ No newline at end of file
      
      Added: vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_iter_iter_iter_init_bop_uop.pass.cpp
      ==============================================================================
      --- /dev/null	00:00:00 1970	(empty, because file is newly added)
      +++ vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_iter_iter_iter_init_bop_uop.pass.cpp	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -0,0 +1,154 @@
      +//===----------------------------------------------------------------------===//
      +//
      +//                     The LLVM Compiler Infrastructure
      +//
      +// This file is dual licensed under the MIT and the University of Illinois Open
      +// Source Licenses. See LICENSE.TXT for details.
      +//
      +//===----------------------------------------------------------------------===//
      +
      +// 
      +// UNSUPPORTED: c++98, c++03, c++11, c++14
      +
      +// template
      +//   OutputIterator transform_exclusive_scan(InputIterator first, InputIterator last,
      +//                                           OutputIterator result, T init,
      +//                                           BinaryOperation binary_op,
      +//                                           UnaryOperation unary_op);
      +
      +
      +#include 
      +#include 
      +#include 
      +#include 
      +
      +#include "test_iterators.h"
      +
      +template 
      +struct identity : std::unary_function<_Tp, _Tp>
      +{
      +    constexpr const _Tp& operator()(const _Tp& __x) const { return __x;}
      +};
      +
      +template <>
      +struct identity
      +{
      +    template 
      +    constexpr auto operator()(_Tp&& __x) const
      +    _NOEXCEPT_(noexcept(_VSTD::forward<_Tp>(__x)))
      +    -> decltype        (_VSTD::forward<_Tp>(__x))
      +        { return        _VSTD::forward<_Tp>(__x); }
      +};
      +
      +template 
      +void
      +test(Iter1 first, Iter1 last, BOp bop, UOp uop, T init, Iter2 rFirst, Iter2 rLast)
      +{
      +    std::vector::value_type> v;
      +//  Test not in-place
      +    std::transform_exclusive_scan(first, last, std::back_inserter(v), init, bop, uop);
      +    assert(std::equal(v.begin(), v.end(), rFirst, rLast));
      +
      +//  Test in-place
      +    v.clear();
      +    v.assign(first, last);
      +    std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), init, bop, uop);
      +    assert(std::equal(v.begin(), v.end(), rFirst, rLast));
      +}
      +
      +
      +template 
      +void
      +test()
      +{
      +          int ia[]     = { 1,  3,  5,   7,   9};
      +    const int pResI0[] = { 0,  1,  4,   9,  16};        // with identity
      +    const int mResI0[] = { 0,  0,  0,   0,   0};        
      +    const int pResN0[] = { 0, -1, -4,  -9, -16};        // with negate
      +    const int mResN0[] = { 0,  0,  0,   0,   0};
      +    const int pResI2[] = { 2,  3,  6,  11,  18};        // with identity
      +    const int mResI2[] = { 2,  2,  6,  30, 210};        
      +    const int pResN2[] = { 2,  1, -2,  -7, -14};        // with negate
      +    const int mResN2[] = { 2, -2,  6, -30, 210};
      +    const unsigned sa = sizeof(ia) / sizeof(ia[0]);
      +    static_assert(sa == sizeof(pResI0) / sizeof(pResI0[0]));       // just to be sure
      +    static_assert(sa == sizeof(mResI0) / sizeof(mResI0[0]));       // just to be sure
      +    static_assert(sa == sizeof(pResN0) / sizeof(pResN0[0]));       // just to be sure
      +    static_assert(sa == sizeof(mResN0) / sizeof(mResN0[0]));       // just to be sure
      +    static_assert(sa == sizeof(pResI2) / sizeof(pResI2[0]));       // just to be sure
      +    static_assert(sa == sizeof(mResI2) / sizeof(mResI2[0]));       // just to be sure
      +    static_assert(sa == sizeof(pResN2) / sizeof(pResN2[0]));       // just to be sure
      +    static_assert(sa == sizeof(mResN2) / sizeof(mResN2[0]));       // just to be sure
      +
      +    for (unsigned int i = 0; i < sa; ++i ) {
      +        test(Iter(ia), Iter(ia + i), std::plus<>(),       identity<>(),    0, pResI0, pResI0 + i);
      +        test(Iter(ia), Iter(ia + i), std::multiplies<>(), identity<>(),    0, mResI0, mResI0 + i);
      +        test(Iter(ia), Iter(ia + i), std::plus<>(),       std::negate<>(), 0, pResN0, pResN0 + i);
      +        test(Iter(ia), Iter(ia + i), std::multiplies<>(), std::negate<>(), 0, mResN0, mResN0 + i);
      +        test(Iter(ia), Iter(ia + i), std::plus<>(),       identity<>(),    2, pResI2, pResI2 + i);
      +        test(Iter(ia), Iter(ia + i), std::multiplies<>(), identity<>(),    2, mResI2, mResI2 + i);
      +        test(Iter(ia), Iter(ia + i), std::plus<>(),       std::negate<>(), 2, pResN2, pResN2 + i);
      +        test(Iter(ia), Iter(ia + i), std::multiplies<>(), std::negate<>(), 2, mResN2, mResN2 + i);
      +        }
      +}
      +
      +int triangle(int n) { return n*(n+1)/2; }
      +
      +//  Basic sanity
      +void basic_tests()
      +{
      +    {
      +    std::vector v(10);
      +    std::fill(v.begin(), v.end(), 3);
      +    std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), 50, std::plus<>(), identity<>());
      +    for (size_t i = 0; i < v.size(); ++i)
      +        assert(v[i] == 50 + (int) i * 3);
      +    }
      +
      +    {
      +    std::vector v(10);
      +    std::iota(v.begin(), v.end(), 0);
      +    std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), 30, std::plus<>(), identity<>());
      +    for (size_t i = 0; i < v.size(); ++i)
      +        assert(v[i] == 30 + triangle(i-1));
      +    }
      +
      +    {
      +    std::vector v(10);
      +    std::iota(v.begin(), v.end(), 1);
      +    std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), 40, std::plus<>(), identity<>());
      +    for (size_t i = 0; i < v.size(); ++i)
      +        assert(v[i] == 40 + triangle(i));
      +    }
      +
      +//  Make sure that the calculations are done using the init typedef
      +    {
      +    std::vector v(10);
      +    std::iota(v.begin(), v.end(), 1);
      +    std::vector res;
      +    std::transform_exclusive_scan(v.begin(), v.end(), std::back_inserter(res), 1, std::multiplies<>(), identity<>());
      +
      +    assert(res.size() == 10);
      +    int j = 1;
      +    assert(res[0] == 1);
      +    for (size_t i = 1; i < res.size(); ++i)
      +    {
      +        j *= i;
      +        assert(res[i] == j);
      +    }
      +    }
      +}
      +
      +int main()
      +{
      +    basic_tests();
      +    
      +//  All the iterator categories
      +    test >();
      +    test >();
      +    test >();
      +    test >();
      +    test();
      +    test<      int*>();
      +}
      
      Modified: vendor/libc++/dist/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/default.pass.cpp
      ==============================================================================
      --- vendor/libc++/dist/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/default.pass.cpp	Sat Jun 10 13:44:38 2017	(r319785)
      +++ vendor/libc++/dist/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/default.pass.cpp	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -16,8 +16,10 @@
       // mutex();
       
       #include 
      +#include 
       
       int main()
       {
      +    static_assert(std::is_nothrow_default_constructible::value, "");
           std::mutex m;
       }
      
      Modified: vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp
      ==============================================================================
      --- vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp	Sat Jun 10 13:44:38 2017	(r319785)
      +++ vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -48,7 +48,6 @@ int main()
               assert(X::dtor_called == false);
               assert(static_cast(opt) == false);
           }
      -    assert(X::dtor_called == false); // TRANSITION, Clang/C2 VSO#239997
           {
               optional opt(X{});
               X::dtor_called = false;
      @@ -57,5 +56,4 @@ int main()
               assert(static_cast(opt) == false);
               X::dtor_called = false;
           }
      -    assert(X::dtor_called == false); // TRANSITION, Clang/C2 VSO#239997
       }
      
      Modified: vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.observe/value_or.pass.cpp
      ==============================================================================
      --- vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.observe/value_or.pass.cpp	Sat Jun 10 13:44:38 2017	(r319785)
      +++ vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.observe/value_or.pass.cpp	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -10,7 +10,7 @@
       // UNSUPPORTED: c++98, c++03, c++11, c++14
       // 
       
      -// template  T optional::value_or(U&& v) &&;
      +// template  constexpr T optional::value_or(U&& v) &&;
       
       #include 
       #include 
      @@ -26,22 +26,22 @@ struct Y
       {
           int i_;
       
      -    Y(int i) : i_(i) {}
      +    constexpr Y(int i) : i_(i) {}
       };
       
       struct X
       {
           int i_;
       
      -    X(int i) : i_(i) {}
      -    X(X&& x) : i_(x.i_) {x.i_ = 0;}
      -    X(const Y& y) : i_(y.i_) {}
      -    X(Y&& y) : i_(y.i_+1) {}
      +    constexpr X(int i) : i_(i) {}
      +    constexpr X(X&& x) : i_(x.i_) {x.i_ = 0;}
      +    constexpr X(const Y& y) : i_(y.i_) {}
      +    constexpr X(Y&& y) : i_(y.i_+1) {}
           friend constexpr bool operator==(const X& x, const X& y)
               {return x.i_ == y.i_;}
       };
       
      -int main()
      +constexpr int test()
       {
           {
               optional opt(in_place, 2);
      @@ -65,4 +65,10 @@ int main()
               assert(std::move(opt).value_or(Y(3)) == 4);
               assert(!opt);
           }
      +    return 0;
      +}
      +
      +int main()
      +{
      +    static_assert(test() == 0);
       }
      
      Added: vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/implicit_deduction_guides.pass.cpp
      ==============================================================================
      --- /dev/null	00:00:00 1970	(empty, because file is newly added)
      +++ vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/implicit_deduction_guides.pass.cpp	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -0,0 +1,155 @@
      +//===----------------------------------------------------------------------===//
      +//
      +//                     The LLVM Compiler Infrastructure
      +//
      +// This file is dual licensed under the MIT and the University of Illinois Open
      +// Source Licenses. See LICENSE.TXT for details.
      +//
      +//===----------------------------------------------------------------------===//
      +
      +// UNSUPPORTED: c++98, c++03, c++11, c++14
      +// UNSUPPORTED: libcpp-no-deduction-guides
      +
      +// GCC's implementation of class template deduction is still immature and runs
      +// into issues with libc++. However GCC accepts this code when compiling
      +// against libstdc++.
      +// XFAIL: gcc
      +
      +// 
      +
      +// Test that the constructors offered by std::basic_string are formulated
      +// so they're compatible with implicit deduction guides.
      +
      +#include 
      +#include 
      +#include 
      +
      +#include "test_macros.h"
      +#include "archetypes.hpp"
      +
      +
      +// Overloads
      +//  using A = Allocator
      +//  using AT = std::allocator_arg_t
      +// ---------------
      +// (1)  tuple(const Types&...) -> tuple
      +// (2)  explicit tuple(const Types&...) -> tuple
      +// (3)  tuple(AT, A const&, Types const&...) -> tuple
      +// (4)  explicit tuple(AT, A const&, Types const&...) -> tuple
      +// (5)  tuple(tuple const& t) -> decltype(t)
      +// (6)  tuple(tuple&& t) -> decltype(t)
      +// (7)  tuple(AT, A const&, tuple const& t) -> decltype(t)
      +// (8)  tuple(AT, A const&, tuple&& t) -> decltype(t)
      +void test_primary_template()
      +{
      +  const std::allocator A;
      +  const auto AT = std::allocator_arg;
      +  { // Testing (1)
      +    int x = 101;
      +    std::tuple t1(42);
      +    ASSERT_SAME_TYPE(decltype(t1), std::tuple);
      +    std::tuple t2(x, 0.0, nullptr);
      +    ASSERT_SAME_TYPE(decltype(t2), std::tuple);
      +  }
      +  { // Testing (2)
      +    using T = ExplicitTestTypes::TestType;
      +    static_assert(!std::is_convertible::value, "");
      +
      +    std::tuple t1(T{});
      +    ASSERT_SAME_TYPE(decltype(t1), std::tuple);
      +
      +    const T v{};
      +    std::tuple t2(T{}, 101l, v);
      +    ASSERT_SAME_TYPE(decltype(t2), std::tuple);
      +  }
      +  { // Testing (3)
      +    int x = 101;
      +    std::tuple t1(AT, A, 42);
      +    ASSERT_SAME_TYPE(decltype(t1), std::tuple);
      +
      +    std::tuple t2(AT, A, 42, 0.0, x);
      +    ASSERT_SAME_TYPE(decltype(t2), std::tuple);
      +  }
      +  { // Testing (4)
      +    using T = ExplicitTestTypes::TestType;
      +    static_assert(!std::is_convertible::value, "");
      +
      +    std::tuple t1(AT, A, T{});
      +    ASSERT_SAME_TYPE(decltype(t1), std::tuple);
      +
      +    const T v{};
      +    std::tuple t2(AT, A, T{}, 101l, v);
      +    ASSERT_SAME_TYPE(decltype(t2), std::tuple);
      +  }
      +  { // Testing (5)
      +    using Tup = std::tuple;
      +    const Tup t(42, nullptr);
      +
      +    std::tuple t1(t);
      +    ASSERT_SAME_TYPE(decltype(t1), Tup);
      +  }
      +  { // Testing (6)
      +    using Tup = std::tuple;
      +    std::tuple t1(Tup(nullptr, 42, 'a'));
      +    ASSERT_SAME_TYPE(decltype(t1), Tup);
      +  }
      +  { // Testing (7)
      +    using Tup = std::tuple;
      +    const Tup t(42, nullptr);
      +
      +    std::tuple t1(AT, A, t);
      +    ASSERT_SAME_TYPE(decltype(t1), Tup);
      +  }
      +  { // Testing (8)
      +    using Tup = std::tuple;
      +    std::tuple t1(AT, A, Tup(nullptr, 42, 'a'));
      +    ASSERT_SAME_TYPE(decltype(t1), Tup);
      +  }
      +}
      +
      +// Overloads
      +//  using A = Allocator
      +//  using AT = std::allocator_arg_t
      +// ---------------
      +// (1)  tuple() -> tuple<>
      +// (2)  tuple(AT, A const&) -> tuple<>
      +// (3)  tuple(tuple const&) -> tuple<>
      +// (4)  tuple(tuple&&) -> tuple<>
      +// (5)  tuple(AT, A const&, tuple const&) -> tuple<>
      +// (6)  tuple(AT, A const&, tuple&&) -> tuple<>
      +void test_empty_specialization()
      +{
      +  std::allocator A;
      +  const auto AT = std::allocator_arg;
      +  { // Testing (1)
      +    std::tuple t1{};
      +    ASSERT_SAME_TYPE(decltype(t1), std::tuple<>);
      +  }
      +  { // Testing (2)
      +    std::tuple t1{AT, A};
      +    ASSERT_SAME_TYPE(decltype(t1), std::tuple<>);
      +  }
      +  { // Testing (3)
      +    const std::tuple<> t{};
      +    std::tuple t1(t);
      +    ASSERT_SAME_TYPE(decltype(t1), std::tuple<>);
      +  }
      +  { // Testing (4)
      +    std::tuple t1(std::tuple<>{});
      +    ASSERT_SAME_TYPE(decltype(t1), std::tuple<>);
      +  }
      +  { // Testing (5)
      +    const std::tuple<> t{};
      +    std::tuple t1(AT, A, t);
      +    ASSERT_SAME_TYPE(decltype(t1), std::tuple<>);
      +  }
      +  { // Testing (6)
      +    std::tuple t1(AT, A, std::tuple<>{});
      +    ASSERT_SAME_TYPE(decltype(t1), std::tuple<>);
      +  }
      +}
      +
      +int main() {
      +  test_primary_template();
      +  test_empty_specialization();
      +}
      
      Modified: vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp
      ==============================================================================
      --- vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp	Sat Jun 10 13:44:38 2017	(r319785)
      +++ vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -68,6 +68,28 @@ struct ThrowsCtorT {
         }
       };
       
      +struct MoveCrashes {
      +  int value;
      +  MoveCrashes(int v = 0) noexcept : value{v} {}
      +  MoveCrashes(MoveCrashes &&) noexcept { assert(false); }
      +  MoveCrashes &operator=(MoveCrashes &&) noexcept { assert(false); return *this; }
      +  MoveCrashes &operator=(int v) noexcept {
      +    value = v;
      +    return *this;
      +  }
      +};
      +
      +struct ThrowsCtorTandMove {
      +  int value;
      +  ThrowsCtorTandMove() : value(0) {}
      +  ThrowsCtorTandMove(int) noexcept(false) { throw 42; }
      +  ThrowsCtorTandMove(ThrowsCtorTandMove &&) noexcept(false) { assert(false); }
      +  ThrowsCtorTandMove &operator=(int v) noexcept {
      +    value = v;
      +    return *this;
      +  }
      +};
      +
       struct ThrowsAssignT {
         int value;
         ThrowsAssignT() : value(0) {}
      @@ -126,7 +148,7 @@ void test_T_assignment_sfinae() {
           using V = std::variant;
           static_assert(!std::is_assignable::value, "ambiguous");
         }
      -#endif
      +#endif // TEST_VARIANT_HAS_NO_REFERENCES
       }
       
       void test_T_assignment_basic() {
      @@ -163,7 +185,7 @@ void test_T_assignment_basic() {
           assert(v.index() == 2);
           assert(std::get<2>(v) == 42);
         }
      -#endif
      +#endif // TEST_VARIANT_HAS_NO_REFERENCES
       }
       
       void test_T_assignment_performs_construction() {
      @@ -174,9 +196,11 @@ void test_T_assignment_performs_construction() {
           V v(std::in_place_type, "hello");
           try {
             v = 42;
      +      assert(false);
           } catch (...) { /* ... */
           }
      -    assert(v.valueless_by_exception());
      +    assert(v.index() == 0);
      +    assert(std::get<0>(v) == "hello");
         }
         {
           using V = std::variant;
      @@ -185,7 +209,7 @@ void test_T_assignment_performs_construction() {
           assert(v.index() == 0);
           assert(std::get<0>(v).value == 42);
         }
      -#endif
      +#endif // TEST_HAS_NO_EXCEPTIONS
       }
       
       void test_T_assignment_performs_assignment() {
      @@ -227,7 +251,7 @@ void test_T_assignment_performs_assignment() {
           assert(v.index() == 1);
           assert(std::get<1>(v).value == 100);
         }
      -#endif
      +#endif // TEST_HAS_NO_EXCEPTIONS
       }
       
       int main() {
      
      Modified: vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
      ==============================================================================
      --- vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp	Sat Jun 10 13:44:38 2017	(r319785)
      +++ vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp	Sat Jun 10 13:44:41 2017	(r319786)
      @@ -10,6 +10,10 @@
       
       // UNSUPPORTED: c++98, c++03, c++11, c++14
       
      +// The following compilers don't generate constexpr special members correctly.
      +// XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8
      +// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8.0
      +
       // XFAIL: with_system_cxx_lib=macosx10.12
       // XFAIL: with_system_cxx_lib=macosx10.11
       // XFAIL: with_system_cxx_lib=macosx10.10
      @@ -35,11 +39,6 @@ struct NoCopy {
         NoCopy &operator=(const NoCopy &) = default;
       };
       
      -struct NothrowCopy {
      -  NothrowCopy(const NothrowCopy &) noexcept = default;
      -  NothrowCopy &operator=(const NothrowCopy &) noexcept = default;
      -};
      -
       struct CopyOnly {
         CopyOnly(const CopyOnly &) = default;
         CopyOnly(CopyOnly &&) = delete;
      @@ -73,7 +72,7 @@ struct CopyAssign {
           ++alive;
           ++copy_construct;
         }
      -  CopyAssign(CopyAssign &&o) : value(o.value) {
      +  CopyAssign(CopyAssign &&o) noexcept : value(o.value) {
           o.value = -1;
           ++alive;
           ++move_construct;
      @@ -83,7 +82,7 @@ struct CopyAssign {
           ++copy_assign;
           return *this;
         }
      -  CopyAssign &operator=(CopyAssign &&o) {
      +  CopyAssign &operator=(CopyAssign &&o) noexcept {
           value = o.value;
           o.value = -1;
           ++move_assign;
      @@ -108,6 +107,48 @@ struct CopyDoesThrow {
         CopyDoesThrow &operator=(const CopyDoesThrow &) noexcept(false);
       };
       
      +
      +struct NTCopyAssign {
      +  constexpr NTCopyAssign(int v) : value(v) {}
      +  NTCopyAssign(const NTCopyAssign &) = default;
      +  NTCopyAssign(NTCopyAssign &&) = default;
      +  NTCopyAssign &operator=(const NTCopyAssign &that) {
      +    value = that.value;
      +    return *this;
      +  };
      +  NTCopyAssign &operator=(NTCopyAssign &&) = delete;
      +  int value;
      +};
      +
      +static_assert(!std::is_trivially_copy_assignable::value, "");
      +static_assert(std::is_copy_assignable::value, "");
      +
      +struct TCopyAssign {
      +  constexpr TCopyAssign(int v) : value(v) {}
      +  TCopyAssign(const TCopyAssign &) = default;
      +  TCopyAssign(TCopyAssign &&) = default;
      +  TCopyAssign &operator=(const TCopyAssign &) = default;
      
      *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
      
      From owner-svn-src-vendor@freebsd.org  Sat Jun 10 13:44:48 2017
      Return-Path: 
      Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org
      Received: from mx1.freebsd.org (mx1.freebsd.org
       [IPv6:2001:1900:2254:206a::19:1])
       by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4415FB95506;
       Sat, 10 Jun 2017 13:44:48 +0000 (UTC) (envelope-from dim@FreeBSD.org)
      Received: from repo.freebsd.org (repo.freebsd.org
       [IPv6:2610:1c1:1:6068::e6a:0])
       (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
       (Client did not present a certificate)
       by mx1.freebsd.org (Postfix) with ESMTPS id F0C1C78AC3;
       Sat, 10 Jun 2017 13:44:47 +0000 (UTC) (envelope-from dim@FreeBSD.org)
      Received: from repo.freebsd.org ([127.0.1.37])
       by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ADilfD095004;
       Sat, 10 Jun 2017 13:44:47 GMT (envelope-from dim@FreeBSD.org)
      Received: (from dim@localhost)
       by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ADil2X095003;
       Sat, 10 Jun 2017 13:44:47 GMT (envelope-from dim@FreeBSD.org)
      Message-Id: <201706101344.v5ADil2X095003@repo.freebsd.org>
      X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
       using -f
      From: Dimitry Andric 
      Date: Sat, 10 Jun 2017 13:44:47 +0000 (UTC)
      To: src-committers@freebsd.org, svn-src-all@freebsd.org,
       svn-src-vendor@freebsd.org
      Subject: svn commit: r319787 - vendor/libc++/libc++-trunk-r305145
      X-SVN-Group: vendor
      MIME-Version: 1.0
      Content-Type: text/plain; charset=UTF-8
      Content-Transfer-Encoding: 8bit
      X-BeenThere: svn-src-vendor@freebsd.org
      X-Mailman-Version: 2.1.23
      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: Sat, 10 Jun 2017 13:44:48 -0000
      
      Author: dim
      Date: Sat Jun 10 13:44:46 2017
      New Revision: 319787
      URL: https://svnweb.freebsd.org/changeset/base/319787
      
      Log:
        Tag libc++ trunk r305145.
      
      Added:
        vendor/libc++/libc++-trunk-r305145/
           - copied from r319786, vendor/libc++/dist/
      
      From owner-svn-src-vendor@freebsd.org  Sat Jun 10 13:44:53 2017
      Return-Path: 
      Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org
      Received: from mx1.freebsd.org (mx1.freebsd.org
       [IPv6:2001:1900:2254:206a::19:1])
       by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D694B9557D;
       Sat, 10 Jun 2017 13:44:53 +0000 (UTC) (envelope-from dim@FreeBSD.org)
      Received: from repo.freebsd.org (repo.freebsd.org
       [IPv6:2610:1c1:1:6068::e6a:0])
       (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
       (Client did not present a certificate)
       by mx1.freebsd.org (Postfix) with ESMTPS id B78E378B53;
       Sat, 10 Jun 2017 13:44:52 +0000 (UTC) (envelope-from dim@FreeBSD.org)
      Received: from repo.freebsd.org ([127.0.1.37])
       by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ADipKg095074;
       Sat, 10 Jun 2017 13:44:51 GMT (envelope-from dim@FreeBSD.org)
      Received: (from dim@localhost)
       by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ADinJW095051;
       Sat, 10 Jun 2017 13:44:49 GMT (envelope-from dim@FreeBSD.org)
      Message-Id: <201706101344.v5ADinJW095051@repo.freebsd.org>
      X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
       using -f
      From: Dimitry Andric 
      Date: Sat, 10 Jun 2017 13:44:49 +0000 (UTC)
      To: src-committers@freebsd.org, svn-src-all@freebsd.org,
       svn-src-vendor@freebsd.org
      Subject: svn commit: r319788 - in vendor/lld/dist: COFF ELF include/lld/Core
       include/lld/ReaderWriter lib/Core lib/Driver lib/ReaderWriter
       lib/ReaderWriter/MachO lib/ReaderWriter/YAML test test/COFF test/EL...
      X-SVN-Group: vendor
      MIME-Version: 1.0
      Content-Type: text/plain; charset=UTF-8
      Content-Transfer-Encoding: 8bit
      X-BeenThere: svn-src-vendor@freebsd.org
      X-Mailman-Version: 2.1.23
      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: Sat, 10 Jun 2017 13:44:53 -0000
      
      Author: dim
      Date: Sat Jun 10 13:44:49 2017
      New Revision: 319788
      URL: https://svnweb.freebsd.org/changeset/base/319788
      
      Log:
        Vendor import of lld trunk r305145:
        https://llvm.org/svn/llvm-project/lld/trunk@305145
      
      Added:
        vendor/lld/dist/test/ELF/Inputs/relocatable-comdat-multiple.s   (contents, props changed)
        vendor/lld/dist/test/ELF/arm-thumb-thunk-symbols.s   (contents, props changed)
        vendor/lld/dist/test/ELF/dso_handle.s   (contents, props changed)
        vendor/lld/dist/test/ELF/i386-reloc-large-addend.s   (contents, props changed)
        vendor/lld/dist/test/ELF/i386-reloc-range.s   (contents, props changed)
        vendor/lld/dist/test/ELF/icf-comdat.s   (contents, props changed)
        vendor/lld/dist/test/ELF/linkerscript/emit-relocs-multiple.s   (contents, props changed)
        vendor/lld/dist/test/ELF/linkerscript/noload.s   (contents, props changed)
        vendor/lld/dist/test/ELF/lto/Inputs/defsym-bar.ll
        vendor/lld/dist/test/ELF/lto/Inputs/wrap-bar.ll
        vendor/lld/dist/test/ELF/lto/defsym.ll
        vendor/lld/dist/test/ELF/lto/wrap-1.ll
        vendor/lld/dist/test/ELF/lto/wrap-2.ll
        vendor/lld/dist/test/ELF/mips-npic-call-pic-script.s   (contents, props changed)
        vendor/lld/dist/test/ELF/relocatable-comdat-multiple.s   (contents, props changed)
        vendor/lld/dist/test/ELF/relocatable-compressed-input.s   (contents, props changed)
        vendor/lld/dist/test/ELF/relocatable-empty-archive.s   (contents, props changed)
      Modified:
        vendor/lld/dist/COFF/CMakeLists.txt
        vendor/lld/dist/COFF/Chunks.cpp
        vendor/lld/dist/COFF/Driver.cpp
        vendor/lld/dist/COFF/InputFiles.cpp
        vendor/lld/dist/ELF/CMakeLists.txt
        vendor/lld/dist/ELF/Config.h
        vendor/lld/dist/ELF/Driver.cpp
        vendor/lld/dist/ELF/EhFrame.cpp
        vendor/lld/dist/ELF/GdbIndex.h
        vendor/lld/dist/ELF/ICF.cpp
        vendor/lld/dist/ELF/InputFiles.cpp
        vendor/lld/dist/ELF/InputSection.cpp
        vendor/lld/dist/ELF/InputSection.h
        vendor/lld/dist/ELF/LTO.cpp
        vendor/lld/dist/ELF/LinkerScript.cpp
        vendor/lld/dist/ELF/LinkerScript.h
        vendor/lld/dist/ELF/Mips.cpp
        vendor/lld/dist/ELF/OutputSections.cpp
        vendor/lld/dist/ELF/OutputSections.h
        vendor/lld/dist/ELF/Relocations.cpp
        vendor/lld/dist/ELF/Relocations.h
        vendor/lld/dist/ELF/ScriptParser.cpp
        vendor/lld/dist/ELF/SymbolTable.cpp
        vendor/lld/dist/ELF/SymbolTable.h
        vendor/lld/dist/ELF/Symbols.cpp
        vendor/lld/dist/ELF/SyntheticSections.cpp
        vendor/lld/dist/ELF/SyntheticSections.h
        vendor/lld/dist/ELF/Target.cpp
        vendor/lld/dist/ELF/Thunks.cpp
        vendor/lld/dist/ELF/Writer.cpp
        vendor/lld/dist/include/lld/Core/Reader.h
        vendor/lld/dist/include/lld/ReaderWriter/MachOLinkingContext.h
        vendor/lld/dist/lib/Core/CMakeLists.txt
        vendor/lld/dist/lib/Core/Reader.cpp
        vendor/lld/dist/lib/Core/SymbolTable.cpp
        vendor/lld/dist/lib/Driver/DarwinLdDriver.cpp
        vendor/lld/dist/lib/ReaderWriter/FileArchive.cpp
        vendor/lld/dist/lib/ReaderWriter/MachO/ExecutableAtoms.h
        vendor/lld/dist/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
        vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFile.h
        vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
        vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
        vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
        vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
        vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
        vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
        vendor/lld/dist/lib/ReaderWriter/MachO/WriterMachO.cpp
        vendor/lld/dist/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
        vendor/lld/dist/test/CMakeLists.txt
        vendor/lld/dist/test/COFF/pdb-none.test
        vendor/lld/dist/test/COFF/pdb.test
        vendor/lld/dist/test/ELF/aarch64-undefined-weak.s
        vendor/lld/dist/test/ELF/amdgpu-globals.s
        vendor/lld/dist/test/ELF/amdgpu-kernels.s
        vendor/lld/dist/test/ELF/arm-icf-exidx.s
        vendor/lld/dist/test/ELF/arm-thumb-no-undefined-thunk.s
        vendor/lld/dist/test/ELF/arm-thumb-undefined-weak.s
        vendor/lld/dist/test/ELF/arm-undefined-weak.s
        vendor/lld/dist/test/ELF/ehdr_start.s
        vendor/lld/dist/test/ELF/emit-relocs-merge.s
        vendor/lld/dist/test/ELF/gdb-index-empty.s
        vendor/lld/dist/test/ELF/linkerscript/early-assign-symbol.s
        vendor/lld/dist/test/ELF/linkerscript/expr-invalid-sec.s
        vendor/lld/dist/unittests/DriverTests/DarwinLdDriverTest.cpp
        vendor/lld/dist/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
        vendor/lld/dist/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
        vendor/lld/dist/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp
        vendor/lld/dist/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp
      
      Modified: vendor/lld/dist/COFF/CMakeLists.txt
      ==============================================================================
      --- vendor/lld/dist/COFF/CMakeLists.txt	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/COFF/CMakeLists.txt	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -25,6 +25,7 @@ add_lld_library(lldCOFF
       
         LINK_COMPONENTS
         ${LLVM_TARGETS_TO_BUILD}
      +  BinaryFormat
         BitReader
         Core
         DebugInfoCodeView
      
      Modified: vendor/lld/dist/COFF/Chunks.cpp
      ==============================================================================
      --- vendor/lld/dist/COFF/Chunks.cpp	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/COFF/Chunks.cpp	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -12,8 +12,8 @@
       #include "InputFiles.h"
       #include "Symbols.h"
       #include "llvm/ADT/Twine.h"
      +#include "llvm/BinaryFormat/COFF.h"
       #include "llvm/Object/COFF.h"
      -#include "llvm/Support/COFF.h"
       #include "llvm/Support/Debug.h"
       #include "llvm/Support/Endian.h"
       #include "llvm/Support/raw_ostream.h"
      
      Modified: vendor/lld/dist/COFF/Driver.cpp
      ==============================================================================
      --- vendor/lld/dist/COFF/Driver.cpp	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/COFF/Driver.cpp	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -18,6 +18,7 @@
       #include "lld/Driver/Driver.h"
       #include "llvm/ADT/Optional.h"
       #include "llvm/ADT/StringSwitch.h"
      +#include "llvm/BinaryFormat/Magic.h"
       #include "llvm/Object/ArchiveWriter.h"
       #include "llvm/Object/COFFImportFile.h"
       #include "llvm/Object/COFFModuleDefinition.h"
      @@ -40,8 +41,6 @@ using namespace llvm;
       using namespace llvm::object;
       using namespace llvm::COFF;
       using llvm::sys::Process;
      -using llvm::sys::fs::file_magic;
      -using llvm::sys::fs::identify_magic;
       
       namespace lld {
       namespace coff {
      @@ -457,17 +456,11 @@ static void createImportLibrary() {
       static void parseModuleDefs(StringRef Path) {
         std::unique_ptr MB = check(
           MemoryBuffer::getFile(Path, -1, false, true), "could not open " + Path);
      -  MemoryBufferRef MBRef = MB->getMemBufferRef();
      +  COFFModuleDefinition M =
      +      check(parseCOFFModuleDefinition(MB->getMemBufferRef(), Config->Machine));
       
      -  Expected Def =
      -      parseCOFFModuleDefinition(MBRef, Config->Machine);
      -  if (!Def)
      -    fatal(errorToErrorCode(Def.takeError()).message());
      -
      -  COFFModuleDefinition &M = *Def;
         if (Config->OutputFile.empty())
           Config->OutputFile = Saver.save(M.OutputFile);
      -
         if (M.ImageBase)
           Config->ImageBase = M.ImageBase;
         if (M.StackReserve)
      
      Modified: vendor/lld/dist/COFF/InputFiles.cpp
      ==============================================================================
      --- vendor/lld/dist/COFF/InputFiles.cpp	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/COFF/InputFiles.cpp	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -19,9 +19,9 @@
       #include "llvm/ADT/SmallVector.h"
       #include "llvm/ADT/Triple.h"
       #include "llvm/ADT/Twine.h"
      +#include "llvm/BinaryFormat/COFF.h"
       #include "llvm/Object/Binary.h"
       #include "llvm/Object/COFF.h"
      -#include "llvm/Support/COFF.h"
       #include "llvm/Support/Casting.h"
       #include "llvm/Support/Endian.h"
       #include "llvm/Support/Error.h"
      
      Modified: vendor/lld/dist/ELF/CMakeLists.txt
      ==============================================================================
      --- vendor/lld/dist/ELF/CMakeLists.txt	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/ELF/CMakeLists.txt	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -36,6 +36,7 @@ add_lld_library(lldELF
         LINK_COMPONENTS
         ${LLVM_TARGETS_TO_BUILD}
         Analysis
      +  BinaryFormat
         BitReader
         BitWriter
         Codegen
      
      Modified: vendor/lld/dist/ELF/Config.h
      ==============================================================================
      --- vendor/lld/dist/ELF/Config.h	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/ELF/Config.h	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -13,9 +13,9 @@
       #include "llvm/ADT/MapVector.h"
       #include "llvm/ADT/StringRef.h"
       #include "llvm/ADT/StringSet.h"
      +#include "llvm/BinaryFormat/ELF.h"
       #include "llvm/Support/CachePruning.h"
       #include "llvm/Support/CodeGen.h"
      -#include "llvm/Support/ELF.h"
       #include "llvm/Support/Endian.h"
       
       #include 
      @@ -67,6 +67,12 @@ struct VersionDefinition {
         size_t NameOff = 0; // Offset in the string table
       };
       
      +// Structure for mapping renamed symbols
      +struct RenamedSymbol {
      +  Symbol *Target;
      +  uint8_t OrigBinding;
      +};
      +
       // This struct contains the global configuration for the linker.
       // Most fields are direct mapping from the command line options
       // and such fields have the same name as the corresponding options.
      @@ -98,6 +104,7 @@ struct Configuration {
         std::vector VersionScriptGlobals;
         std::vector VersionScriptLocals;
         std::vector BuildIdVector;
      +  llvm::MapVector RenamedSymbols;
         bool AllowMultipleDefinition;
         bool AsNeeded = false;
         bool Bsymbolic;
      
      Modified: vendor/lld/dist/ELF/Driver.cpp
      ==============================================================================
      --- vendor/lld/dist/ELF/Driver.cpp	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/ELF/Driver.cpp	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -185,7 +185,7 @@ void LinkerDriver::addFile(StringRef Path, bool WithLO
           // is attempting LTO and using a default ar command that doesn't
           // understand the LLVM bitcode file. It is a pretty common error, so
           // we'll handle it as if it had a symbol table.
      -    if (!File->hasSymbolTable()) {
      +    if (!File->isEmpty() && !File->hasSymbolTable()) {
             for (const auto &P : getArchiveMembers(MBRef))
               Files.push_back(make(P.first, Path, P.second));
             return;
      @@ -970,6 +970,14 @@ template  void LinkerDriver::link(opt::Inp
         Symtab.scanShlibUndefined();
         Symtab.scanVersionScript();
       
      +  // Create wrapped symbols for -wrap option.
      +  for (auto *Arg : Args.filtered(OPT_wrap))
      +    Symtab.addSymbolWrap(Arg->getValue());
      +
      +  // Create alias symbols for -defsym option.
      +  for (std::pair &Def : getDefsym(Args))
      +    Symtab.addSymbolAlias(Def.first, Def.second);
      +
         Symtab.addCombinedLTOObject();
         if (ErrorCount)
           return;
      @@ -979,12 +987,8 @@ template  void LinkerDriver::link(opt::Inp
         for (StringRef Sym : Script->Opt.ReferencedSymbols)
           Symtab.addUndefined(Sym);
       
      -  for (auto *Arg : Args.filtered(OPT_wrap))
      -    Symtab.wrap(Arg->getValue());
      -
      -  // Handle --defsym=sym=alias option.
      -  for (std::pair &Def : getDefsym(Args))
      -    Symtab.alias(Def.first, Def.second);
      +  // Apply symbol renames for -wrap and -defsym
      +  Symtab.applySymbolRenames();
       
         // Now that we have a complete list of input files.
         // Beyond this point, no new files are added.
      
      Modified: vendor/lld/dist/ELF/EhFrame.cpp
      ==============================================================================
      --- vendor/lld/dist/ELF/EhFrame.cpp	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/ELF/EhFrame.cpp	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -22,8 +22,8 @@
       #include "Relocations.h"
       #include "Strings.h"
       
      +#include "llvm/BinaryFormat/Dwarf.h"
       #include "llvm/Object/ELF.h"
      -#include "llvm/Support/Dwarf.h"
       #include "llvm/Support/Endian.h"
       
       using namespace llvm;
      
      Modified: vendor/lld/dist/ELF/GdbIndex.h
      ==============================================================================
      --- vendor/lld/dist/ELF/GdbIndex.h	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/ELF/GdbIndex.h	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -24,7 +24,30 @@ struct AddressEntry {
         InputSection *Section;
         uint64_t LowAddress;
         uint64_t HighAddress;
      -  size_t CuIndex;
      +  uint32_t CuIndex;
      +};
      +
      +// Struct represents single entry of compilation units list area of gdb index.
      +// It consist of CU offset in .debug_info section and it's size.
      +struct CompilationUnitEntry {
      +  uint64_t CuOffset;
      +  uint64_t CuLength;
      +};
      +
      +// Represents data about symbol and type names which are used
      +// to build symbol table and constant pool area of gdb index.
      +struct NameTypeEntry {
      +  StringRef Name;
      +  uint8_t Type;
      +};
      +
      +// We fill one GdbIndexDataChunk for each object where scan of
      +// debug information performed. That information futher used
      +// for filling gdb index section areas.
      +struct GdbIndexChunk {
      +  std::vector AddressArea;
      +  std::vector CompilationUnits;
      +  std::vector NamesAndTypes;
       };
       
       // Element of GdbHashTab hash table.
      
      Modified: vendor/lld/dist/ELF/ICF.cpp
      ==============================================================================
      --- vendor/lld/dist/ELF/ICF.cpp	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/ELF/ICF.cpp	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -78,8 +78,8 @@
       #include "SymbolTable.h"
       #include "Threads.h"
       #include "llvm/ADT/Hashing.h"
      +#include "llvm/BinaryFormat/ELF.h"
       #include "llvm/Object/ELF.h"
      -#include "llvm/Support/ELF.h"
       #include 
       #include 
       
      
      Modified: vendor/lld/dist/ELF/InputFiles.cpp
      ==============================================================================
      --- vendor/lld/dist/ELF/InputFiles.cpp	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/ELF/InputFiles.cpp	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -306,21 +306,23 @@ void elf::ObjectFile::initializeSections(
       
           switch (Sec.sh_type) {
           case SHT_GROUP: {
      -      // We discard comdat sections usually. When -r we should not do that. We
      -      // still do deduplication in this case to simplify implementation, because
      -      // otherwise merging group sections together would requre additional
      -      // regeneration of its contents.
      -      bool New = ComdatGroups
      -                     .insert(CachedHashStringRef(
      -                         getShtGroupSignature(ObjSections, Sec)))
      -                     .second;
      -      if (New && Config->Relocatable)
      -        this->Sections[I] = createInputSection(Sec, SectionStringTable);
      -      else
      -        this->Sections[I] = &InputSection::Discarded;
      -      if (New)
      +      // De-duplicate section groups by their signatures.
      +      StringRef Signature = getShtGroupSignature(ObjSections, Sec);
      +      bool IsNew = ComdatGroups.insert(CachedHashStringRef(Signature)).second;
      +      this->Sections[I] = &InputSection::Discarded;
      +
      +      // If it is a new section group, we want to keep group members.
      +      // Group leader sections, which contain indices of group members, are
      +      // discarded because they are useless beyond this point. The only
      +      // exception is the -r option because in order to produce re-linkable
      +      // object files, we want to pass through basically everything.
      +      if (IsNew) {
      +        if (Config->Relocatable)
      +          this->Sections[I] = createInputSection(Sec, SectionStringTable);
               continue;
      +      }
       
      +      // Otherwise, discard group members.
             for (uint32_t SecIndex : getShtGroupEntries(Sec)) {
               if (SecIndex >= Size)
                 fatal(toString(this) +
      
      Modified: vendor/lld/dist/ELF/InputSection.cpp
      ==============================================================================
      --- vendor/lld/dist/ELF/InputSection.cpp	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/ELF/InputSection.cpp	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -20,6 +20,7 @@
       #include "Target.h"
       #include "Thunks.h"
       #include "llvm/Object/Decompressor.h"
      +#include "llvm/Support/Compiler.h"
       #include "llvm/Support/Compression.h"
       #include "llvm/Support/Endian.h"
       #include "llvm/Support/Path.h"
      @@ -72,6 +73,16 @@ InputSectionBase::InputSectionBase(InputFile *File, ui
         this->Alignment = V;
       }
       
      +// Drop SHF_GROUP bit unless we are producing a re-linkable object file.
      +// SHF_GROUP is a marker that a section belongs to some comdat group.
      +// That flag doesn't make sense in an executable.
      +static uint64_t getFlags(uint64_t Flags) {
      +  Flags &= ~(uint64_t)SHF_INFO_LINK;
      +  if (!Config->Relocatable)
      +    Flags &= ~(uint64_t)SHF_GROUP;
      +  return Flags;
      +}
      +
       // GNU assembler 2.24 and LLVM 4.0.0's MC (the newest release as of
       // March 2017) fail to infer section types for sections starting with
       // ".init_array." or ".fini_array.". They set SHT_PROGBITS instead of
      @@ -94,7 +105,7 @@ template 
       InputSectionBase::InputSectionBase(elf::ObjectFile *File,
                                          const typename ELFT::Shdr *Hdr,
                                          StringRef Name, Kind SectionKind)
      -    : InputSectionBase(File, Hdr->sh_flags & ~SHF_INFO_LINK,
      +    : InputSectionBase(File, getFlags(Hdr->sh_flags),
                              getType(Hdr->sh_type, Name), Hdr->sh_entsize,
                              Hdr->sh_link, Hdr->sh_info, Hdr->sh_addralign,
                              getSectionContents(File, Hdr), Name, SectionKind) {
      @@ -308,23 +319,21 @@ OutputSection *InputSection::getParent() const {
         return cast_or_null(Parent);
       }
       
      -void InputSection::copyShtGroup(uint8_t *Buf) {
      -  assert(this->Type == SHT_GROUP);
      +// Copy SHT_GROUP section contents. Used only for the -r option.
      +template  void InputSection::copyShtGroup(uint8_t *Buf) {
      +  // ELFT::Word is the 32-bit integral type in the target endianness.
      +  typedef typename ELFT::Word u32;
      +  ArrayRef From = getDataAs();
      +  auto *To = reinterpret_cast(Buf);
       
      -  ArrayRef From = getDataAs();
      -  uint32_t *To = reinterpret_cast(Buf);
      -
      -  // First entry is a flag word, we leave it unchanged.
      +  // The first entry is not a section number but a flag.
         *To++ = From[0];
       
      -  // Here we adjust indices of sections that belong to group as it
      -  // might change during linking.
      +  // Adjust section numbers because section numbers in an input object
      +  // files are different in the output.
         ArrayRef Sections = this->File->getSections();
      -  for (uint32_t Val : From.slice(1)) {
      -    uint32_t Index = read32(&Val, Config->Endianness);
      -    write32(To++, Sections[Index]->getOutputSection()->SectionIndex,
      -            Config->Endianness);
      -  }
      +  for (uint32_t Idx : From.slice(1))
      +    *To++ = Sections[Idx]->getOutputSection()->SectionIndex;
       }
       
       InputSectionBase *InputSection::getRelocatedSection() {
      @@ -682,7 +691,7 @@ void InputSectionBase::relocateAlloc(uint8_t *Buf, uin
             // Patch a nop (0x60000000) to a ld.
             if (BufLoc + 8 <= BufEnd && read32be(BufLoc + 4) == 0x60000000)
               write32be(BufLoc + 4, 0xe8410028); // ld %r2, 40(%r1)
      -    // fallthrough
      +      LLVM_FALLTHROUGH;
           default:
             Target->relocateOne(BufLoc, Type, TargetVA);
             break;
      @@ -712,10 +721,9 @@ template  void InputSection::writeTo(uint8
           return;
         }
       
      -  // If -r is given, linker should keep SHT_GROUP sections. We should fixup
      -  // them, see copyShtGroup().
      +  // If -r is given, we may have a SHT_GROUP section.
         if (this->Type == SHT_GROUP) {
      -    copyShtGroup(Buf + OutSecOff);
      +    copyShtGroup(Buf + OutSecOff);
           return;
         }
       
      
      Modified: vendor/lld/dist/ELF/InputSection.h
      ==============================================================================
      --- vendor/lld/dist/ELF/InputSection.h	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/ELF/InputSection.h	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -325,7 +325,7 @@ class InputSection : public InputSectionBase { (privat
         template 
         void copyRelocations(uint8_t *Buf, llvm::ArrayRef Rels);
       
      -  void copyShtGroup(uint8_t *Buf);
      +  template  void copyShtGroup(uint8_t *Buf);
       };
       
       // The list of all input sections.
      
      Modified: vendor/lld/dist/ELF/LTO.cpp
      ==============================================================================
      --- vendor/lld/dist/ELF/LTO.cpp	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/ELF/LTO.cpp	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -17,13 +17,13 @@
       #include "llvm/ADT/SmallString.h"
       #include "llvm/ADT/StringRef.h"
       #include "llvm/ADT/Twine.h"
      +#include "llvm/BinaryFormat/ELF.h"
       #include "llvm/IR/DiagnosticPrinter.h"
       #include "llvm/LTO/Caching.h"
       #include "llvm/LTO/Config.h"
       #include "llvm/LTO/LTO.h"
       #include "llvm/Object/SymbolicFile.h"
       #include "llvm/Support/CodeGen.h"
      -#include "llvm/Support/ELF.h"
       #include "llvm/Support/Error.h"
       #include "llvm/Support/FileSystem.h"
       #include "llvm/Support/MemoryBuffer.h"
      @@ -136,6 +136,7 @@ void BitcodeCompiler::add(BitcodeFile &F) {
               Sym->IsUsedInRegularObj || (R.Prevailing && Sym->includeInDynsym());
           if (R.Prevailing)
             undefine(Sym);
      +    R.LinkerRedefined = Config->RenamedSymbols.count(Sym);
         }
         checkError(LTOObj->add(std::move(F.Obj), Resols));
       }
      
      Modified: vendor/lld/dist/ELF/LinkerScript.cpp
      ==============================================================================
      --- vendor/lld/dist/ELF/LinkerScript.cpp	Sat Jun 10 13:44:46 2017	(r319787)
      +++ vendor/lld/dist/ELF/LinkerScript.cpp	Sat Jun 10 13:44:49 2017	(r319788)
      @@ -25,9 +25,9 @@
       #include "Writer.h"
       #include "llvm/ADT/STLExtras.h"
       #include "llvm/ADT/StringRef.h"
      +#include "llvm/BinaryFormat/ELF.h"
       #include "llvm/Support/Casting.h"
       #include "llvm/Support/Compression.h"
      -#include "llvm/Support/ELF.h"
       #include "llvm/Support/Endian.h"
       #include "llvm/Support/ErrorHandling.h"
       #include "llvm/Support/FileSystem.h"
      @@ -54,7 +54,7 @@ uint64_t ExprValue::getValue() const {
         if (Sec) {
           if (OutputSection *OS = Sec->getOutputSection())
             return alignTo(Sec->getOffset(Val) + OS->Addr, Alignment);
      -    error("unable to evaluate expression: input section " + Sec->Name +
      +    error(Loc + ": unable to evaluate expression: input section " + Sec->Name +
                 " has no output section assigned");
         }
         return alignTo(Val, Alignment);
      @@ -431,6 +431,8 @@ void LinkerScript::processCommands(OutputSectionFactor
             if (OutputSection *Sec = Cmd->Sec) {
               assert(Sec->SectionIndex == INT_MAX);
               Sec->SectionIndex = I;
      +        if (Cmd->Noload)
      +          Sec->Type = SHT_NOBITS;
               SecToCommand[Sec] = Cmd;
             }
           }
      @@ -442,7 +444,7 @@ void LinkerScript::fabricateDefaultCommands() {
         std::vector Commands;
       
         // Define start address
      -  uint64_t StartAddr = Config->ImageBase + elf::getHeaderSize();
      +  uint64_t StartAddr = -1;
       
         // The Sections with -T
      have been sorted in order of ascending // address. We must lower StartAddr if the lowest -T
      as @@ -450,8 +452,12 @@ void LinkerScript::fabricateDefaultCommands() { for (auto& KV : Config->SectionStartMap) StartAddr = std::min(StartAddr, KV.second); - Commands.push_back( - make(".", [=] { return StartAddr; }, "")); + Commands.push_back(make( + ".", + [=] { + return std::min(StartAddr, Config->ImageBase + elf::getHeaderSize()); + }, + "")); // For each OutputSection that needs a VA fabricate an OutputSectionCommand // with an InputSectionDescription describing the InputSections @@ -870,51 +876,6 @@ void LinkerScript::processNonSectionCommands() { } } -// Do a last effort at synchronizing the linker script "AST" and the section -// list. This is needed to account for last minute changes, like adding a -// .ARM.exidx terminator and sorting SHF_LINK_ORDER sections. -// -// FIXME: We should instead create the "AST" earlier and the above changes would -// be done directly in the "AST". -// -// This can only handle new sections being added and sections being reordered. -void LinkerScript::synchronize() { - for (BaseCommand *Base : Opt.Commands) { - auto *Cmd = dyn_cast(Base); - if (!Cmd) - continue; - ArrayRef Sections = Cmd->Sec->Sections; - std::vector ScriptSections; - DenseSet ScriptSectionsSet; - for (BaseCommand *Base : Cmd->Commands) { - auto *ISD = dyn_cast(Base); - if (!ISD) - continue; - for (InputSection *&IS : ISD->Sections) { - if (IS->Live) { - ScriptSections.push_back(&IS); - ScriptSectionsSet.insert(IS); - } - } - } - std::vector Missing; - for (InputSection *IS : Sections) - if (!ScriptSectionsSet.count(IS)) - Missing.push_back(IS); - if (!Missing.empty()) { - auto ISD = make(""); - ISD->Sections = Missing; - Cmd->Commands.push_back(ISD); - for (InputSection *&IS : ISD->Sections) - if (IS->Live) - ScriptSections.push_back(&IS); - } - assert(ScriptSections.size() == Sections.size()); - for (int I = 0, N = Sections.size(); I < N; ++I) - *ScriptSections[I] = Sections[I]; - } -} - static bool allocateHeaders(std::vector &Phdrs, ArrayRef OutputSectionCommands, @@ -1071,6 +1032,81 @@ static void writeInt(uint8_t *Buf, uint64_t Data, uint llvm_unreachable("unsupported Size argument"); } +static bool compareByFilePosition(InputSection *A, InputSection *B) { + // Synthetic doesn't have link order dependecy, stable_sort will keep it last + if (A->kind() == InputSectionBase::Synthetic || + B->kind() == InputSectionBase::Synthetic) + return false; + InputSection *LA = A->getLinkOrderDep(); + InputSection *LB = B->getLinkOrderDep(); + OutputSection *AOut = LA->getParent(); + OutputSection *BOut = LB->getParent(); + if (AOut != BOut) + return AOut->SectionIndex < BOut->SectionIndex; + return LA->OutSecOff < LB->OutSecOff; +} + +template +static void finalizeShtGroup(OutputSection *OS, + ArrayRef Sections) { + // sh_link field for SHT_GROUP sections should contain the section index of + // the symbol table. + OS->Link = InX::SymTab->getParent()->SectionIndex; + + // sh_info then contain index of an entry in symbol table section which + // provides signature of the section group. + elf::ObjectFile *Obj = Sections[0]->getFile(); + assert(Config->Relocatable && Sections.size() == 1); + ArrayRef Symbols = Obj->getSymbols(); + OS->Info = InX::SymTab->getSymbolIndex(Symbols[Sections[0]->Info - 1]); +} + +template void OutputSectionCommand::finalize() { + // Link order may be distributed across several InputSectionDescriptions + // but sort must consider them all at once. + std::vector ScriptSections; + std::vector Sections; + for (BaseCommand *Base : Commands) + if (auto *ISD = dyn_cast(Base)) + for (InputSection *&IS : ISD->Sections) { + ScriptSections.push_back(&IS); + Sections.push_back(IS); + } + + if ((Sec->Flags & SHF_LINK_ORDER)) { + std::sort(Sections.begin(), Sections.end(), compareByFilePosition); + for (int I = 0, N = Sections.size(); I < N; ++I) + *ScriptSections[I] = Sections[I]; + + // We must preserve the link order dependency of sections with the + // SHF_LINK_ORDER flag. The dependency is indicated by the sh_link field. We + // need to translate the InputSection sh_link to the OutputSection sh_link, + // all InputSections in the OutputSection have the same dependency. + if (auto *D = Sections.front()->getLinkOrderDep()) + Sec->Link = D->getParent()->SectionIndex; + } + + uint32_t Type = Sec->Type; + if (Type == SHT_GROUP) { + finalizeShtGroup(Sec, Sections); + return; + } + + if (!Config->CopyRelocs || (Type != SHT_RELA && Type != SHT_REL)) + return; + + InputSection *First = Sections[0]; + if (isa(First)) + return; + + Sec->Link = InX::SymTab->getParent()->SectionIndex; + // sh_info for SHT_REL[A] sections should contain the section header index of + // the section to which the relocation applies. + InputSectionBase *S = First->getRelocatedSection(); + Sec->Info = S->getOutputSection()->SectionIndex; + Sec->Flags |= SHF_INFO_LINK; +} + // Compress section contents if this section contains debug info. template void OutputSectionCommand::maybeCompress() { typedef typename ELFT::Chdr Elf_Chdr; @@ -1099,6 +1135,9 @@ template void OutputSectionCommand::maybe } template void OutputSectionCommand::writeTo(uint8_t *Buf) { + if (Sec->Type == SHT_NOBITS) + return; + Sec->Loc = Buf; // We may have already rendered compressed content when using @@ -1110,9 +1149,6 @@ template void OutputSectionCommand::write return; } - if (Sec->Type == SHT_NOBITS) - return; - // Write leading padding. std::vector Sections; for (BaseCommand *Cmd : Commands) @@ -1156,12 +1192,12 @@ bool LinkerScript::hasLMA(OutputSection *Sec) { ExprValue LinkerScript::getSymbolValue(const Twine &Loc, StringRef S) { if (S == ".") - return {CurOutSec, Dot - CurOutSec->Addr}; + return {CurOutSec, Dot - CurOutSec->Addr, Loc}; if (SymbolBody *B = findSymbol(S)) { if (auto *D = dyn_cast(B)) - return {D->Section, D->Value}; + return {D->Section, D->Value, Loc}; if (auto *C = dyn_cast(B)) - return {InX::Common, C->Offset}; + return {InX::Common, C->Offset, Loc}; } error(Loc + ": symbol not found: " + S); return 0; @@ -1201,3 +1237,8 @@ template void OutputSectionCommand::maybeCompress(); template void OutputSectionCommand::maybeCompress(); template void OutputSectionCommand::maybeCompress(); + +template void OutputSectionCommand::finalize(); +template void OutputSectionCommand::finalize(); +template void OutputSectionCommand::finalize(); +template void OutputSectionCommand::finalize(); Modified: vendor/lld/dist/ELF/LinkerScript.h ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.h Sat Jun 10 13:44:46 2017 (r319787) +++ vendor/lld/dist/ELF/LinkerScript.h Sat Jun 10 13:44:49 2017 (r319788) @@ -42,15 +42,14 @@ struct ExprValue { uint64_t Val; bool ForceAbsolute; uint64_t Alignment = 1; + std::string Loc; ExprValue(SectionBase *Sec, bool ForceAbsolute, uint64_t Val, - uint64_t Alignment) - : Sec(Sec), Val(Val), ForceAbsolute(ForceAbsolute), Alignment(Alignment) { - } - ExprValue(SectionBase *Sec, bool ForceAbsolute, uint64_t Val) - : Sec(Sec), Val(Val), ForceAbsolute(ForceAbsolute) {} - ExprValue(SectionBase *Sec, uint64_t Val) : ExprValue(Sec, false, Val) {} - ExprValue(uint64_t Val) : ExprValue(nullptr, Val) {} + const Twine &Loc) + : Sec(Sec), Val(Val), ForceAbsolute(ForceAbsolute), Loc(Loc.str()) {} + ExprValue(SectionBase *Sec, uint64_t Val, const Twine &Loc) + : ExprValue(Sec, false, Val, Loc) {} + ExprValue(uint64_t Val) : ExprValue(nullptr, Val, "") {} bool isAbsolute() const { return ForceAbsolute || Sec == nullptr; } uint64_t getValue() const; uint64_t getSecAddr() const; @@ -135,7 +134,9 @@ struct OutputSectionCommand : BaseCommand { ConstraintKind Constraint = ConstraintKind::NoConstraint; std::string Location; std::string MemoryRegionName; + bool Noload = false; + template void finalize(); template void writeTo(uint8_t *Buf); template void maybeCompress(); uint32_t getFiller(); @@ -281,7 +282,6 @@ class LinkerScript final { (public) void assignOffsets(OutputSectionCommand *Cmd); void placeOrphanSections(); void processNonSectionCommands(); - void synchronize(); void assignAddresses(std::vector &Phdrs, ArrayRef OutputSectionCommands); Modified: vendor/lld/dist/ELF/Mips.cpp ============================================================================== --- vendor/lld/dist/ELF/Mips.cpp Sat Jun 10 13:44:46 2017 (r319787) +++ vendor/lld/dist/ELF/Mips.cpp Sat Jun 10 13:44:49 2017 (r319788) @@ -16,8 +16,8 @@ #include "SymbolTable.h" #include "Writer.h" +#include "llvm/BinaryFormat/ELF.h" #include "llvm/Object/ELF.h" -#include "llvm/Support/ELF.h" #include "llvm/Support/MipsABIFlags.h" using namespace llvm; Modified: vendor/lld/dist/ELF/OutputSections.cpp ============================================================================== --- vendor/lld/dist/ELF/OutputSections.cpp Sat Jun 10 13:44:46 2017 (r319787) +++ vendor/lld/dist/ELF/OutputSections.cpp Sat Jun 10 13:44:49 2017 (r319788) @@ -16,7 +16,7 @@ #include "SyntheticSections.h" #include "Target.h" #include "Threads.h" -#include "llvm/Support/Dwarf.h" +#include "llvm/BinaryFormat/Dwarf.h" #include "llvm/Support/MD5.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/SHA1.h" @@ -70,67 +70,6 @@ OutputSection::OutputSection(StringRef Name, uint32_t /*Link*/ 0), SectionIndex(INT_MAX) {} -static bool compareByFilePosition(InputSection *A, InputSection *B) { - // Synthetic doesn't have link order dependecy, stable_sort will keep it last - if (A->kind() == InputSectionBase::Synthetic || - B->kind() == InputSectionBase::Synthetic) - return false; - InputSection *LA = A->getLinkOrderDep(); - InputSection *LB = B->getLinkOrderDep(); - OutputSection *AOut = LA->getParent(); - OutputSection *BOut = LB->getParent(); - if (AOut != BOut) - return AOut->SectionIndex < BOut->SectionIndex; - return LA->OutSecOff < LB->OutSecOff; -} - -template static void finalizeShtGroup(OutputSection *Sec) { - // sh_link field for SHT_GROUP sections should contain the section index of - // the symbol table. - Sec->Link = InX::SymTab->getParent()->SectionIndex; - - // sh_info then contain index of an entry in symbol table section which - // provides signature of the section group. - elf::ObjectFile *Obj = Sec->Sections[0]->getFile(); - assert(Config->Relocatable && Sec->Sections.size() == 1); - ArrayRef Symbols = Obj->getSymbols(); - Sec->Info = InX::SymTab->getSymbolIndex(Symbols[Sec->Sections[0]->Info - 1]); -} - -template void OutputSection::finalize() { - if ((this->Flags & SHF_LINK_ORDER) && !this->Sections.empty()) { - std::sort(Sections.begin(), Sections.end(), compareByFilePosition); - assignOffsets(); - - // We must preserve the link order dependency of sections with the - // SHF_LINK_ORDER flag. The dependency is indicated by the sh_link field. We - // need to translate the InputSection sh_link to the OutputSection sh_link, - // all InputSections in the OutputSection have the same dependency. - if (auto *D = this->Sections.front()->getLinkOrderDep()) - this->Link = D->getParent()->SectionIndex; - } - - uint32_t Type = this->Type; - if (Type == SHT_GROUP) { - finalizeShtGroup(this); - return; - } - - if (!Config->CopyRelocs || (Type != SHT_RELA && Type != SHT_REL)) - return; - - InputSection *First = Sections[0]; - if (isa(First)) - return; - - this->Link = InX::SymTab->getParent()->SectionIndex; - // sh_info for SHT_REL[A] sections should contain the section header index of - // the section to which the relocation applies. - InputSectionBase *S = First->getRelocatedSection(); - Info = S->getOutputSection()->SectionIndex; - Flags |= SHF_INFO_LINK; -} - static uint64_t updateOffset(uint64_t Off, InputSection *S) { Off = alignTo(Off, S->Alignment); S->OutSecOff = Off; @@ -162,9 +101,12 @@ void OutputSection::addSection(InputSection *S) { // This function is called after we sort input sections // and scan relocations to setup sections' offsets. void OutputSection::assignOffsets() { + OutputSectionCommand *Cmd = Script->getCmd(this); uint64_t Off = 0; - for (InputSection *S : Sections) - Off = updateOffset(Off, S); + for (BaseCommand *Base : Cmd->Commands) + if (auto *ISD = dyn_cast(Base)) + for (InputSection *S : ISD->Sections) + Off = updateOffset(Off, S); this->Size = Off; } @@ -333,6 +275,31 @@ void elf::reportDiscarded(InputSectionBase *IS) { void OutputSectionFactory::addInputSec(InputSectionBase *IS, StringRef OutsecName) { + // Sections with the SHT_GROUP attribute reach here only when the - r option + // is given. Such sections define "section groups", and InputFiles.cpp has + // dedup'ed section groups by their signatures. For the -r, we want to pass + // through all SHT_GROUP sections without merging them because merging them + // creates broken section contents. + if (IS->Type == SHT_GROUP) { + OutputSection *Out = nullptr; + addInputSec(IS, OutsecName, Out); + return; + } + + // Imagine .zed : { *(.foo) *(.bar) } script. Both foo and bar may have + // relocation sections .rela.foo and .rela.bar for example. Most tools do + // not allow multiple REL[A] sections for output section. Hence we + // should combine these relocation sections into single output. + // We skip synthetic sections because it can be .rela.dyn/.rela.plt or any + // other REL[A] sections created by linker itself. + if (!isa(IS) && + (IS->Type == SHT_REL || IS->Type == SHT_RELA)) { + auto *Sec = cast(IS); + OutputSection *Out = Sec->getRelocatedSection()->getOutputSection(); + addInputSec(IS, OutsecName, Out->RelocationSection); + return; + } + SectionKey Key = createKey(IS, OutsecName); OutputSection *&Sec = Map[Key]; return addInputSec(IS, OutsecName, Sec); @@ -346,10 +313,6 @@ void OutputSectionFactory::addInputSec(InputSectionBas return; } - uint64_t Flags = IS->Flags; - if (!Config->Relocatable) - Flags &= ~(uint64_t)SHF_GROUP; - if (Sec) { if (getIncompatibleFlags(Sec->Flags) != getIncompatibleFlags(IS->Flags)) error("incompatible section flags for " + Sec->Name + @@ -366,9 +329,9 @@ void OutputSectionFactory::addInputSec(InputSectionBas "\n>>> output section " + Sec->Name + ": " + getELFSectionTypeName(Config->EMachine, Sec->Type)); } - Sec->Flags |= Flags; + Sec->Flags |= IS->Flags; } else { - Sec = make(OutsecName, IS->Type, Flags); + Sec = make(OutsecName, IS->Type, IS->Flags); OutputSections.push_back(Sec); } @@ -405,8 +368,3 @@ template void OutputSection::writeHeaderTo(EL template void OutputSection::writeHeaderTo(ELF32BE::Shdr *Shdr); template void OutputSection::writeHeaderTo(ELF64LE::Shdr *Shdr); template void OutputSection::writeHeaderTo(ELF64BE::Shdr *Shdr); - -template void OutputSection::finalize(); -template void OutputSection::finalize(); -template void OutputSection::finalize(); -template void OutputSection::finalize(); Modified: vendor/lld/dist/ELF/OutputSections.h ============================================================================== --- vendor/lld/dist/ELF/OutputSections.h Sat Jun 10 13:44:46 2017 (r319787) +++ vendor/lld/dist/ELF/OutputSections.h Sat Jun 10 13:44:49 2017 (r319788) @@ -67,6 +67,11 @@ class OutputSection final : public SectionBase { (publ // formula: Off = Off_first + VA - VA_first. OutputSection *FirstInPtLoad = nullptr; + // Pointer to a relocation section for this section. Usually nullptr because + // we consume relocations, but if --emit-relocs is specified (which is rare), + // it may have a non-null value. + OutputSection *RelocationSection = nullptr; + // The following fields correspond to Elf_Shdr members. uint64_t Size = 0; uint64_t Offset = 0; @@ -78,7 +83,6 @@ class OutputSection final : public SectionBase { (publ void sort(std::function Order); void sortInitFini(); void sortCtorsDtors(); - template void finalize(); void assignOffsets(); std::vector Sections; Modified: vendor/lld/dist/ELF/Relocations.cpp ============================================================================== --- vendor/lld/dist/ELF/Relocations.cpp Sat Jun 10 13:44:46 2017 (r319787) +++ vendor/lld/dist/ELF/Relocations.cpp Sat Jun 10 13:44:49 2017 (r319788) @@ -43,6 +43,7 @@ #include "Relocations.h" #include "Config.h" +#include "LinkerScript.h" #include "Memory.h" #include "OutputSections.h" #include "Strings.h" @@ -967,48 +968,51 @@ template void elf::scanRelocations(InputS // in the Sections vector, and recalculate the InputSection output section // offsets. // This may invalidate any output section offsets stored outside of InputSection -void ThunkCreator::mergeThunks(OutputSection *OS, - std::vector &Thunks) { - // Order Thunks in ascending OutSecOff - auto ThunkCmp = [](const ThunkSection *A, const ThunkSection *B) { - return A->OutSecOff < B->OutSecOff; - }; - std::stable_sort(Thunks.begin(), Thunks.end(), ThunkCmp); +void ThunkCreator::mergeThunks() { + for (auto &KV : ThunkSections) { + std::vector *ISR = KV.first; + std::vector &Thunks = KV.second; - // Merge sorted vectors of Thunks and InputSections by OutSecOff - std::vector Tmp; - Tmp.reserve(OS->Sections.size() + Thunks.size()); - auto MergeCmp = [](const InputSection *A, const InputSection *B) { - // std::merge requires a strict weak ordering. - if (A->OutSecOff < B->OutSecOff) - return true; - if (A->OutSecOff == B->OutSecOff) - // Check if Thunk is immediately before any specific Target InputSection - // for example Mips LA25 Thunks. - if (auto *TA = dyn_cast(A)) - if (TA && TA->getTargetInputSection() == B) - return true; - return false; - }; - std::merge(OS->Sections.begin(), OS->Sections.end(), Thunks.begin(), - Thunks.end(), std::back_inserter(Tmp), MergeCmp); - OS->Sections = std::move(Tmp); - OS->assignOffsets(); + // Order Thunks in ascending OutSecOff + auto ThunkCmp = [](const ThunkSection *A, const ThunkSection *B) { + return A->OutSecOff < B->OutSecOff; + }; + std::stable_sort(Thunks.begin(), Thunks.end(), ThunkCmp); + + // Merge sorted vectors of Thunks and InputSections by OutSecOff + std::vector Tmp; + Tmp.reserve(ISR->size() + Thunks.size()); + auto MergeCmp = [](const InputSection *A, const InputSection *B) { + // std::merge requires a strict weak ordering. + if (A->OutSecOff < B->OutSecOff) + return true; + if (A->OutSecOff == B->OutSecOff) + // Check if Thunk is immediately before any specific Target InputSection + // for example Mips LA25 Thunks. + if (auto *TA = dyn_cast(A)) + if (TA && TA->getTargetInputSection() == B) + return true; + return false; + }; + std::merge(ISR->begin(), ISR->end(), Thunks.begin(), Thunks.end(), + std::back_inserter(Tmp), MergeCmp); + *ISR = std::move(Tmp); + } } -ThunkSection *ThunkCreator::getOSThunkSec(ThunkSection *&TS, - OutputSection *OS) { - if (TS == nullptr) { +ThunkSection *ThunkCreator::getOSThunkSec(OutputSection *OS, + std::vector *ISR) { + if (CurTS == nullptr) { uint32_t Off = 0; for (auto *IS : OS->Sections) { Off = IS->OutSecOff + IS->getSize(); if ((IS->Flags & SHF_EXECINSTR) == 0) break; } - TS = make(OS, Off); - ThunkSections[OS].push_back(TS); + CurTS = make(OS, Off); + ThunkSections[ISR].push_back(CurTS); } - return TS; + return CurTS; } ThunkSection *ThunkCreator::getISThunkSec(InputSection *IS, OutputSection *OS) { @@ -1017,7 +1021,21 @@ ThunkSection *ThunkCreator::getISThunkSec(InputSection return TS; auto *TOS = IS->getParent(); TS = make(TOS, IS->OutSecOff); - ThunkSections[TOS].push_back(TS); + + // Find InputSectionRange within TOS that IS is in + OutputSectionCommand *C = Script->getCmd(TOS); + std::vector *Range = nullptr; + for (BaseCommand *BC : C->Commands) + if (auto *ISD = dyn_cast (BC)) { + InputSection *first = ISD->Sections.front(); + InputSection *last = ISD->Sections.back(); + if (IS->OutSecOff >= first->OutSecOff && + IS->OutSecOff <= last->OutSecOff) { + Range = &ISD->Sections; + break; + } + } + ThunkSections[Range].push_back(TS); ThunkedSections[IS] = TS; return TS; } @@ -1030,6 +1048,27 @@ std::pair ThunkCreator::getThunk(Symbol return std::make_pair(res.first->second, res.second); } +// Call Fn on every executable InputSection accessed via the linker script +// InputSectionDescription::Sections. +void ThunkCreator::forEachExecInputSection( + ArrayRef OutputSections, + std::function *, + InputSection *)> + Fn) { + for (OutputSectionCommand *Cmd : OutputSections) { + OutputSection *OS = Cmd->Sec; + if (!(OS->Flags & SHF_ALLOC) || !(OS->Flags & SHF_EXECINSTR)) + continue; + if (OutputSectionCommand *C = Script->getCmd(OS)) + for (BaseCommand *BC : C->Commands) + if (auto *ISD = dyn_cast(BC)) { + CurTS = nullptr; + for (InputSection* IS : ISD->Sections) + Fn(OS, &ISD->Sections, IS); + } + } +} + // Process all relocations from the InputSections that have been assigned // to OutputSections and redirect through Thunks if needed. // @@ -1040,42 +1079,41 @@ std::pair ThunkCreator::getThunk(Symbol // *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jun 10 13:44:56 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EEB0B955A3; Sat, 10 Jun 2017 13:44:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55FD178BBF; Sat, 10 Jun 2017 13:44:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ADitsq095120; Sat, 10 Jun 2017 13:44:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ADit0A095119; Sat, 10 Jun 2017 13:44:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706101344.v5ADit0A095119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 10 Jun 2017 13:44:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319789 - vendor/lld/lld-trunk-r305145 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 10 Jun 2017 13:44:56 -0000 Author: dim Date: Sat Jun 10 13:44:55 2017 New Revision: 319789 URL: https://svnweb.freebsd.org/changeset/base/319789 Log: Tag lld trunk r305145. Added: vendor/lld/lld-trunk-r305145/ - copied from r319788, vendor/lld/dist/ From owner-svn-src-vendor@freebsd.org Sat Jun 10 13:45:04 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD585B9564F; Sat, 10 Jun 2017 13:45:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5924778CA6; Sat, 10 Jun 2017 13:45:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ADj3dk095223; Sat, 10 Jun 2017 13:45:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ADixBK095169; Sat, 10 Jun 2017 13:44:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706101344.v5ADixBK095169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 10 Jun 2017 13:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319790 - in vendor/lldb/dist: include/lldb/Core include/lldb/Target include/lldb/Utility packages/Python/lldbsuite/test/functionalities/unwind/noreturn packages/Python/lldbsuite/test/f... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 10 Jun 2017 13:45:05 -0000 Author: dim Date: Sat Jun 10 13:44:58 2017 New Revision: 319790 URL: https://svnweb.freebsd.org/changeset/base/319790 Log: Vendor import of lldb trunk r305145: https://llvm.org/svn/llvm-project/lldb/trunk@305145 Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/a.s (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/test.core (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/test.out (contents, props changed) vendor/lldb/dist/unittests/tools/ vendor/lldb/dist/unittests/tools/CMakeLists.txt (contents, props changed) vendor/lldb/dist/unittests/tools/lldb-server/ vendor/lldb/dist/unittests/tools/lldb-server/CMakeLists.txt (contents, props changed) vendor/lldb/dist/unittests/tools/lldb-server/inferior/ vendor/lldb/dist/unittests/tools/lldb-server/inferior/thread_inferior.cpp (contents, props changed) vendor/lldb/dist/unittests/tools/lldb-server/tests/ vendor/lldb/dist/unittests/tools/lldb-server/tests/CMakeLists.txt (contents, props changed) vendor/lldb/dist/unittests/tools/lldb-server/tests/MessageObjects.cpp (contents, props changed) vendor/lldb/dist/unittests/tools/lldb-server/tests/MessageObjects.h (contents, props changed) vendor/lldb/dist/unittests/tools/lldb-server/tests/TestClient.cpp (contents, props changed) vendor/lldb/dist/unittests/tools/lldb-server/tests/TestClient.h (contents, props changed) vendor/lldb/dist/unittests/tools/lldb-server/tests/ThreadIdsInJstopinfoTest.cpp (contents, props changed) Modified: vendor/lldb/dist/include/lldb/Core/Address.h vendor/lldb/dist/include/lldb/Core/Section.h vendor/lldb/dist/include/lldb/Core/dwarf.h vendor/lldb/dist/include/lldb/Target/SectionLoadList.h vendor/lldb/dist/include/lldb/Utility/SafeMachO.h vendor/lldb/dist/include/lldb/Utility/TaskPool.h vendor/lldb/dist/include/lldb/Utility/VMRange.h vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/main.c vendor/lldb/dist/source/Commands/CommandObjectRegister.cpp vendor/lldb/dist/source/Core/Address.cpp vendor/lldb/dist/source/Core/ArchSpec.cpp vendor/lldb/dist/source/Core/CMakeLists.txt vendor/lldb/dist/source/Core/Section.cpp vendor/lldb/dist/source/DataFormatters/TypeCategory.cpp vendor/lldb/dist/source/Host/common/Host.cpp vendor/lldb/dist/source/Host/posix/ConnectionFileDescriptorPosix.cpp vendor/lldb/dist/source/Host/posix/ProcessLauncherPosixFork.cpp vendor/lldb/dist/source/Plugins/Language/ObjC/ObjCLanguage.cpp vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp vendor/lldb/dist/source/Plugins/ObjectFile/ELF/CMakeLists.txt vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ELFHeader.h vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp vendor/lldb/dist/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLLDB.cpp vendor/lldb/dist/source/Plugins/Process/elf-core/CMakeLists.txt vendor/lldb/dist/source/Plugins/Process/elf-core/ProcessElfCore.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp vendor/lldb/dist/source/Target/SectionLoadList.cpp vendor/lldb/dist/source/Target/StackFrame.cpp vendor/lldb/dist/source/Utility/CMakeLists.txt vendor/lldb/dist/source/Utility/Status.cpp vendor/lldb/dist/source/Utility/TaskPool.cpp vendor/lldb/dist/source/Utility/VMRange.cpp vendor/lldb/dist/tools/lldb-server/lldb-gdbserver.cpp vendor/lldb/dist/unittests/CMakeLists.txt vendor/lldb/dist/unittests/Core/ArchSpecTest.cpp vendor/lldb/dist/unittests/Core/StructuredDataTest.cpp vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp Modified: vendor/lldb/dist/include/lldb/Core/Address.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Address.h Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/include/lldb/Core/Address.h Sat Jun 10 13:44:58 2017 (r319790) @@ -422,6 +422,10 @@ class Address { (public) /// a section + offset. The Target's SectionLoadList object /// is used to resolve the address. /// + /// @param[in] allow_section_end + /// If true, treat an address pointing to the end of the module as + /// belonging to that module. + /// /// @return /// Returns \b true if the load address was resolved to be /// section/offset, \b false otherwise. It is often ok for an @@ -429,11 +433,13 @@ class Address { (public) /// happens for JIT'ed code, or any load addresses on the stack /// or heap. //------------------------------------------------------------------ - bool SetLoadAddress(lldb::addr_t load_addr, Target *target); + bool SetLoadAddress(lldb::addr_t load_addr, Target *target, + bool allow_section_end = false); bool SetOpcodeLoadAddress( lldb::addr_t load_addr, Target *target, - lldb::AddressClass addr_class = lldb::eAddressClassInvalid); + lldb::AddressClass addr_class = lldb::eAddressClassInvalid, + bool allow_section_end = false); bool SetCallableLoadAddress(lldb::addr_t load_addr, Target *target); Modified: vendor/lldb/dist/include/lldb/Core/Section.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Section.h Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/include/lldb/Core/Section.h Sat Jun 10 13:44:58 2017 (r319790) @@ -143,7 +143,8 @@ class Section : public std::enable_shared_from_this // Get the DWARF constant definitions from llvm -#include "llvm/Support/Dwarf.h" +#include "llvm/BinaryFormat/Dwarf.h" #include "lldb/Core/RangeMap.h" Modified: vendor/lldb/dist/include/lldb/Target/SectionLoadList.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/SectionLoadList.h Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/include/lldb/Target/SectionLoadList.h Sat Jun 10 13:44:58 2017 (r319790) @@ -47,7 +47,8 @@ class SectionLoadList { (public) lldb::addr_t GetSectionLoadAddress(const lldb::SectionSP §ion_sp) const; - bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr) const; + bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr, + bool allow_section_end = false) const; bool SetSectionLoadAddress(const lldb::SectionSP §ion_sp, lldb::addr_t load_addr, Modified: vendor/lldb/dist/include/lldb/Utility/SafeMachO.h ============================================================================== --- vendor/lldb/dist/include/lldb/Utility/SafeMachO.h Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/include/lldb/Utility/SafeMachO.h Sat Jun 10 13:44:58 2017 (r319790) @@ -114,6 +114,6 @@ #undef CPU_SUBTYPE_MC980000_ALL #undef CPU_SUBTYPE_MC98601 -#include "llvm/Support/MachO.h" +#include "llvm/BinaryFormat/MachO.h" #endif // liblldb_SafeMachO_h_ Modified: vendor/lldb/dist/include/lldb/Utility/TaskPool.h ============================================================================== --- vendor/lldb/dist/include/lldb/Utility/TaskPool.h Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/include/lldb/Utility/TaskPool.h Sat Jun 10 13:44:58 2017 (r319790) @@ -10,6 +10,7 @@ #ifndef utility_TaskPool_h_ #define utility_TaskPool_h_ +#include "llvm/ADT/STLExtras.h" #include // for bind, function #include #include @@ -86,6 +87,6 @@ template <> struct TaskPool::RunTaskImpl<> { // 'batch_size' numbers at a time to work on, so for very fast functions, batch // should be large enough to avoid too much cache line contention. void TaskMapOverInt(size_t begin, size_t end, - std::function const &func); + const llvm::function_ref &func); #endif // #ifndef utility_TaskPool_h_ Modified: vendor/lldb/dist/include/lldb/Utility/VMRange.h ============================================================================== --- vendor/lldb/dist/include/lldb/Utility/VMRange.h Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/include/lldb/Utility/VMRange.h Sat Jun 10 13:44:58 2017 (r319790) @@ -111,11 +111,6 @@ class VMRange { (public) static bool ContainsRange(const VMRange::collection &coll, const VMRange &range); - // Returns a valid index into coll when a match is found, else UINT32_MAX - // is returned - static size_t FindRangeIndexThatContainsValue(const VMRange::collection &coll, - lldb::addr_t value); - protected: lldb::addr_t m_base_addr; lldb::addr_t m_byte_size; Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py Sat Jun 10 13:44:58 2017 (r319790) @@ -17,8 +17,8 @@ class NoreturnUnwind(TestBase): mydir = TestBase.compute_mydir(__file__) @skipIfWindows # clang-cl does not support gcc style attributes. - @expectedFailureAndroid(bugnumber="llvm.org/pr31192") - @expectedFailureAll(bugnumber="llvm.org/pr31192", oslist=['linux'], compiler="gcc", archs=['arm']) + # clang does not preserve LR in noreturn functions, making unwinding impossible + @skipIf(compiler="clang", archs=['arm'], oslist=['linux']) def test(self): """Test that we can backtrace correctly with 'noreturn' functions on the stack""" self.build() Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/main.c ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/main.c Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/main.c Sat Jun 10 13:44:58 2017 (r319790) @@ -29,8 +29,6 @@ func_a (void) int main (int argc, char *argv[]) { - sleep (2); - func_a (); return 0; Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py Sat Jun 10 13:44:58 2017 (r319790) @@ -0,0 +1,53 @@ +""" +Test that we properly display the backtrace when a noreturn function happens to +be at the end of the stack. +""" + +from __future__ import print_function + +import shutil +import struct + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestNoreturnModuleEnd(TestBase): + NO_DEBUG_INFO_TESTCASE = True + mydir = TestBase.compute_mydir(__file__) + + def setUp(self): + super(TestNoreturnModuleEnd, self).setUp() + self._initial_platform = lldb.DBG.GetSelectedPlatform() + + def tearDown(self): + lldb.DBG.SetSelectedPlatform(self._initial_platform) + super(TestNoreturnModuleEnd, self).tearDown() + + def test(self): + target = self.dbg.CreateTarget("test.out") + process = target.LoadCore("test.core") + self.assertTrue(process.IsValid(), PROCESS_IS_VALID) + self.assertEqual(process.GetNumThreads(), 1) + + thread = process.GetSelectedThread() + self.assertTrue(thread.IsValid()) + + backtrace = [ + ["func2", 3], + ["func1", 8], + ["_start", 8], + ] + self.assertEqual(thread.GetNumFrames(), len(backtrace)) + for i in range(len(backtrace)): + frame = thread.GetFrameAtIndex(i) + self.assertTrue(frame.IsValid()) + symbol = frame.GetSymbol() + self.assertTrue(symbol.IsValid()) + self.assertEqual(symbol.GetName(), backtrace[i][0]) + function_start = symbol.GetStartAddress().GetLoadAddress(target) + self.assertEquals(function_start + backtrace[i][1], frame.GetPC()) + + self.dbg.DeleteTarget(target) Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/a.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/a.s Sat Jun 10 13:44:58 2017 (r319790) @@ -0,0 +1,35 @@ +# compile this with: +# as a.s -o a.o --32 && ld a.o -m elf_i386 +# generate core file with: +# ulimit -s 12 && ./a.out + +.text + +.globl func2 +.type func2, @function +func2: + pushl %ebp + movl %esp, %ebp + movl 0, %eax + popl %ebp + ret +.size func2, .-func2 + +.globl _start +.type _start, @function +_start: + pushl %ebp + movl %esp, %ebp + call func1 + popl %ebp + ret +.size _start, .-_start + +.globl func1 +.type func1, @function +func1: + pushl %ebp + movl %esp, %ebp + call func2 +.size func1, .-func1 + Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/test.core ============================================================================== Binary file. No diff available. Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/test.out ============================================================================== Binary file. No diff available. Modified: vendor/lldb/dist/source/Commands/CommandObjectRegister.cpp ============================================================================== --- vendor/lldb/dist/source/Commands/CommandObjectRegister.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Commands/CommandObjectRegister.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -7,12 +7,6 @@ // //===----------------------------------------------------------------------===// -// C Includes -// C++ Includes -// Other libraries and framework includes -#include "llvm/ADT/STLExtras.h" - -// Project includes #include "CommandObjectRegister.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/RegisterValue.h" @@ -32,6 +26,7 @@ #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/DataExtractor.h" +#include "llvm/Support/Errno.h" using namespace lldb; using namespace lldb_private; @@ -178,8 +173,8 @@ class CommandObjectRegisterRead : public CommandObject if (set_idx < reg_ctx->GetRegisterSetCount()) { if (!DumpRegisterSet(m_exe_ctx, strm, reg_ctx, set_idx)) { if (errno) - result.AppendErrorWithFormat("register read failed: %s\n", - strerror(errno)); + result.AppendErrorWithFormatv("register read failed: {0}\n", + llvm::sys::StrError()); else result.AppendError("unknown error while reading registers.\n"); result.SetStatus(eReturnStatusFailed); Modified: vendor/lldb/dist/source/Core/Address.cpp ============================================================================== --- vendor/lldb/dist/source/Core/Address.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Core/Address.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -361,8 +361,9 @@ addr_t Address::GetOpcodeLoadAddress(Target *target, } bool Address::SetOpcodeLoadAddress(lldb::addr_t load_addr, Target *target, - AddressClass addr_class) { - if (SetLoadAddress(load_addr, target)) { + AddressClass addr_class, + bool allow_section_end) { + if (SetLoadAddress(load_addr, target, allow_section_end)) { if (target) { if (addr_class == eAddressClassInvalid) addr_class = GetAddressClass(); @@ -1001,9 +1002,10 @@ AddressClass Address::GetAddressClass() const { return eAddressClassUnknown; } -bool Address::SetLoadAddress(lldb::addr_t load_addr, Target *target) { - if (target && - target->GetSectionLoadList().ResolveLoadAddress(load_addr, *this)) +bool Address::SetLoadAddress(lldb::addr_t load_addr, Target *target, + bool allow_section_end) { + if (target && target->GetSectionLoadList().ResolveLoadAddress( + load_addr, *this, allow_section_end)) return true; m_section_wp.reset(); m_offset = load_addr; Modified: vendor/lldb/dist/source/Core/ArchSpec.cpp ============================================================================== --- vendor/lldb/dist/source/Core/ArchSpec.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Core/ArchSpec.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -24,11 +24,11 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Twine.h" // for Twine -#include "llvm/Support/COFF.h" -#include "llvm/Support/Compiler.h" // for LLVM_FALLTHROUGH -#include "llvm/Support/ELF.h" +#include "llvm/BinaryFormat/COFF.h" +#include "llvm/BinaryFormat/ELF.h" +#include "llvm/BinaryFormat/MachO.h" // for CPUType::CPU_T... +#include "llvm/Support/Compiler.h" // for LLVM_FALLTHROUGH #include "llvm/Support/Host.h" -#include "llvm/Support/MachO.h" // for CPUType::CPU_T... #include // for shared_ptr #include Modified: vendor/lldb/dist/source/Core/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/source/Core/CMakeLists.txt Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Core/CMakeLists.txt Sat Jun 10 13:44:58 2017 (r319790) @@ -67,6 +67,7 @@ add_lldb_library(lldbCore lldbPluginObjectFileJIT LINK_COMPONENTS + BinaryFormat Support Demangle ) Modified: vendor/lldb/dist/source/Core/Section.cpp ============================================================================== --- vendor/lldb/dist/source/Core/Section.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Core/Section.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -220,18 +220,18 @@ addr_t Section::GetLoadBaseAddress(Target *target) con return load_base_addr; } -bool Section::ResolveContainedAddress(addr_t offset, Address &so_addr) const { +bool Section::ResolveContainedAddress(addr_t offset, Address &so_addr, + bool allow_section_end) const { const size_t num_children = m_children.GetSize(); - if (num_children > 0) { - for (size_t i = 0; i < num_children; i++) { - Section *child_section = m_children.GetSectionAtIndex(i).get(); + for (size_t i = 0; i < num_children; i++) { + Section *child_section = m_children.GetSectionAtIndex(i).get(); - addr_t child_offset = child_section->GetOffset(); - if (child_offset <= offset && - offset - child_offset < child_section->GetByteSize()) - return child_section->ResolveContainedAddress(offset - child_offset, - so_addr); - } + addr_t child_offset = child_section->GetOffset(); + if (child_offset <= offset && + offset - child_offset < + child_section->GetByteSize() + (allow_section_end ? 1 : 0)) + return child_section->ResolveContainedAddress(offset - child_offset, + so_addr, allow_section_end); } so_addr.SetOffset(offset); so_addr.SetSection(const_cast
      (this)->shared_from_this()); Modified: vendor/lldb/dist/source/DataFormatters/TypeCategory.cpp ============================================================================== --- vendor/lldb/dist/source/DataFormatters/TypeCategory.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/DataFormatters/TypeCategory.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -36,23 +36,8 @@ TypeCategoryImpl::TypeCategoryImpl( static bool IsApplicable(lldb::LanguageType category_lang, lldb::LanguageType valobj_lang) { switch (category_lang) { - // these are not languages that LLDB would ordinarily deal with - // only allow an exact equality here, since we really don't know - // any better - case eLanguageTypeAda83: - case eLanguageTypeCobol74: - case eLanguageTypeCobol85: - case eLanguageTypeFortran77: - case eLanguageTypeFortran90: - case eLanguageTypePascal83: - case eLanguageTypeModula2: - case eLanguageTypeJava: - case eLanguageTypeAda95: - case eLanguageTypeFortran95: - case eLanguageTypePLI: - case eLanguageTypeUPC: - case eLanguageTypeD: - case eLanguageTypePython: + // Unless we know better, allow only exact equality. + default: return category_lang == valobj_lang; // the C family, we consider it as one @@ -80,7 +65,7 @@ static bool IsApplicable(lldb::LanguageType category_l valobj_lang == eLanguageTypeC_plus_plus || valobj_lang == eLanguageTypeObjC; - default: + // Categories with unspecified language match everything. case eLanguageTypeUnknown: return true; } Modified: vendor/lldb/dist/source/Host/common/Host.cpp ============================================================================== --- vendor/lldb/dist/source/Host/common/Host.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Host/common/Host.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -68,6 +68,7 @@ #include "lldb/Utility/Status.h" #include "lldb/lldb-private-forward.h" #include "llvm/ADT/SmallString.h" +#include "llvm/Support/Errno.h" #include "llvm/Support/FileSystem.h" #if defined(_WIN32) @@ -217,10 +218,9 @@ static thread_result_t MonitorChildProcessThreadFuncti if (errno == EINTR) continue; else { - if (log) - log->Printf( - "%s (arg = %p) thread exiting because waitpid failed (%s)...", - __FUNCTION__, arg, strerror(errno)); + LLDB_LOG(log, + "arg = {0}, thread exiting because waitpid failed ({1})...", + arg, llvm::sys::StrError()); break; } } else if (wait_pid > 0) { Modified: vendor/lldb/dist/source/Host/posix/ConnectionFileDescriptorPosix.cpp ============================================================================== --- vendor/lldb/dist/source/Host/posix/ConnectionFileDescriptorPosix.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Host/posix/ConnectionFileDescriptorPosix.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -36,6 +36,7 @@ #include // Other libraries and framework includes +#include "llvm/Support/Errno.h" #include "llvm/Support/ErrorHandling.h" #if defined(__APPLE__) #include "llvm/ADT/SmallVector.h" @@ -461,10 +462,8 @@ size_t ConnectionFileDescriptor::Read(void *dst, size_ return 0; default: - if (log) - log->Printf( - "%p ConnectionFileDescriptor::Read (), unexpected error: %s", - static_cast(this), strerror(error_value)); + LLDB_LOG(log, "this = {0}, unexpected error: {1}", this, + llvm::sys::StrError(error_value)); status = eConnectionStatusError; break; // Break to close.... } Modified: vendor/lldb/dist/source/Host/posix/ProcessLauncherPosixFork.cpp ============================================================================== --- vendor/lldb/dist/source/Host/posix/ProcessLauncherPosixFork.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Host/posix/ProcessLauncherPosixFork.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -14,6 +14,7 @@ #include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Log.h" +#include "llvm/Support/Errno.h" #include #include @@ -204,8 +205,8 @@ ProcessLauncherPosixFork::LaunchProcess(const ProcessL ::pid_t pid = ::fork(); if (pid == -1) { // Fork failed - error.SetErrorStringWithFormat("Fork failed with error message: %s", - strerror(errno)); + error.SetErrorStringWithFormatv("Fork failed with error message: {0}", + llvm::sys::StrError()); return HostProcess(LLDB_INVALID_PROCESS_ID); } if (pid == 0) { Modified: vendor/lldb/dist/source/Plugins/Language/ObjC/ObjCLanguage.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Language/ObjC/ObjCLanguage.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/Language/ObjC/ObjCLanguage.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -95,7 +95,7 @@ bool ObjCLanguage::MethodName::SetName(llvm::StringRef // or '-' can be omitted bool valid_prefix = false; - if (name[0] == '+' || name[0] == '-') { + if (name.size() > 1 && (name[0] == '+' || name[0] == '-')) { valid_prefix = name[1] == '['; if (name[0] == '+') m_type = eTypeClassMethod; Modified: vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -171,6 +171,7 @@ UtilityFunction *AppleObjCRuntimeV1::CreateObjectCheck " \n", name); assert(strformatsize < (int)sizeof(buf->contents)); + (void)strformatsize; Status error; return GetTargetRef().GetUtilityFunctionForLanguage( Modified: vendor/lldb/dist/source/Plugins/ObjectFile/ELF/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/source/Plugins/ObjectFile/ELF/CMakeLists.txt Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/ObjectFile/ELF/CMakeLists.txt Sat Jun 10 13:44:58 2017 (r319790) @@ -8,5 +8,6 @@ add_lldb_library(lldbPluginObjectFileELF PLUGIN lldbSymbol lldbTarget LINK_COMPONENTS + BinaryFormat Support ) Modified: vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ELFHeader.h ============================================================================== --- vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ELFHeader.h Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ELFHeader.h Sat Jun 10 13:44:58 2017 (r319790) @@ -21,7 +21,7 @@ #ifndef liblldb_ELFHeader_h_ #define liblldb_ELFHeader_h_ -#include "llvm/Support/ELF.h" +#include "llvm/BinaryFormat/ELF.h" #include "lldb/lldb-enumerations.h" #include "lldb/lldb-types.h" Modified: vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt Sat Jun 10 13:44:58 2017 (r319790) @@ -8,5 +8,6 @@ add_lldb_library(lldbPluginObjectFilePECOFF PLUGIN lldbSymbol lldbTarget LINK_COMPONENTS + BinaryFormat Support ) Modified: vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -10,7 +10,7 @@ #include "ObjectFilePECOFF.h" #include "WindowsMiniDump.h" -#include "llvm/Support/COFF.h" +#include "llvm/BinaryFormat/COFF.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/FileSpecList.h" Modified: vendor/lldb/dist/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -35,6 +35,7 @@ #include "lldb/Utility/Log.h" #include "lldb/Utility/Status.h" #include "lldb/Utility/StreamString.h" +#include "llvm/Support/Errno.h" #include "CFBundle.h" #include "CFString.h" @@ -319,13 +320,12 @@ static Status PosixSpawnChildForPTraceDebugging(const ::posix_spawnattr_setsigdefault(&attr, &all_signals); if ((error_code = ::posix_spawnattr_setflags(&attr, flags)) != 0) { - if (log) - log->Printf("::posix_spawnattr_setflags(&attr, " - "POSIX_SPAWN_START_SUSPENDED%s) failed: %s", - flags & _POSIX_SPAWN_DISABLE_ASLR - ? " | _POSIX_SPAWN_DISABLE_ASLR" - : "", - strerror(error_code)); + LLDB_LOG(log, + "::posix_spawnattr_setflags(&attr, " + "POSIX_SPAWN_START_SUSPENDED{0}) failed: {1}", + flags & _POSIX_SPAWN_DISABLE_ASLR ? " | _POSIX_SPAWN_DISABLE_ASLR" + : "", + llvm::sys::StrError(error_code)); error.SetError(error_code, eErrorTypePOSIX); return error; } @@ -341,10 +341,10 @@ static Status PosixSpawnChildForPTraceDebugging(const error_code = ::posix_spawnattr_setbinpref_np(&attr, 1, &desired_cpu_type, &ocount); if (error_code != 0) { - if (log) - log->Printf("::posix_spawnattr_setbinpref_np(&attr, 1, " - "cpu_type = 0x%8.8x, count => %llu): %s", - desired_cpu_type, (uint64_t)ocount, strerror(error_code)); + LLDB_LOG(log, + "::posix_spawnattr_setbinpref_np(&attr, 1, " + "cpu_type = {0:x8}, count => {1}): {2}", + desired_cpu_type, ocount, llvm::sys::StrError(error_code)); error.SetError(error_code, eErrorTypePOSIX); return error; } @@ -361,10 +361,8 @@ static Status PosixSpawnChildForPTraceDebugging(const posix_spawn_file_actions_t file_actions; if ((error_code = ::posix_spawn_file_actions_init(&file_actions)) != 0) { - if (log) - log->Printf("::posix_spawn_file_actions_init(&file_actions) " - "failed: %s", - strerror(error_code)); + LLDB_LOG(log, "::posix_spawn_file_actions_init(&file_actions) failed: {0}", + llvm::sys::StrError(error_code)); error.SetError(error_code, eErrorTypePOSIX); return error; } @@ -409,11 +407,11 @@ static Status PosixSpawnChildForPTraceDebugging(const error_code = ::posix_spawnp(pid, path, &file_actions, &attr, (char *const *)argv, (char *const *)envp); if (error_code != 0) { - if (log) - log->Printf("::posix_spawnp(pid => %p, path = '%s', file_actions " - "= %p, attr = %p, argv = %p, envp = %p) failed: %s", - pid, path, &file_actions, &attr, argv, envp, - strerror(error_code)); + LLDB_LOG(log, + "::posix_spawnp(pid => {0}, path = '{1}', file_actions " + "= {2}, attr = {3}, argv = {4}, envp = {5}) failed: {6}", + pid, path, &file_actions, &attr, argv, envp, + llvm::sys::StrError(error_code)); error.SetError(error_code, eErrorTypePOSIX); return error; } Modified: vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -30,6 +30,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/UnixSignals.h" #include "lldb/Utility/Status.h" +#include "llvm/Support/Errno.h" #include "FreeBSDThread.h" #include "Plugins/Process/POSIX/CrashReason.h" @@ -529,10 +530,8 @@ void ResumeOperation::Execute(ProcessMonitor *monitor) if (PTRACE(PT_CONTINUE, pid, (caddr_t)1, data)) { Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS)); - - if (log) - log->Printf("ResumeOperation (%" PRIu64 ") failed: %s", pid, - strerror(errno)); + LLDB_LOG(log, "ResumeOperation ({0}) failed: {1}", pid, + llvm::sys::StrError(errno)); m_result = false; } else m_result = true; Modified: vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -43,14 +43,14 @@ #include "lldb/Utility/LLDBAssert.h" #include "lldb/Utility/Status.h" #include "lldb/Utility/StringExtractor.h" +#include "llvm/Support/Errno.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/Threading.h" #include "NativeThreadLinux.h" #include "Plugins/Process/POSIX/ProcessPOSIXLog.h" #include "Procfs.h" -#include "llvm/Support/FileSystem.h" -#include "llvm/Support/Threading.h" - #include #include #include @@ -97,7 +97,7 @@ static bool ProcessVmReadvSupported() { LLDB_LOG(log, "syscall process_vm_readv failed (error: {0}). Fast memory " "reads disabled.", - strerror(errno)); + llvm::sys::StrError()); }); return is_supported; @@ -1988,7 +1988,7 @@ Status NativeProcessLinux::ReadMemory(lldb::addr_t add LLDB_LOG(log, "using process_vm_readv to read {0} bytes from inferior " "address {1:x}: {2}", - size, addr, success ? "Success" : strerror(errno)); + size, addr, success ? "Success" : llvm::sys::StrError(errno)); if (success) return Status(); Modified: vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLLDB.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -329,7 +329,8 @@ void RegisterContextLLDB::InitializeNonZerothFrame() { if (abi) pc = abi->FixCodeAddress(pc); - m_current_pc.SetLoadAddress(pc, &process->GetTarget()); + const bool allow_section_end = true; + m_current_pc.SetLoadAddress(pc, &process->GetTarget(), allow_section_end); // If we don't have a Module for some reason, we're not going to find // symbol/function information - just @@ -477,11 +478,12 @@ void RegisterContextLLDB::InitializeNonZerothFrame() { // Or if we're in the middle of the stack (and not "above" an asynchronous // event like sigtramp), // and our "current" pc is the start of a function... - if (m_sym_ctx_valid && GetNextFrame()->m_frame_type != eTrapHandlerFrame && + if (GetNextFrame()->m_frame_type != eTrapHandlerFrame && GetNextFrame()->m_frame_type != eDebuggerFrame && - addr_range.GetBaseAddress().IsValid() && - addr_range.GetBaseAddress().GetSection() == m_current_pc.GetSection() && - addr_range.GetBaseAddress().GetOffset() == m_current_pc.GetOffset()) { + (!m_sym_ctx_valid || + (addr_range.GetBaseAddress().IsValid() && + addr_range.GetBaseAddress().GetSection() == m_current_pc.GetSection() && + addr_range.GetBaseAddress().GetOffset() == m_current_pc.GetOffset()))) { decr_pc_and_recompute_addr_range = true; } Modified: vendor/lldb/dist/source/Plugins/Process/elf-core/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/elf-core/CMakeLists.txt Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/Process/elf-core/CMakeLists.txt Sat Jun 10 13:44:58 2017 (r319790) @@ -17,5 +17,6 @@ add_lldb_library(lldbPluginProcessElfCore PLUGIN lldbPluginObjectFileELF lldbPluginProcessUtility LINK_COMPONENTS + BinaryFormat Support ) Modified: vendor/lldb/dist/source/Plugins/Process/elf-core/ProcessElfCore.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/elf-core/ProcessElfCore.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/Process/elf-core/ProcessElfCore.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -27,7 +27,7 @@ #include "lldb/Utility/DataBufferLLVM.h" #include "lldb/Utility/Log.h" -#include "llvm/Support/ELF.h" +#include "llvm/BinaryFormat/ELF.h" #include "llvm/Support/Threading.h" #include "Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h" Modified: vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -3732,8 +3732,8 @@ static DWARFDIE GetContainingFunctionWithAbstractOrigi } } } - assert(!"Shouldn't call GetContainingFunctionWithAbstractOrigin on something " - "not in a function"); + assert(0 && "Shouldn't call GetContainingFunctionWithAbstractOrigin on " + "something not in a function"); return DWARFDIE(); } Modified: vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -1958,7 +1958,7 @@ void SymbolFileDWARF::Index() { &function_fullname_index, &function_method_index, &function_selector_index, &objc_class_selectors_index, &global_index, &type_index, - &namespace_index](uint32_t cu_idx) { + &namespace_index](size_t cu_idx) { DWARFCompileUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx); if (dwarf_cu) { dwarf_cu->Index( @@ -1967,10 +1967,9 @@ void SymbolFileDWARF::Index() { objc_class_selectors_index[cu_idx], global_index[cu_idx], type_index[cu_idx], namespace_index[cu_idx]); } - return cu_idx; }; - auto extract_fn = [debug_info, &clear_cu_dies](uint32_t cu_idx) { + auto extract_fn = [debug_info, &clear_cu_dies](size_t cu_idx) { DWARFCompileUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx); if (dwarf_cu) { // dwarf_cu->ExtractDIEsIfNeeded(false) will return zero if the Modified: vendor/lldb/dist/source/Target/SectionLoadList.cpp ============================================================================== --- vendor/lldb/dist/source/Target/SectionLoadList.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Target/SectionLoadList.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -207,8 +207,8 @@ bool SectionLoadList::SetSectionUnloaded(const lldb::S return erased; } -bool SectionLoadList::ResolveLoadAddress(addr_t load_addr, - Address &so_addr) const { +bool SectionLoadList::ResolveLoadAddress(addr_t load_addr, Address &so_addr, + bool allow_section_end) const { // First find the top level section that this load address exists in std::lock_guard guard(m_mutex); if (!m_addr_to_sect.empty()) { @@ -220,10 +220,11 @@ bool SectionLoadList::ResolveLoadAddress(addr_t load_a const addr_t pos_load_addr = pos->first; if (load_addr >= pos_load_addr) { addr_t offset = load_addr - pos_load_addr; - if (offset < pos->second->GetByteSize()) { + if (offset < pos->second->GetByteSize() + (allow_section_end ? 1 : 0)) { // We have found the top level section, now we need to find the // deepest child section. - return pos->second->ResolveContainedAddress(offset, so_addr); + return pos->second->ResolveContainedAddress(offset, so_addr, + allow_section_end); } } } else { @@ -233,10 +234,12 @@ bool SectionLoadList::ResolveLoadAddress(addr_t load_a m_addr_to_sect.rbegin(); if (load_addr >= rpos->first) { addr_t offset = load_addr - rpos->first; - if (offset < rpos->second->GetByteSize()) { + if (offset < + rpos->second->GetByteSize() + (allow_section_end ? 1 : 0)) { // We have found the top level section, now we need to find the // deepest child section. - return rpos->second->ResolveContainedAddress(offset, so_addr); + return rpos->second->ResolveContainedAddress(offset, so_addr, + allow_section_end); } } } Modified: vendor/lldb/dist/source/Target/StackFrame.cpp ============================================================================== --- vendor/lldb/dist/source/Target/StackFrame.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Target/StackFrame.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -191,9 +191,10 @@ const Address &StackFrame::GetFrameCodeAddress() { if (thread_sp) { TargetSP target_sp(thread_sp->CalculateTarget()); if (target_sp) { + const bool allow_section_end = true; if (m_frame_code_addr.SetOpcodeLoadAddress( m_frame_code_addr.GetOffset(), target_sp.get(), - eAddressClassCode)) { + eAddressClassCode, allow_section_end)) { ModuleSP module_sp(m_frame_code_addr.GetModule()); if (module_sp) { m_sc.module_sp = module_sp; Modified: vendor/lldb/dist/source/Utility/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/source/Utility/CMakeLists.txt Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Utility/CMakeLists.txt Sat Jun 10 13:44:58 2017 (r319790) @@ -38,5 +38,6 @@ add_lldb_library(lldbUtility # lldbUtility cannot have any dependencies LINK_COMPONENTS + BinaryFormat Support ) Modified: vendor/lldb/dist/source/Utility/Status.cpp ============================================================================== --- vendor/lldb/dist/source/Utility/Status.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Utility/Status.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -11,10 +11,11 @@ #include "lldb/Utility/Status.h" #include "lldb/Utility/VASPrintf.h" -#include "lldb/lldb-defines.h" // for LLDB_GENERIC_ERROR -#include "lldb/lldb-enumerations.h" // for ErrorType, ErrorType::eErr... -#include "llvm/ADT/SmallString.h" // for SmallString -#include "llvm/ADT/StringRef.h" // for StringRef +#include "lldb/lldb-defines.h" // for LLDB_GENERIC_ERROR +#include "lldb/lldb-enumerations.h" // for ErrorType, ErrorType::eErr... +#include "llvm/ADT/SmallString.h" // for SmallString +#include "llvm/ADT/StringRef.h" // for StringRef +#include "llvm/Support/Errno.h" #include "llvm/Support/FormatProviders.h" // for format_provider #include @@ -27,7 +28,6 @@ #endif #include // for uint32_t -#include // for strerror namespace llvm { class raw_ostream; @@ -121,23 +121,21 @@ const char *Status::AsCString(const char *default_erro return nullptr; if (m_string.empty()) { - const char *s = nullptr; switch (m_type) { case eErrorTypeMachKernel: #if defined(__APPLE__) - s = ::mach_error_string(m_code); + if (const char *s = ::mach_error_string(m_code)) + m_string.assign(s); #endif break; case eErrorTypePOSIX: - s = ::strerror(m_code); + m_string = llvm::sys::StrError(m_code); break; default: break; } - if (s != nullptr) - m_string.assign(s); } if (m_string.empty()) { if (default_error_str) Modified: vendor/lldb/dist/source/Utility/TaskPool.cpp ============================================================================== --- vendor/lldb/dist/source/Utility/TaskPool.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Utility/TaskPool.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -75,7 +75,7 @@ void TaskPoolImpl::Worker(TaskPoolImpl *pool) { } void TaskMapOverInt(size_t begin, size_t end, - std::function const &func) { + const llvm::function_ref &func) { std::atomic idx{begin}; size_t num_workers = std::min(end, std::thread::hardware_concurrency()); Modified: vendor/lldb/dist/source/Utility/VMRange.cpp ============================================================================== --- vendor/lldb/dist/source/Utility/VMRange.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/source/Utility/VMRange.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -25,36 +25,15 @@ using namespace lldb_private; bool VMRange::ContainsValue(const VMRange::collection &coll, lldb::addr_t value) { ValueInRangeUnaryPredicate in_range_predicate(value); - VMRange::const_iterator pos; - VMRange::const_iterator end = coll.end(); - pos = std::find_if(coll.begin(), end, in_range_predicate); - if (pos != end) - return true; - return false; + return llvm::find_if(coll, in_range_predicate) != coll.end(); } bool VMRange::ContainsRange(const VMRange::collection &coll, const VMRange &range) { RangeInRangeUnaryPredicate in_range_predicate(range); - VMRange::const_iterator pos; - VMRange::const_iterator end = coll.end(); - pos = std::find_if(coll.begin(), end, in_range_predicate); - if (pos != end) - return true; - return false; + return llvm::find_if(coll, in_range_predicate) != coll.end(); } -size_t VMRange::FindRangeIndexThatContainsValue(const VMRange::collection &coll, - lldb::addr_t value) { - ValueInRangeUnaryPredicate in_range_predicate(value); - VMRange::const_iterator begin = coll.begin(); - VMRange::const_iterator end = coll.end(); - VMRange::const_iterator pos = std::find_if(begin, end, in_range_predicate); - if (pos != end) - return std::distance(begin, pos); - return UINT32_MAX; -} - void VMRange::Dump(Stream *s, lldb::addr_t offset, uint32_t addr_width) const { s->AddressRange(offset + GetBaseAddress(), offset + GetEndAddress(), addr_width); @@ -66,8 +45,7 @@ bool lldb_private::operator==(const VMRange &lhs, cons } bool lldb_private::operator!=(const VMRange &lhs, const VMRange &rhs) { - return lhs.GetBaseAddress() != rhs.GetBaseAddress() || - lhs.GetEndAddress() != rhs.GetEndAddress(); + return !(lhs == rhs); } bool lldb_private::operator<(const VMRange &lhs, const VMRange &rhs) { @@ -79,25 +57,13 @@ bool lldb_private::operator<(const VMRange &lhs, const } bool lldb_private::operator<=(const VMRange &lhs, const VMRange &rhs) { - if (lhs.GetBaseAddress() < rhs.GetBaseAddress()) - return true; - else if (lhs.GetBaseAddress() > rhs.GetBaseAddress()) - return false; - return lhs.GetEndAddress() <= rhs.GetEndAddress(); + return !(lhs > rhs); } bool lldb_private::operator>(const VMRange &lhs, const VMRange &rhs) { - if (lhs.GetBaseAddress() > rhs.GetBaseAddress()) - return true; - else if (lhs.GetBaseAddress() < rhs.GetBaseAddress()) - return false; - return lhs.GetEndAddress() > rhs.GetEndAddress(); + return rhs < lhs; } bool lldb_private::operator>=(const VMRange &lhs, const VMRange &rhs) { - if (lhs.GetBaseAddress() > rhs.GetBaseAddress()) - return true; - else if (lhs.GetBaseAddress() < rhs.GetBaseAddress()) - return false; - return lhs.GetEndAddress() >= rhs.GetEndAddress(); + return !(lhs < rhs); } Modified: vendor/lldb/dist/tools/lldb-server/lldb-gdbserver.cpp ============================================================================== --- vendor/lldb/dist/tools/lldb-server/lldb-gdbserver.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/tools/lldb-server/lldb-gdbserver.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -21,8 +21,6 @@ // C++ Includes -// Other libraries and framework includes -#include "llvm/ADT/StringRef.h" #include "Acceptor.h" #include "LLDBServerUtilities.h" @@ -36,6 +34,8 @@ #include "lldb/Host/Socket.h" #include "lldb/Host/StringConvert.h" #include "lldb/Utility/Status.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/Errno.h" #ifndef LLGS_PROGRAM_NAME #define LLGS_PROGRAM_NAME "lldb-server" @@ -398,10 +398,9 @@ int main_gdbserver(int argc, char *argv[]) { { const ::pid_t new_sid = setsid(); if (new_sid == -1) { - const char *errno_str = strerror(errno); - fprintf(stderr, "failed to set new session id for %s (%s)\n", - LLGS_PROGRAM_NAME, - errno_str ? errno_str : ""); + llvm::errs() << llvm::formatv( + "failed to set new session id for {0} ({1})\n", LLGS_PROGRAM_NAME, + llvm::sys::StrError()); } } break; Modified: vendor/lldb/dist/unittests/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/unittests/CMakeLists.txt Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/unittests/CMakeLists.txt Sat Jun 10 13:44:58 2017 (r319790) @@ -68,9 +68,10 @@ add_subdirectory(Signals) add_subdirectory(Symbol) add_subdirectory(SymbolFile) add_subdirectory(Target) +add_subdirectory(tools) add_subdirectory(UnwindAssembly) add_subdirectory(Utility) if(LLDB_CAN_USE_DEBUGSERVER) add_subdirectory(debugserver) -endif() \ No newline at end of file +endif() Modified: vendor/lldb/dist/unittests/Core/ArchSpecTest.cpp ============================================================================== --- vendor/lldb/dist/unittests/Core/ArchSpecTest.cpp Sat Jun 10 13:44:55 2017 (r319789) +++ vendor/lldb/dist/unittests/Core/ArchSpecTest.cpp Sat Jun 10 13:44:58 2017 (r319790) @@ -11,7 +11,7 @@ #include "lldb/Core/ArchSpec.h" -#include "llvm/Support/MachO.h" +#include "llvm/BinaryFormat/MachO.h" using namespace lldb; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jun 10 13:45:08 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 705A5B95674; Sat, 10 Jun 2017 13:45:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26A2478CF3; Sat, 10 Jun 2017 13:45:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ADj7vk095272; Sat, 10 Jun 2017 13:45:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ADj7qf095271; Sat, 10 Jun 2017 13:45:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706101345.v5ADj7qf095271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 10 Jun 2017 13:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319791 - vendor/lldb/lldb-trunk-r305145 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 10 Jun 2017 13:45:08 -0000 Author: dim Date: Sat Jun 10 13:45:07 2017 New Revision: 319791 URL: https://svnweb.freebsd.org/changeset/base/319791 Log: Tag lldb trunk r305145. Added: vendor/lldb/lldb-trunk-r305145/ - copied from r319790, vendor/lldb/dist/