[libcxx-commits] [PATCH] D75795: [libc++abi] Change __cxa_finalize return type to void
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 11 20:21:38 PDT 2020
EricWF requested changes to this revision.
EricWF added a comment.
In D75795#1918353 <https://reviews.llvm.org/D75795#1918353>, @rprichard wrote:
> Sorry about this -- I'll try to be more careful in the future about getting my changes vetted.
> > @rprichard has no commits to libc++/libc++abi
> Pedantic: I do have a couple libcxxabi patches, but @EricWF committed them for me (D36446 <https://reviews.llvm.org/D36446> and D36447 <https://reviews.llvm.org/D36447>).
> > Why are we declaring this function at all?
> I don't know. `__cxa_finalize` and `__cxa_atexit` are part of the IA-64 C++ ABI, so I suppose the notice at the top of the file applies. They're implemented elsewhere, though, not in libcxxabi.
> * This header provides the interface to the C++ ABI as defined at:
> * https://itanium-cxx-abi.github.io/cxx-abi/
The function cannot be called directly by any user, and isn't implemented by the library. So we don't own it and can't call it.
Just because it's a part of the ABI spec doesn't mean we need to provide a declaration.
Even after this patch the declaration is still wrong. Because we mark it with `_LIBCPP_FUNC_VIS`, but the spec specifically says the function should have hidden visibility.
My vote is to remove it.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libcxx-commits