Skip to content

Commit e3ff19e

Browse files
committed
[Test] Backport SIL test to 6.1.
On main type annotations are not always required but on 6.1 they are.
1 parent 1463911 commit e3ff19e

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

test/SILOptimizer/canonicalize_function_argument_unit.sil

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ struct NC : ~Copyable {
2626
sil [ossa] @consume_move_only : $@convention(thin) (@guaranteed C) -> () {
2727
bb0(%c : @guaranteed $C):
2828
specify_test "canonicalize_function_argument @argument"
29-
%copy = copy_value %c
30-
%nc = struct $NC (%copy)
29+
%copy = copy_value %c : $C
30+
%nc = struct $NC (%copy : $C)
3131
apply undef(%nc) : $@convention(thin) (@owned NC) -> ()
3232
%retval = tuple ()
33-
return %retval
33+
return %retval : $()
3434
}
3535

3636
// CHECK-LABEL: begin running test {{.*}} on borrow_move_only
@@ -44,12 +44,12 @@ bb0(%c : @guaranteed $C):
4444
sil [ossa] @borrow_move_only : $@convention(thin) (@guaranteed C) -> () {
4545
bb0(%c : @guaranteed $C):
4646
specify_test "canonicalize_function_argument @argument"
47-
%copy = copy_value %c
48-
%nc = struct $NC (%copy)
47+
%copy = copy_value %c : $C
48+
%nc = struct $NC (%copy : $C)
4949
apply undef(%nc) : $@convention(thin) (@guaranteed NC) -> ()
50-
destroy_value %nc
50+
destroy_value %nc : $NC
5151
%retval = tuple ()
52-
return %retval
52+
return %retval : $()
5353
}
5454

5555
// CHECK-LABEL: begin running test {{.*}} on consume_and_borrow_move_only
@@ -67,13 +67,13 @@ bb0(%c : @guaranteed $C):
6767
sil [ossa] @consume_and_borrow_move_only : $@convention(thin) (@guaranteed C) -> () {
6868
bb0(%c : @guaranteed $C):
6969
specify_test "canonicalize_function_argument @argument"
70-
%copy1 = copy_value %c
71-
%nc1 = struct $NC (%copy1)
70+
%copy1 = copy_value %c : $C
71+
%nc1 = struct $NC (%copy1 : $C)
7272
apply undef(%nc1) : $@convention(thin) (@guaranteed NC) -> ()
73-
destroy_value %nc1
74-
%copy2 = copy_value %c
75-
%nc2 = struct $NC (%copy2)
73+
destroy_value %nc1 : $NC
74+
%copy2 = copy_value %c : $C
75+
%nc2 = struct $NC (%copy2 : $C)
7676
apply undef(%nc2) : $@convention(thin) (@owned NC) -> ()
7777
%retval = tuple ()
78-
return %retval
78+
return %retval : $()
7979
}

0 commit comments

Comments
 (0)