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

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 5 10:58:49 PST 2023


================
@@ -26,6 +31,21 @@ namespace std { // purposefully not using versioning namespace
 class _LIBCPP_EXPORTED_FROM_ABI exception_ptr {
   void* __ptr_;
 
+#  if _LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION
----------------
ldionne wrote:

This shouldn't be guarded by `_LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION`, only the part where you *use* `__init_native_exception` should be guarded.

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


More information about the libcxx-commits mailing list