[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)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 5 10:58:49 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
+
----------------
ldionne wrote:
This hunk seems unnecessary to me right now, no? We could punt on adding it and let vendors define their availability attributes correctly based on whether exceptions are enabled or not.
https://github.com/llvm/llvm-project/pull/65534
More information about the libcxx-commits
mailing list