Skip to content

Commit 4d7e137

Browse files
drexinWeZZard
authored andcommitted
[Runtime] Add ccAttrs to slow path in compatibility overrides
rdar://145523626 This was accidentally dropped when introducing the slow path, which causes CC mismatches for functions using custom CC.
1 parent 442be89 commit 4d7e137

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

stdlib/public/CompatibilityOverride/CompatibilityOverride.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,10 @@ namespace swift {
195195
/* We are creating this separate function for the override case, */ \
196196
/* to prevent a stack frame from being created for the default case. */ \
197197
SWIFT_NOINLINE \
198-
static ret swift_##name##Slow(COMPATIBILITY_UNPAREN_WITH_COMMA(typedArgs) \
199-
std::atomic<uintptr_t> &Override, \
200-
uintptr_t fn, Original_##name defaultImpl) { \
198+
ccAttrs static ret swift_##name##Slow( \
199+
COMPATIBILITY_UNPAREN_WITH_COMMA(typedArgs) \
200+
std::atomic<uintptr_t> &Override, \
201+
uintptr_t fn, Original_##name defaultImpl) { \
201202
constexpr uintptr_t DEFAULT_IMPL_SENTINEL = 0x1; \
202203
if (SWIFT_UNLIKELY(fn == 0x0)) { \
203204
fn = (uintptr_t)getOverride_##name(); \

0 commit comments

Comments
 (0)