Commit 7c86b9b4 authored by Giuseppe Ottaviano's avatar Giuseppe Ottaviano Committed by Facebook GitHub Bot

__PRETTY_FUNCTION__ -> __func__ in FOLLY_SAFE_CHECK

Summary:
Storing the `__PRETTY_FUNCTION__` for logging has an unreasonable cost on (non-strippable) binary size for debug builds, as different template instantiation will produce long, demangled, and non-mergeable strings.

If necessary, all the information is retrievable from the debug info (even if the function is inlined), where it's stored in much more efficient form. So, switch to `__func__`, which is stripped.

Reviewed By: yfeldblum, luciang

Differential Revision: D27825136

fbshipit-source-id: d499084c7e7b24db1cd46aa2b03f4a590c6eddc3
parent a87085f2
......@@ -36,7 +36,7 @@
if ((!d || ::folly::kIsDebug || ::folly::kIsSanitize) && \
!static_cast<bool>(expr)) { \
FOLLY_DETAIL_SAFE_CHECK_LINKAGE constexpr auto \
__folly_detail_safe_assert_fun = __PRETTY_FUNCTION__; \
__folly_detail_safe_assert_fun = __func__; \
FOLLY_DETAIL_SAFE_CHECK_LINKAGE constexpr ::folly::detail:: \
safe_assert_arg __folly_detail_safe_assert_arg{ \
FOLLY_PP_STRINGIZE(expr_s), \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment