mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CoroutineAccessors] Rewrite allocs in LBA.
When replacing a `begin_apply` with an allocation, replace uses of the old allocation with uses of the new.
This commit is contained in:
@@ -2590,6 +2590,10 @@ void LoadableByAddress::recreateSingleApply(
|
||||
// Use the new token result.
|
||||
oldApply->getTokenResult()->replaceAllUsesWith(newApply->getTokenResult());
|
||||
|
||||
if (auto *allocation = oldApply->getCalleeAllocationResult()) {
|
||||
allocation->replaceAllUsesWith(newApply->getCalleeAllocationResult());
|
||||
}
|
||||
|
||||
// Rewrite all the yields.
|
||||
auto oldYields = oldApply->getOrigCalleeType()->getYields();
|
||||
auto oldYieldedValues = oldApply->getYieldedValues();
|
||||
|
||||
Reference in New Issue
Block a user