[libcxx] Rename __libcpp_launder to __launder_function_pointer - #209320
Merged
petrhosek merged 1 commit intoJul 14, 2026
Merged
Conversation
This addresses post-commit feedback raised in llvm#208330.
|
@llvm/pr-subscribers-libcxx Author: Petr Hosek (petrhosek) ChangesThis addresses post-commit feedback raised in #208330. Full diff: https://github.com/llvm/llvm-project/pull/209320.diff 1 Files Affected:
diff --git a/libcxx/src/include/overridable_function.h b/libcxx/src/include/overridable_function.h
index bd55c4bb6d8bc..4892393ad64f9 100644
--- a/libcxx/src/include/overridable_function.h
+++ b/libcxx/src/include/overridable_function.h
@@ -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
|
pedroMVicente
pushed a commit
to pedroMVicente/llvm-project
that referenced
this pull request
Jul 15, 2026
…209320) This addresses post-commit feedback raised in llvm#208330.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This addresses post-commit feedback raised in #208330.