Skip to content

Proposal: document or somehow notice __cxa_init_primary_exception #173

@itrofimow

Description

@itrofimow

Hi!

This comes from std::make_exception_ptr: instead of doing throw + 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#L70

I'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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions