[libcxx-commits] [libcxxabi] [libcxx] [libc++] [libc++abi] Initialize exception directly in make_exception_ptr if __cxa_init_primary_exception is available in ABI-library (PR #65534)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 15 06:27:27 PST 2023


================
@@ -16,6 +16,17 @@
 // stable ABI), and its rethrow_exception(std::__exception_ptr::exception_ptr)
 // function.
 
+
+#  if _LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION
----------------
itrofimow wrote:

Although we didn't change libsupc++, we added some code on the call site which invokes `__cxa_init_primary_exception`.
Since the function is present in libsupc++ i thought it would make sense to support the optimization for libsupc++ as well, and that requires some changes in this file.

I'm totally fine with not doing it in this PR

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


More information about the libcxx-commits mailing list