Skip to content

Commit 7ae8f39

Browse files
authored
Merge pull request #61562 from etcwilde/ewilde/hide-backdeploy56-symbols
[Backdeploy5.6] Hide task_future_wait[_throwing]
2 parents 0421c1b + c329bf6 commit 7ae8f39

File tree

5 files changed

+8
-18
lines changed

5 files changed

+8
-18
lines changed

include/swift/Runtime/Exclusivity.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ void swift_dumpTrackedAccesses();
7575
#ifdef SWIFT_COMPATIBILITY56
7676
/// Backdeploy56 shim calls swift_task_enterThreadLocalContext if it is
7777
/// available in the underlying runtime, otherwise does nothing
78-
SWIFT_RUNTIME_EXPORT
78+
__attribute__((visibility("hidden"), weak))
7979
void swift_task_enterThreadLocalContextBackdeploy56(char *state);
8080

8181
/// Backdeploy56 shim calls swift_task_exitThreadLocalContext if it is available
8282
/// in the underlying runtime, otherwise does nothing
83-
SWIFT_RUNTIME_EXPORT
83+
__attribute__((visibility("hidden"), weak))
8484
void swift_task_exitThreadLocalContextBackdeploy56(char *state);
8585
#else
8686

stdlib/toolchain/Compatibility56/Overrides.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ using TaskFutureWaitThrowing_t = SWIFT_CC(swiftasync) void(
3737
ThrowingTaskFutureWaitContinuationFunction *resumeFn,
3838
AsyncContext *callContext);
3939

40+
__attribute__((weak, visibility("hidden")))
4041
void SWIFT_CC(swiftasync) swift56override_swift_task_future_wait(
4142
OpaqueValue *,
4243
SWIFT_ASYNC_CONTEXT AsyncContext *,
@@ -45,17 +46,12 @@ void SWIFT_CC(swiftasync) swift56override_swift_task_future_wait(
4546
AsyncContext *,
4647
TaskFutureWait_t *original);
4748

49+
__attribute__((weak, visibility("hidden")))
4850
void SWIFT_CC(swiftasync) swift56override_swift_task_future_wait_throwing(
4951
OpaqueValue *,
5052
SWIFT_ASYNC_CONTEXT AsyncContext *,
5153
AsyncTask *,
5254
ThrowingTaskFutureWaitContinuationFunction *,
5355
AsyncContext *,
5456
TaskFutureWaitThrowing_t *original);
55-
56-
57-
using AsyncMainDrainQueue_t = SWIFT_CC(swift) void();
58-
59-
void SWIFT_CC(swift) swift56override_swift_asyncMainDrainQueue(AsyncMainDrainQueue_t *);
60-
6157
} // namespace swift

stdlib/toolchain/Compatibility56/include/Concurrency/TaskStatus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class CancellationNotificationStatusRecord : public TaskStatusRecord {
159159
};
160160

161161
/// Return the current thread's active task reference.
162-
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
162+
SWIFT_CC(swift)
163163
AsyncTask *swift_task_getCurrent(void);
164164
} // namespace swift
165165

stdlib/toolchain/Compatibility56/include/Runtime/Concurrency.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,9 @@ using FutureAsyncSignature =
8181
///
8282
/// This has no effect if the task already has at least the given priority.
8383
/// Returns the priority of the task.
84-
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
85-
JobPriority
86-
swift_task_escalateBackdeploy56(AsyncTask *task, JobPriority newPriority);
87-
88-
/// Return the current thread's active task reference.
89-
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
90-
AsyncTask *swift_task_getCurrent(void);
91-
84+
SWIFT_CC(swift)
85+
JobPriority swift_task_escalateBackdeploy56(AsyncTask *task,
86+
JobPriority newPriority);
9287
} // namespace swift
9388

9489
#pragma clang diagnostic pop

stdlib/toolchain/Compatibility56/include/Runtime/Threading/Once.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ typedef std::once_flag swift_once_t;
4646
/// Runs the given function with the given context argument exactly once.
4747
/// The predicate argument must point to a global or static variable of static
4848
/// extent of type swift_once_t.
49-
SWIFT_RUNTIME_EXPORT
5049
void swift_once(swift_once_t *predicate, void (*fn)(void *), void *context);
5150

5251
}

0 commit comments

Comments
 (0)