[libcxx-commits] [libcxx] fix std::make_exception_ptr interaction with ObjC (PR #135386)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 11 08:25:26 PDT 2025
https://github.com/itrofimow created https://github.com/llvm/llvm-project/pull/135386
None
>From 9f88c67d226864bd7df99a3e55d4a4790a8d69fa Mon Sep 17 00:00:00 2001
From: Ivan Trofimov <i.trofimow at yandex.ru>
Date: Fri, 11 Apr 2025 18:23:30 +0300
Subject: [PATCH] fix std::make_exception_ptr interaction with ObjC
---
libcxx/include/__exception/exception_ptr.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/include/__exception/exception_ptr.h b/libcxx/include/__exception/exception_ptr.h
index dac5b00b57fe3..8b90a6569d136 100644
--- a/libcxx/include/__exception/exception_ptr.h
+++ b/libcxx/include/__exception/exception_ptr.h
@@ -92,7 +92,7 @@ class _LIBCPP_EXPORTED_FROM_ABI exception_ptr {
template <class _Ep>
_LIBCPP_HIDE_FROM_ABI exception_ptr make_exception_ptr(_Ep __e) _NOEXCEPT {
# if _LIBCPP_HAS_EXCEPTIONS
-# if _LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION && __cplusplus >= 201103L
+# if !defined(__OBJC__) && _LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION && __cplusplus >= 201103L
using _Ep2 = __decay_t<_Ep>;
void* __ex = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ep));
More information about the libcxx-commits
mailing list