mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ClosureLifetimeFixup] Cleanups get CleanupLocs.
This commit is contained in:
@@ -1462,7 +1462,7 @@ void swift::insertDestroyOfCapturedArguments(
|
||||
ApplySite site(pai);
|
||||
SILFunctionConventions calleeConv(site.getSubstCalleeType(),
|
||||
pai->getModule());
|
||||
auto loc = RegularLocation::getAutoGeneratedLocation();
|
||||
auto loc = CleanupLocation(RegularLocation::getAutoGeneratedLocation());
|
||||
for (auto &arg : pai->getArgumentOperands()) {
|
||||
if (!shouldInsertDestroy(arg.get()))
|
||||
continue;
|
||||
@@ -1480,7 +1480,7 @@ void swift::insertDeallocOfCapturedArguments(
|
||||
ApplySite site(pai);
|
||||
SILFunctionConventions calleeConv(site.getSubstCalleeType(),
|
||||
pai->getModule());
|
||||
auto loc = RegularLocation::getAutoGeneratedLocation();
|
||||
auto loc = CleanupLocation(RegularLocation::getAutoGeneratedLocation());
|
||||
for (auto &arg : pai->getArgumentOperands()) {
|
||||
unsigned calleeArgumentIndex = site.getCalleeArgIndex(arg);
|
||||
assert(calleeArgumentIndex >= calleeConv.getSILArgIndexOfFirstParam());
|
||||
|
||||
Reference in New Issue
Block a user