[libcxx] Rename __libcpp_launder to __launder_function_pointer (#209320)

This addresses post-commit feedback raised in #208330.
This commit is contained in:
Petr Hosek 2026-07-14 00:13:25 -07:00 committed by GitHub
parent e8e88dbde9
commit aae0191917
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,7 +62,7 @@ namespace {
// This is used to prevent TBAA from optimizing away the function pointer comparison.
template <typename T>
[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI T* __libcpp_launder(T* __ptr) noexcept {
[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI T* __launder_function_pointer(T* __ptr) noexcept {
__asm__ volatile("" : "+r"(__ptr));
return __ptr;
}
@ -96,7 +96,7 @@ _LIBCPP_HIDE_FROM_ABI inline bool __is_function_overridden() noexcept {
// the _Func symbol. The compiler thinks __impl_ref<...>::__impl_ is defined elsewhere
// at link time and will be an undefined symbol. It doesn't know that the __asm__ tells
// the assembler to define it as a local symbol.
return __libcpp_launder(_Func) != __impl_ref<_Func>::__impl_;
return __launder_function_pointer(_Func) != __impl_ref<_Func>::__impl_;
}
_LIBCPP_END_NAMESPACE_STD