[region-isolation] Avoid using the function isolation when determining isolation of a sil_isolated parameter.

It is unnecessary and seems to be slightly out of sync sometimes around
closures.
This commit is contained in:
Michael Gottesman
2024-05-11 16:08:04 -07:00
parent 5e6b247e09
commit c1d0c8cd2d
2 changed files with 11 additions and 7 deletions

View File

@@ -416,13 +416,10 @@ SILIsolationInfo SILIsolationInfo::get(SILArgument *arg) {
// Before we do anything further, see if we have an isolated parameter. This
// handles isolated self and specifically marked isolated.
if (auto *isolatedArg = fArg->getFunction()->maybeGetIsolatedArgument()) {
if (auto functionIsolation = fArg->getFunction()->getActorIsolation()) {
assert(functionIsolation.isActorInstanceIsolated());
if (auto *nomDecl =
isolatedArg->getType().getNominalOrBoundGenericNominal()) {
return SILIsolationInfo::getActorInstanceIsolated(fArg, isolatedArg,
nomDecl);
}
if (auto *nomDecl =
isolatedArg->getType().getNominalOrBoundGenericNominal()) {
return SILIsolationInfo::getActorInstanceIsolated(fArg, isolatedArg,
nomDecl);
}
}