Skip to content

Commit 55a4acd

Browse files
yfeldblumfacebook-github-bot
authored andcommitted
object code inspection functions for exception_shared_string
Reviewed By: snarkmaster Differential Revision: D72536948 fbshipit-source-id: a764201c11d6ecfe2f6dd085646f75121cfcd8c4
1 parent 042ac9f commit 55a4acd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

third-party/folly/src/folly/lang/test/ExceptionBench.cpp

+15
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,21 @@ check_folly_exception_ptr_get_object_hint_vmi( //
8686
return folly::exception_ptr_get_object_hint<A0>(ptr, folly::tag<B1, C, B2>);
8787
}
8888

89+
extern "C" FOLLY_KEEP char const* check_folly_exception_shared_string_what(
90+
folly::exception_shared_string const* str) {
91+
return str->what();
92+
}
93+
94+
extern "C" FOLLY_KEEP void check_folly_exception_shared_string_ctor_copy(
95+
folly::exception_shared_string const* str, void* dst) {
96+
::new (dst) folly::exception_shared_string(*str);
97+
}
98+
99+
extern "C" FOLLY_KEEP void check_folly_exception_shared_string_dtor(
100+
folly::exception_shared_string const* str) {
101+
str->~exception_shared_string();
102+
}
103+
89104
BENCHMARK(std_uncaught_exceptions, iters) {
90105
int s = 0;
91106
while (iters--) {

0 commit comments

Comments
 (0)