From patchwork Thu Apr 27 10:32:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 88184 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp171705vqo; Thu, 27 Apr 2023 03:37:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6sVzTriGP+2PyL95xQnOYNEbXrx1d3grgaCla54TFpWN8G6Y+fdk33VbZc/Qls76QbYISp X-Received: by 2002:aa7:d054:0:b0:501:c839:cf91 with SMTP id n20-20020aa7d054000000b00501c839cf91mr1193173edo.6.1682591851510; Thu, 27 Apr 2023 03:37:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682591851; cv=none; d=google.com; s=arc-20160816; b=AhQYcw0KQEBBvIF5ZwStK98guxlyaJetkU+YAaza0795xL2XfpMHwjKSaz1vz5CuVz Y4TDZJcSVE1CbxwCDrCj+YTDCUnnTxLvBMOR6TI9/LvgwspVGxi9waok7TOLZYhhWAD/ s+sEE0gMDEgplbYEXx/3OQajPqBfp2cXfl5uL5W/+IwJ6AwV6oBUB0KgCfLiYodLhUu/ nAvAMNo+IZi8MiN3yYwrDw+kR22KFoKY18DK9Z8245xiTC+mpVvrCFsJyefXMtbO6/JK zgq527ImqN5mx0tmCswxDdr8YD20eFxpCmPUyAhFyHztIgjuuGIJKoKklAldDownwC9G 0IGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=ao6ds8EhCr79YN2WyGCIvjlO3Jzm0Q8XaNk5lWjKQUs=; b=Toz2B+m7N6PGeAVUSIIOQ6deZw6UIwkPp4AG0/6/tPrGvdF9ibTiKcfS/+vq96GEvV XM8MTbCFI71YFeZGWQ64FhraVLUlrxpATihVo0fx/wXGG4G/qp+Lq6FSZBMvkcEem167 BtL0GdJQNPK/APcnwHt1utFkyuHmxaMtiLy6Nwa/3Ibm05XwxKKScGIx/WDaiNuwOYnf raIgKQ3EzTrzYWfdqxabXJ2yPo+dGga9YCqdKMNcTcSsm4TzGziIWvx1uBjvFJqzo9zp YAJYXov4pKx2bcOJH7OYgaTCjzRz5/M4woBv3+c0TNTraKo5Eypd3Wi70ZA1if8gK3q+ wp6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Wy3Yk4Ua; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id f5-20020aa7d845000000b00508d739f07bsi13120971eds.615.2023.04.27.03.37.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 03:37:31 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Wy3Yk4Ua; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D0A36385702A for ; Thu, 27 Apr 2023 10:34:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0A36385702A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682591649; bh=ao6ds8EhCr79YN2WyGCIvjlO3Jzm0Q8XaNk5lWjKQUs=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Wy3Yk4UalndMHbL6TsG+IpaPw0z6nGCYCXgZi/CdajXZJvrrR24fZtIbgxcxPXH86 4m33WnM8gEvyO3CAv8sK1MC/wr9yVpVTQIkk0vaRzSXkurG3v93q1bnH163vd6zIy/ vt1zp2qQ2AyM631SEhVGO2rcZnWo4KHxMfjGgM60= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id D720738708BD for ; Thu, 27 Apr 2023 10:32:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D720738708BD Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-79-jP6kVIdbMiu5a-0OMdAcOw-1; Thu, 27 Apr 2023 06:32:40 -0400 X-MC-Unique: jP6kVIdbMiu5a-0OMdAcOw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D3F953815EEB; Thu, 27 Apr 2023 10:32:39 +0000 (UTC) Received: from localhost (unknown [10.42.28.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6693C492C13; Thu, 27 Apr 2023 10:32:39 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Reduce Doxygen output for PDF Date: Thu, 27 Apr 2023 11:32:37 +0100 Message-Id: <20230427103237.1725914-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764325432936966964?= X-GMAIL-MSGID: =?utf-8?q?1764325432936966964?= Tested powerpc64le-linux. Docs tested on Fedora 37 with Doxygen 1.9.7 from current git master. Pushed to trunk. I'll backport this too. -- >8 -- Including the header source code in the doxygen-generated PDF file makes it too large, and causes pdflatex to run out of memory. If we only set SOURCE_BROWSER=YES for the HTML docs then we won't include the sources in the PDF file. There are several macros defined for std::valarray that are only used to generate repetitive code and then #undef'd. Those aren't useful in the doxygen docs, especially the ones that reuse the same name in different files. Omitting them avoids warnings about duplicate labels in the refman.tex file. libstdc++-v3/ChangeLog: * doc/doxygen/user.cfg.in (SOURCE_BROWSER): Only set to YES for HTML docs. * include/bits/gslice_array.h (_DEFINE_VALARRAY_OPERATOR): Omit from doxygen docs. * include/bits/indirect_array.h (_DEFINE_VALARRAY_OPERATOR): Likewise. * include/bits/mask_array.h (_DEFINE_VALARRAY_OPERATOR): Likewise. * include/bits/slice_array.h (_DEFINE_VALARRAY_OPERATOR): Likewise. * include/std/valarray (_DEFINE_VALARRAY_UNARY_OPERATOR) (_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT) (_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT) (_DEFINE_BINARY_OPERATOR): Likewise. --- libstdc++-v3/doc/doxygen/user.cfg.in | 2 +- libstdc++-v3/include/bits/gslice_array.h | 2 ++ libstdc++-v3/include/bits/indirect_array.h | 2 ++ libstdc++-v3/include/bits/mask_array.h | 2 ++ libstdc++-v3/include/bits/slice_array.h | 2 ++ libstdc++-v3/include/std/valarray | 2 ++ 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in index 31613f51517..9d814af8614 100644 --- a/libstdc++-v3/doc/doxygen/user.cfg.in +++ b/libstdc++-v3/doc/doxygen/user.cfg.in @@ -1217,7 +1217,7 @@ USE_MDFILE_AS_MAINPAGE = # also VERBATIM_HEADERS is set to NO. # The default value is: NO. -SOURCE_BROWSER = YES +SOURCE_BROWSER = @do_html@ # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. diff --git a/libstdc++-v3/include/bits/gslice_array.h b/libstdc++-v3/include/bits/gslice_array.h index f117a172678..6a48d418477 100644 --- a/libstdc++-v3/include/bits/gslice_array.h +++ b/libstdc++-v3/include/bits/gslice_array.h @@ -183,6 +183,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Array(_M_index)); } + /// @cond undocumented #undef _DEFINE_VALARRAY_OPERATOR #define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \ template \ @@ -214,6 +215,7 @@ _DEFINE_VALARRAY_OPERATOR(<<, __shift_left) _DEFINE_VALARRAY_OPERATOR(>>, __shift_right) #undef _DEFINE_VALARRAY_OPERATOR + /// @endcond /// @} group numeric_arrays diff --git a/libstdc++-v3/include/bits/indirect_array.h b/libstdc++-v3/include/bits/indirect_array.h index deeed99893c..8d34a365799 100644 --- a/libstdc++-v3/include/bits/indirect_array.h +++ b/libstdc++-v3/include/bits/indirect_array.h @@ -174,6 +174,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION indirect_array<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e) const { std::__valarray_copy(__e, _M_sz, _M_array, _M_index); } + /// @cond undocumented #undef _DEFINE_VALARRAY_OPERATOR #define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \ template \ @@ -203,6 +204,7 @@ _DEFINE_VALARRAY_OPERATOR(<<, __shift_left) _DEFINE_VALARRAY_OPERATOR(>>, __shift_right) #undef _DEFINE_VALARRAY_OPERATOR + /// @endcond /// @} group numeric_arrays diff --git a/libstdc++-v3/include/bits/mask_array.h b/libstdc++-v3/include/bits/mask_array.h index d4112a9d0a3..a3174dd7074 100644 --- a/libstdc++-v3/include/bits/mask_array.h +++ b/libstdc++-v3/include/bits/mask_array.h @@ -181,6 +181,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION std::__valarray_copy(__e, __e.size(), _M_array, _M_mask); } + /// @cond undocumented #undef _DEFINE_VALARRAY_OPERATOR #define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \ template \ @@ -213,6 +214,7 @@ _DEFINE_VALARRAY_OPERATOR(<<, __shift_left) _DEFINE_VALARRAY_OPERATOR(>>, __shift_right) #undef _DEFINE_VALARRAY_OPERATOR + /// @endcond /// @} group numeric_arrays diff --git a/libstdc++-v3/include/bits/slice_array.h b/libstdc++-v3/include/bits/slice_array.h index 571e372c292..42b136d7dce 100644 --- a/libstdc++-v3/include/bits/slice_array.h +++ b/libstdc++-v3/include/bits/slice_array.h @@ -245,6 +245,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION slice_array<_Tp>::operator=(const _Expr<_Dom,_Tp>& __e) const { std::__valarray_copy(__e, _M_sz, _M_array, _M_stride); } + /// @cond undocumented #undef _DEFINE_VALARRAY_OPERATOR #define _DEFINE_VALARRAY_OPERATOR(_Op,_Name) \ template \ @@ -275,6 +276,7 @@ _DEFINE_VALARRAY_OPERATOR(<<, __shift_left) _DEFINE_VALARRAY_OPERATOR(>>, __shift_right) #undef _DEFINE_VALARRAY_OPERATOR + /// @endcond /// @} group numeric_arrays diff --git a/libstdc++-v3/include/std/valarray b/libstdc++-v3/include/std/valarray index 504d02b7359..6bd23e0914b 100644 --- a/libstdc++-v3/include/std/valarray +++ b/libstdc++-v3/include/std/valarray @@ -1080,6 +1080,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return _Expr<_Closure, _Tp>(_Closure(*this, __func)); } + /// @cond undocumented #define _DEFINE_VALARRAY_UNARY_OPERATOR(_Op, _Name) \ template \ inline typename valarray<_Tp>::template _UnaryOp<_Name>::_Rt \ @@ -1206,6 +1207,7 @@ _DEFINE_BINARY_OPERATOR(<=, __less_equal) _DEFINE_BINARY_OPERATOR(>=, __greater_equal) #undef _DEFINE_BINARY_OPERATOR + /// @endcond #if __cplusplus >= 201103L /**