mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IRGen and basic optimizer support for coroutines.
This commit is contained in:
@@ -2015,6 +2015,13 @@ static ApplySite replaceWithSpecializedCallee(ApplySite AI,
|
||||
A->replaceAllUsesWith(NewAI);
|
||||
return NewAI;
|
||||
}
|
||||
if (auto *A = dyn_cast<BeginApplyInst>(AI)) {
|
||||
assert(!StoreResultTo);
|
||||
auto *NewAI = Builder.createBeginApply(Loc, Callee, Subs, Arguments,
|
||||
A->isNonThrowing());
|
||||
A->replaceAllUsesPairwiseWith(NewAI);
|
||||
return NewAI;
|
||||
}
|
||||
if (auto *PAI = dyn_cast<PartialApplyInst>(AI)) {
|
||||
auto *NewPAI = Builder.createPartialApply(
|
||||
Loc, Callee, Subs, Arguments,
|
||||
|
||||
Reference in New Issue
Block a user