Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/LLVMPasses/LLVMMergeFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,9 @@ static bool isEligibleFunction(Function *F) {

if (F->getFunctionType()->isVarArg())
return false;

if (F->getCallingConv() == CallingConv::SwiftTail)
return false;

unsigned Benefit = getBenefit(F);
if (Benefit < FunctionMergeThreshold)
Expand Down
24 changes: 24 additions & 0 deletions test/Concurrency/Runtime/checked_continuation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,30 @@ struct TestError: Error {}
}
await task.get()
}

tests.test("test withCheckedThrowingContinuation") {
let task2 = detach {
do {
let x: Int = try await withCheckedThrowingContinuation { c in
c.resume(returning: 17)
}
expectEqual(17, x)
} catch {
}
}

let task = detach {
do {
let x: Int = try await withCheckedThrowingContinuation { c in
c.resume(returning: 17)
}
expectEqual(17, x)
} catch {
}
}
await task.get()
await task2.get()
}
}

await runAllTestsAsync()
Expand Down