[libcxx-commits] [PATCH] D92397: [libc++] Always define a key function for std::bad_function_call in the dylib

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Nov 14 23:12:08 PST 2021


var-const added inline comments.


================
Comment at: libcxx/include/__functional/function.h:52-53
+// constitutes an ABI break (with `what` serving as a key function).
+#ifdef _LIBCPP_ABI_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE
     virtual const char* what() const _NOEXCEPT;
 #endif
----------------
Alternatively, we could also switch on whether `_LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION` is defined and define `what` inline if it's not. That would prevent `_LIBCPP_ABI_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE` from unintentionally serving as another way of defining a key function.


================
Comment at: libcxx/lib/abi/CHANGELOG.TXT:16
 ------------
 Version 14.0
 ------------
----------------
Is this still the right version?


================
Comment at: libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist:3
 {'is_defined': False, 'name': '_ZNKSt13runtime_error4whatEv', 'type': 'FUNC'}
+{'is_defined': False, 'name': '_ZNKSt9exception4whatEv', 'type': 'FUNC'}
 {'is_defined': False, 'name': '_ZNSt11logic_errorD2Ev', 'type': 'FUNC'}
----------------
This is from running `generate-cxx-abilist` on Linux (in a Docker container). I'm not sure about `exception::what`, but some symbols below (e.g. `_ZTVNSt3__120__time_get_c_storageIcEE`) seem clearly unrelated -- perhaps the ABI list wasn't regenerated on Linux at some point?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92397/new/

https://reviews.llvm.org/D92397



More information about the libcxx-commits mailing list