[libcxx-commits] [PATCH] D140944: [libc++] Optimize _LIBCPP_HAS_NO_VERBOSE_ABORT_IN_LIBRARY
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 9 14:22:35 PST 2023
ldionne added a comment.
Thanks for pinging me here, I was OOO when the discussion happened.
First, it is true that `_LIBCPP_HAS_NO_VERBOSE_ABORT_IN_LIBRARY` was meant to allow back-deployment only, and I don't think we should abuse it for other purposes. If you want to have an abort handler that is guaranteed to be inlined, the path forward would be to provide a way that users can define their abort handler with whatever attributes (and signature while we're at it) they want, and allow them to override the default one at compile-time. That approach would be in-line with how this was meant to be used.
I fully agree that the current mechanism is lacking in that respect. In fact, it's an open issue I was already aware of and planning to fix before I saw this patch, since we do have codesize-sensitive users that want `__libcpp_verbose_abort` to boil down to essentially a single instruction. This patch just made me re-bump the priority of fixing this issue, so I just opened D141326 <https://reviews.llvm.org/D141326> to propose a way to solve this problem. Please let me know what you think.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140944/new/
https://reviews.llvm.org/D140944
More information about the libcxx-commits
mailing list