Skip to content

Commit 0f61f29

Browse files
committed
Update SIL test that only runs on macOS.
1 parent 9eb5d7f commit 0f61f29

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/Concurrency/transfernonsendable_instruction_matching_opaquevalues.sil

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ bb0(%owned_value : @owned $T):
8181

8282
%4 = function_ref @transferIndirect : $@convention(thin) @async <τ_0_0> (@in_guaranteed τ_0_0) -> ()
8383
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %4<@sil_unowned T>(%unowned_value) : $@convention(thin) @async <τ_0_0> (@in_guaranteed τ_0_0) -> () // expected-warning {{}}
84+
// expected-note @-1 {{}}
8485

8586
destroy_value %unowned_value : $@sil_unowned T
8687
//destroy_value %value : $T
@@ -102,6 +103,7 @@ bb0:
102103
%elt = tuple_pack_extract %index of %1 : $(repeat each T) as $@pack_element("00000000-0000-0000-0000-000000000000") U_1
103104
%f = function_ref @transferIndirect : $@convention(thin) @async <τ_0_0> (@in_guaranteed τ_0_0) -> ()
104105
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f<@pack_element("00000000-0000-0000-0000-000000000000") U_1>(%elt) : $@convention(thin) @async <τ_0_0> (@in_guaranteed τ_0_0) -> () // expected-warning {{}}
106+
// expected-note @-1 {{}}
105107

106108
%elt2 = tuple_pack_extract %index of %1 : $(repeat each T) as $@pack_element("00000000-0000-0000-0000-000000000000") U_1 // expected-note {{access can happen concurrently}}
107109
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %f<@pack_element("00000000-0000-0000-0000-000000000000") U_1>(%elt) : $@convention(thin) @async <τ_0_0> (@in_guaranteed τ_0_0) -> ()
@@ -119,6 +121,7 @@ bb0:
119121

120122
%transferP = function_ref @transferP : $@async @convention(thin) (@guaranteed P) -> ()
121123
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %transferP(%p) : $@async @convention(thin) (@guaranteed P) -> () // expected-warning {{}}
124+
// expected-note @-1 {{}}
122125

123126
%b = begin_borrow %p : $P
124127
%v = open_existential_value %b : $P to $@opened("EF755EF2-B636-11E7-B7B4-A45E60ECC541", P) Self
@@ -140,6 +143,7 @@ bb0:
140143
%pExt = unchecked_enum_data %pBorrowed : $Optional<PAnyObject>, #Optional.some!enumelt
141144
%transferP = function_ref @transferPAnyObject : $@async @convention(thin) (@guaranteed PAnyObject) -> ()
142145
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %transferP(%pExt) : $@async @convention(thin) (@guaranteed PAnyObject) -> () // expected-warning {{}}
146+
// expected-note @-1 {{}}
143147

144148
%w = weak_copy_value %pBorrowed : $Optional<PAnyObject>
145149
%weakFunc = function_ref @usePAnyObjectWeak : $@convention(thin) (@guaranteed @sil_weak Optional<PAnyObject>) -> ()
@@ -162,6 +166,7 @@ bb0:
162166
%pExt = unchecked_enum_data %pBorrowed : $Optional<PAnyObject>, #Optional.some!enumelt
163167
%transferP = function_ref @transferPAnyObject : $@async @convention(thin) (@guaranteed PAnyObject) -> ()
164168
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %transferP(%pExt) : $@async @convention(thin) (@guaranteed PAnyObject) -> () // expected-warning {{}}
169+
// expected-note @-1 {{}}
165170

166171
%w = weak_copy_value %pBorrowed : $Optional<PAnyObject>
167172
%s = strong_copy_weak_value %w : $@sil_weak Optional<PAnyObject>
@@ -185,6 +190,7 @@ bb0:
185190
%2 = function_ref @transferNonSendableKlass : $@convention(thin) @async (@guaranteed NonSendableKlass) -> ()
186191
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %2(%1) : $@convention(thin) @async (@guaranteed NonSendableKlass) -> ()
187192
// expected-warning @-1 {{}}
193+
// expected-note @-2 {{}}
188194

189195
%i = init_existential_value %1 : $NonSendableKlass, $NonSendableKlass, $P
190196
%f2 = function_ref @useP : $@convention(thin) (@in_guaranteed P) -> ()

0 commit comments

Comments
 (0)