Open itrofimow opened 12 months ago
Related: libcxxrt: https://github.com/libcxxrt/libcxxrt/pull/23 libcxxabi: https://github.com/llvm/llvm-project/pull/65534
Yeah, I think if you want to write up a patch for this, it'd be a totally welcome addition to the ABI specification.
I'm planing to give this another try, but for now i'm a bit too busy, unfortunately.
Hi!
This comes from
std::make_exception_ptr
: instead of doingthrow
+catch
dance it is possible to initialize the exception object directly, and gcc does that via ABI-extension for almost a decade: https://github.com/gcc-mirror/gcc/blob/8b9d0e8cf482287b6c37b5a268d0eb2d0a964561/libstdc%2B%2B-v3/libsupc%2B%2B/cxxabi_init_exception.h#L70I've recently landed the same ABI-extension into libcxxrt (https://github.com/libcxxrt/libcxxrt/blob/03c83f5a57be8c5b1a29a68de5638744f17d28ba/src/cxxabi.h#L211) and right now I'm in the process of implementing exactly the same
std::make_exception_ptr
optimization in LLVM, which implies adding__cxa_init_primary_exception
into libcxxabi.So i though it would make sense to document this function as some kind of auxiliary API, since 3 major implementation are all (hopefully) about to have this as an extension.
Does that sound reasonable?