mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user