From ea731d6b2f49e20408e2e237e9e5b9435c22967f Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Fri, 14 Jun 2024 15:20:16 -0700 Subject: [PATCH] let exception_wrapper::get_exception be hinted Summary: The hinted variation is typically faster. Differential Revision: D58537322 fbshipit-source-id: a072d8b8aff313dc4e077042105db49826173bb8 --- folly/ExceptionWrapper-inl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/ExceptionWrapper-inl.h b/folly/ExceptionWrapper-inl.h index 0e1f6eba863..f73cbfa5c98 100644 --- a/folly/ExceptionWrapper-inl.h +++ b/folly/ExceptionWrapper-inl.h @@ -158,12 +158,12 @@ inline std::exception const* exception_wrapper::get_exception() const noexcept { template inline Ex* exception_wrapper::get_exception() noexcept { - return exception_ptr_get_object(ptr_); + return exception_ptr_get_object_hint(ptr_, tag); } template inline Ex const* exception_wrapper::get_exception() const noexcept { - return exception_ptr_get_object(ptr_); + return exception_ptr_get_object_hint(ptr_, tag); } inline std::exception_ptr exception_wrapper::to_exception_ptr() const noexcept {