[libcxx-commits] [libcxx] [libc++] Document that internal aliases should be marked _LIBCPP_NODEBUG (PR #122175)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 9 00:33:27 PST 2025


================
@@ -184,3 +184,13 @@ headers (which is sometimes required for ``constexpr`` support).
 
 When defining a function at the ABI boundary, it can also be useful to consider which attributes (like ``[[gnu::pure]]``
 and ``[[clang::noescape]]``) can be added to the function to improve the compiler's ability to optimize.
+
+library-internal type aliases should be annotated with ``_LIBCPP_NODEBUG``
+==========================================================================
+
+Libc++ has lots of internal type aliases. Accumulated, these can result in significant amounts of debug information that
+users don't care about usually, since users don't try to debug standard library facilities in most cases. For that
+reason, all library-internal type aliases should be annotated with ``_LIBCPP_NODEBUG`` to suppress compilers from
----------------
frederick-vs-ja wrote:

It seems that function-local type aliases should be exempted, right? Also, it seems intended that member type alias `type` should also be marked `_LIBCPP_NODEBUG` even when it is not internal.

https://github.com/llvm/llvm-project/pull/122175


More information about the libcxx-commits mailing list