@@ -762,12 +762,9 @@ SILFunction *SILGenModule::getFunction(SILDeclRef constant,
762
762
// destroyer.
763
763
F->setActorIsolation (ActorIsolation::forNonisolated (false ));
764
764
} else {
765
- // If we have global actor isolation for our constant, put the isolation
766
- // onto the function.
767
- if (auto isolation =
768
- getActorIsolationOfContext (constant.getInnermostDeclContext ())) {
769
- F->setActorIsolation (isolation);
770
- }
765
+ // If we have global actor isolation for our constant, put the isolation onto
766
+ // the function.
767
+ F->setActorIsolation (getActorIsolationOfContext (constant.getInnermostDeclContext ()));
771
768
}
772
769
773
770
assert (F && " SILFunction should have been defined" );
@@ -1132,7 +1129,6 @@ void SILGenModule::emitFunctionDefinition(SILDeclRef constant, SILFunction *f) {
1132
1129
}
1133
1130
case SILDeclRef::Kind::Deallocator: {
1134
1131
auto *dd = cast<DestructorDecl>(constant.getDecl ());
1135
- auto *nom = dd->getDeclContext ()->getSelfNominalTypeDecl ();
1136
1132
1137
1133
if (needsIsolatingDestructor (dd)) {
1138
1134
auto loc = RegularLocation::getAutoGeneratedLocation (dd);
@@ -1266,10 +1262,7 @@ void SILGenModule::preEmitFunction(SILDeclRef constant, SILFunction *F,
1266
1262
} else {
1267
1263
// If we have global actor isolation for our constant, put the isolation
1268
1264
// onto the function.
1269
- if (auto isolation =
1270
- getActorIsolationOfContext (constant.getInnermostDeclContext ())) {
1271
- F->setActorIsolation (isolation);
1272
- }
1265
+ F->setActorIsolation (getActorIsolationOfContext (constant.getInnermostDeclContext ()));
1273
1266
}
1274
1267
1275
1268
// Create a debug scope for the function using astNode as source location.
0 commit comments