[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)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Dec 15 06:16:26 PST 2023
================
@@ -293,4 +304,11 @@
# define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS
#endif
+// Define availability attributes that depend on both
+// _LIBCPP_HAS_NO_EXCEPTIONS and _LIBCPP_HAS_NO_RTTI.
+#if defined(_LIBCPP_HAS_NO_EXCEPTIONS) || defined(_LIBCPP_HAS_NO_RTTI)
+# undef _LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION
+# define _LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION 0
+#endif
+
----------------
itrofimow wrote:
The idea is to simplify the process for vendors: no matter how they define `_LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION` it just doesn't work without `RTTI` (on an unrelated note i believe it actually works with `NO_EXCEPTIONS`).
https://github.com/llvm/llvm-project/pull/65534
More information about the libcxx-commits
mailing list