1313#include < __config>
1414#include < cstdint>
1515
16- #if __has_feature(ptrauth_calls)
17- # include < ptrauth.h>
18- #endif
19-
2016#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
2117# pragma GCC system_header
2218#endif
@@ -66,14 +62,14 @@ _LIBCPP_END_NAMESPACE_STD
6662
6763# define _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION 1
6864# define _LIBCPP_OVERRIDABLE_FUNCTION (symbol, type, name, arglist ) \
69- [[clang::weak_import]] extern type symbol arglist __asm__ (" _" _LIBCPP_TOSTRING(symbol)); \
65+ _LIBCPP_WEAK_IMPORT extern type symbol arglist __asm__ (" _" _LIBCPP_TOSTRING(symbol)); \
7066 _LIBCPP_BEGIN_NAMESPACE_STD \
7167 template <> \
7268 inline bool __is_function_overridden<static_cast <type(*) arglist>(name)>() { \
7369 return static_cast <type (*) arglist>(name) != symbol; \
7470 } \
7571 _LIBCPP_END_NAMESPACE_STD \
76- type name arglist
72+ _LIBCPP_WEAK type name arglist
7773
7874#elif defined(_LIBCPP_OBJECT_FORMAT_ELF)
7975
@@ -86,15 +82,14 @@ _LIBCPP_END_NAMESPACE_STD
8682
8783# define _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION 1
8884# define _LIBCPP_OVERRIDABLE_FUNCTION (symbol, type, name, arglist ) \
89- [[gnu::weak]] type name arglist; \
90- [[gnu::alias(_LIBCPP_TOSTRING(symbol))]] static type symbol arglist __asm__ (" .L." _LIBCPP_TOSTRING(symbol)); \
85+ _LIBCPP_ALIAS (_LIBCPP_TOSTRING(symbol)) static type symbol arglist __asm__(" .L." _LIBCPP_TOSTRING(symbol)); \
9186 _LIBCPP_BEGIN_NAMESPACE_STD \
9287 template <> \
9388 inline bool __is_function_overridden<static_cast <type(*) arglist>(name)>() { \
9489 return static_cast <type (*) arglist>(name) != symbol; \
9590 } \
9691 _LIBCPP_END_NAMESPACE_STD \
97- type name arglist
92+ _LIBCPP_WEAK type name arglist
9893
9994#else
10095
0 commit comments