Skip to content

Commit da45a67

Browse files
committed
[NFC] Removed unused argument.
Previously getAsyncClosureEntryPointAndContextSize took both a pointer for a function and a closure context. That was a relic of a temporary ABI where async function pointers were not used in all cases. Now that that ABI is long gone, async function pointers are always used. Consequently, the closure context argument was unused. Here, the closure context argument is removed.
1 parent 68eea8a commit da45a67

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

stdlib/public/Concurrency/Task.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -913,8 +913,7 @@ static AsyncTaskAndContext swift_task_create_commonImpl(
913913
template<typename AsyncSignature, uint16_t AuthDiscriminator>
914914
SWIFT_ALWAYS_INLINE // so this doesn't hang out as a ptrauth gadget
915915
std::pair<typename AsyncSignature::FunctionType *, size_t>
916-
getAsyncClosureEntryPointAndContextSize(void *function,
917-
HeapObject *functionContext) {
916+
getAsyncClosureEntryPointAndContextSize(void *function) {
918917
auto fnPtr =
919918
reinterpret_cast<const AsyncFunctionPointer<AsyncSignature> *>(function);
920919
#if SWIFT_PTRAUTH
@@ -934,11 +933,10 @@ AsyncTaskAndContext swift::swift_task_create(
934933
void *closureEntry, HeapObject *closureContext) {
935934
FutureAsyncSignature::FunctionType *taskEntry;
936935
size_t initialContextSize;
937-
std::tie(taskEntry, initialContextSize)
938-
= getAsyncClosureEntryPointAndContextSize<
939-
FutureAsyncSignature,
940-
SpecialPointerAuthDiscriminators::AsyncFutureFunction
941-
>(closureEntry, closureContext);
936+
std::tie(taskEntry, initialContextSize) =
937+
getAsyncClosureEntryPointAndContextSize<
938+
FutureAsyncSignature,
939+
SpecialPointerAuthDiscriminators::AsyncFutureFunction>(closureEntry);
942940

943941
return swift_task_create_common(
944942
taskCreateFlags, options, futureResultType,

0 commit comments

Comments
 (0)