Apply [[nodebug]] to typedefs throughout the STL.
When applied to a typedef or alias template, the [[nodebug]] attribute
makes the typedef transparent to the debugger, so instead of seeing
`std::__function::__alloc_func<remove_reference<void(&)()>::type,
allocator<remove_reference<void(&)()>, void()>::_Target` you see
`void(&)()` as the type of the variable in your debugger.
Removing all this SFINAE noise from debug info has huge binary size
wins, in addition to improving the readability.
For now this change is on by default. Users can override it by
specifying -D_LIBCPP_NODEBUG_TYPE=
llvm-svn: 363117
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 14d4869209cc8ff9a53aaa5a59d6409fbc1c5f5d
diff --git a/include/functional b/include/functional
index e2eac0e..c0a89f7 100644
--- a/include/functional
+++ b/include/functional
@@ -1488,8 +1488,8 @@
__compressed_pair<_Fp, _Ap> __f_;
public:
- typedef _Fp _Target;
- typedef _Ap _Alloc;
+ typedef _LIBCPP_NODEBUG_TYPE _Fp _Target;
+ typedef _LIBCPP_NODEBUG_TYPE _Ap _Alloc;
_LIBCPP_INLINE_VISIBILITY
const _Target& __target() const { return __f_.first(); }
@@ -1566,7 +1566,7 @@
_Fp __f_;
public:
- typedef _Fp _Target;
+ typedef _LIBCPP_NODEBUG_TYPE _Fp _Target;
_LIBCPP_INLINE_VISIBILITY
const _Target& __target() const { return __f_; }