[libcxx-commits] [libcxxabi] [libcxx] [libcxxabi] Dont throw in make exception ptr if __cxa_init_primary_exception is available (PR #65534)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 11 07:50:22 PDT 2023


================
@@ -36,13 +36,19 @@ class type_info; // forward declaration
 
 // runtime routines use C calling conventions, but are in __cxxabiv1 namespace
 namespace __cxxabiv1 {
+
+struct __cxa_exception;
+
 extern "C"  {
 
 // 2.4.2 Allocating the Exception Object
 extern _LIBCXXABI_FUNC_VIS void *
 __cxa_allocate_exception(size_t thrown_size) throw();
 extern _LIBCXXABI_FUNC_VIS void
 __cxa_free_exception(void *thrown_exception) throw();
+// This function is an llvm extension
+extern _LIBCXXABI_FUNC_VIS __cxa_exception*
+__cxa_init_primary_exception(void* object, std::type_info* tinfo, void(_LIBCXXABI_DTOR_FUNC* dest)(void*)) throw();
----------------
philnik777 wrote:

This probably requires availability annotations. CC @ldionne 

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


More information about the libcxx-commits mailing list