]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Reduce Doxygen output for PDF
authorJonathan Wakely <jwakely@redhat.com>
Wed, 26 Apr 2023 11:27:59 +0000 (12:27 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 27 Apr 2023 10:28:39 +0000 (11:28 +0100)
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
libstdc++-v3/include/bits/gslice_array.h
libstdc++-v3/include/bits/indirect_array.h
libstdc++-v3/include/bits/mask_array.h
libstdc++-v3/include/bits/slice_array.h
libstdc++-v3/include/std/valarray

index 31613f51517e8630e48130c3dee0497044975a80..9d814af8614b3ee65c8e027590d51be434f79c1c 100644 (file)
@@ -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.
index f117a172678a8a56f908f034e1352eea91143353..6a48d418477b5baeac537ab993a2edd6cac62c61 100644 (file)
@@ -183,6 +183,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
                              _Array<size_t>(_M_index));
       }
 
+  /// @cond undocumented
 #undef _DEFINE_VALARRAY_OPERATOR
 #define _DEFINE_VALARRAY_OPERATOR(_Op, _Name)                          \
   template<typename _Tp>                                               \
@@ -214,6 +215,7 @@ _DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
 _DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
 
 #undef _DEFINE_VALARRAY_OPERATOR
+  /// @endcond
 
   /// @} group numeric_arrays
 
index deeed99893c25d775fed10e1bd8d28ef85a75d09..8d34a365799c3e8d7fae32ae763922dcd16c407f 100644 (file)
@@ -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<typename _Tp>                                               \
@@ -203,6 +204,7 @@ _DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
 _DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
 
 #undef _DEFINE_VALARRAY_OPERATOR
+  /// @endcond
 
   /// @} group numeric_arrays
 
index d4112a9d0a3ae06ccea4f720db8b781f77485731..a3174dd70746b6d5992788f123741e9023f10aff 100644 (file)
@@ -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<typename _Tp>                                               \
@@ -213,6 +214,7 @@ _DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
 _DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
 
 #undef _DEFINE_VALARRAY_OPERATOR
+  /// @endcond
 
   /// @} group numeric_arrays
 
index 571e372c292352984b89e5fb815932f3eb284e6c..42b136d7dceecda1f93fca9dd357da590a2ea81a 100644 (file)
@@ -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<typename _Tp>                                               \
@@ -275,6 +276,7 @@ _DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
 _DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
 
 #undef _DEFINE_VALARRAY_OPERATOR
+  /// @endcond
 
   /// @} group numeric_arrays
 
index 504d02b73591150d22a9694cdd51df1c23011e6d..6bd23e0914b0d2aed16d4fbd8240b65857b81be7 100644 (file)
@@ -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<typename _Tp>                                               \
     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
   /**