Skip to content

Commit

Permalink
Make the impl symbols static
Browse files Browse the repository at this point in the history
Having global symbols with .L names is not well supported.
  • Loading branch information
petrhosek committed Jan 15, 2025
1 parent 00ec430 commit 4958c19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libcxx/src/include/overridable_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ _LIBCPP_END_NAMESPACE_STD

# define _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION 1
# define _LIBCPP_OVERRIDABLE_FUNCTION(symbol, type, name, arglist) \
type symbol##_impl__ arglist __asm__(".L" _LIBCPP_TOSTRING(symbol)); \
static type symbol##_impl__ arglist __asm__(".L" _LIBCPP_TOSTRING(symbol)); \
[[gnu::weak, gnu::alias(".L" _LIBCPP_TOSTRING(symbol))]] type name arglist; \
_LIBCPP_BEGIN_NAMESPACE_STD \
template <> \
inline bool __is_function_overridden<static_cast<type(*) arglist>(name)>() { \
return static_cast<type(*) arglist>(name) != symbol##_impl__; \
} \
_LIBCPP_END_NAMESPACE_STD \
type symbol##_impl__ arglist
static type symbol##_impl__ arglist

#else

Expand Down

0 comments on commit 4958c19

Please sign in to comment.