@@ -66,10 +66,6 @@ class ActorIsolation {
6666 // / The declaration is isolated to a global actor. It can refer to other
6767 // / entities with the same global actor.
6868 GlobalActor,
69- // / The declaration is isolated to a global actor but with the "unsafe"
70- // / annotation, which means that we only enforce the isolation if we're
71- // / coming from something with specific isolation.
72- GlobalActorUnsafe,
7369 };
7470
7571private:
@@ -121,9 +117,8 @@ class ActorIsolation {
121117 return ActorIsolation (ActorInstance, capturedActor);
122118 }
123119
124- static ActorIsolation forGlobalActor (Type globalActor, bool unsafe) {
125- return ActorIsolation (
126- unsafe ? GlobalActorUnsafe : GlobalActor, globalActor);
120+ static ActorIsolation forGlobalActor (Type globalActor) {
121+ return ActorIsolation (GlobalActor, globalActor);
127122 }
128123
129124 static std::optional<ActorIsolation> forSILString (StringRef string) {
@@ -140,7 +135,7 @@ class ActorIsolation {
140135 .Case (" global_actor" ,
141136 std::optional<ActorIsolation>(ActorIsolation::GlobalActor))
142137 .Case (" global_actor_unsafe" , std::optional<ActorIsolation>(
143- ActorIsolation::GlobalActorUnsafe ))
138+ ActorIsolation::GlobalActor ))
144139 .Default (std::nullopt );
145140 if (kind == std::nullopt )
146141 return std::nullopt ;
@@ -171,7 +166,6 @@ class ActorIsolation {
171166 switch (getKind ()) {
172167 case ActorInstance:
173168 case GlobalActor:
174- case GlobalActorUnsafe:
175169 return true ;
176170
177171 case Unspecified:
@@ -186,7 +180,7 @@ class ActorIsolation {
186180 VarDecl *getActorInstance () const ;
187181
188182 bool isGlobalActor () const {
189- return getKind () == GlobalActor || getKind () == GlobalActorUnsafe ;
183+ return getKind () == GlobalActor;
190184 }
191185
192186 bool isMainActor () const ;
@@ -238,7 +232,6 @@ class ActorIsolation {
238232 lhs.parameterIndex == rhs.parameterIndex );
239233
240234 case GlobalActor:
241- case GlobalActorUnsafe:
242235 llvm_unreachable (" Global actors handled above" );
243236 }
244237 }
@@ -271,9 +264,6 @@ class ActorIsolation {
271264 case GlobalActor:
272265 os << " global_actor" ;
273266 return ;
274- case GlobalActorUnsafe:
275- os << " global_actor_unsafe" ;
276- return ;
277267 }
278268 llvm_unreachable (" Covered switch isn't covered?!" );
279269 }
0 commit comments