@@ -52,20 +52,20 @@ entry(%input : $*Input):
52
52
// CHECK: bb0([[C:%[^,]+]] :
53
53
// CHECK: [[BORROW_MAYBE_C:%[^,]+]] = function_ref @borrowMaybeC
54
54
// CHECK: [[B:%[^,]+]] = begin_borrow [[C]]
55
- // CHECK: [[MAYBE_B:%[^,]+]] = unchecked_ref_cast [[B]] to $Optional<C>
55
+ // CHECK: [[MAYBE_B:%[^,]+]] = unchecked_ref_cast [[B]] : $C to $Optional<C>
56
56
// CHECK: apply [[BORROW_MAYBE_C]]([[MAYBE_B]])
57
57
// CHECK: end_borrow [[B]]
58
58
// CHECK: destroy_value [[C]]
59
59
// CHECK-LABEL: } // end sil function 'convert_function__to_optional__owned_as_guaranteed__1'
60
60
sil [ossa] @convert_function__to_optional__owned_as_guaranteed__1 : $@convention(thin) (@owned C) -> () {
61
61
entry(%c : @owned $C):
62
62
%borrowMaybeC = function_ref @borrowMaybeC : $@convention(thin) (@guaranteed Optional<C>) -> ()
63
- %borrowC = convert_function %borrowMaybeC to $@convention(thin) (@guaranteed C) -> ()
63
+ %borrowC = convert_function %borrowMaybeC : $@convention(thin) (@guaranteed Optional<C>) -> () to $@convention(thin) (@guaranteed C) -> ()
64
64
%void = apply %borrowC(%c) : $@convention(thin) (@guaranteed C) -> ()
65
65
specify_test "sil_combine_instruction %void"
66
- destroy_value %c
66
+ destroy_value %c : $C
67
67
%retval = tuple ()
68
- return %retval
68
+ return %retval : $()
69
69
}
70
70
71
71
// CHECK-LABEL: sil [ossa] @convert_function__to_optional__owned_as_guaranteed__2 : {{.*}} {
@@ -75,9 +75,9 @@ entry(%c : @owned $C):
75
75
// CHECK-SAME: ):
76
76
// CHECK: [[BORROW_MAYBE_C2:%[^,]+]] = function_ref @borrowMaybeC2
77
77
// CHECK: [[B:%[^,]+]] = begin_borrow [[C]]
78
- // CHECK: [[MAYBE_B:%[^,]+]] = unchecked_ref_cast [[B]] to $Optional<C>
78
+ // CHECK: [[MAYBE_B:%[^,]+]] = unchecked_ref_cast [[B]] : $C to $Optional<C>
79
79
// CHECK: [[B2:%[^,]+]] = begin_borrow [[C2]]
80
- // CHECK: [[MAYBE_B2:%[^,]+]] = unchecked_ref_cast [[B2]] to $Optional<C>
80
+ // CHECK: [[MAYBE_B2:%[^,]+]] = unchecked_ref_cast [[B2]] : $C to $Optional<C>
81
81
// CHECK: apply [[BORROW_MAYBE_C2]]([[MAYBE_B]], [[MAYBE_B2]])
82
82
// CHECK: end_borrow [[B]]
83
83
// CHECK: end_borrow [[B2]]
@@ -87,20 +87,20 @@ entry(%c : @owned $C):
87
87
sil [ossa] @convert_function__to_optional__owned_as_guaranteed__2 : $@convention(thin) (@owned C, @owned C) -> () {
88
88
entry(%c : @owned $C, %c2 : @owned $C):
89
89
%borrowMaybeC2 = function_ref @borrowMaybeC2 : $@convention(thin) (@guaranteed Optional<C>, @guaranteed Optional<C>) -> ()
90
- %borrowC2 = convert_function %borrowMaybeC2 to $@convention(thin) (@guaranteed C, @guaranteed C) -> ()
90
+ %borrowC2 = convert_function %borrowMaybeC2 : $@convention(thin) (@guaranteed Optional<C>, @guaranteed Optional<C>) -> () to $@convention(thin) (@guaranteed C, @guaranteed C) -> ()
91
91
%void = apply %borrowC2(%c, %c2) : $@convention(thin) (@guaranteed C, @guaranteed C) -> ()
92
92
specify_test "sil_combine_instruction %void"
93
- destroy_value %c
94
- destroy_value %c2
93
+ destroy_value %c : $C
94
+ destroy_value %c2 : $C
95
95
%retval = tuple ()
96
- return %retval
96
+ return %retval : $()
97
97
}
98
98
99
99
// CHECK-LABEL: sil [ossa] @convert_function__to_optional__owned_as_guaranteed__3 : {{.*}} {
100
100
// CHECK: bb0([[C:%[^,]+]] :
101
101
// CHECK: [[BORROW_MAYBE_C:%[^,]+]] = function_ref @borrowMaybeCThrowing
102
102
// CHECK: [[B:%[^,]+]] = begin_borrow [[C]]
103
- // CHECK: [[MAYBE_B:%[^,]+]] = unchecked_ref_cast [[B]] to $Optional<C>
103
+ // CHECK: [[MAYBE_B:%[^,]+]] = unchecked_ref_cast [[B]] : $C to $Optional<C>
104
104
// CHECK: try_apply [[BORROW_MAYBE_C]]([[MAYBE_B]])
105
105
// CHECK: normal [[SUCCESS:bb[0-9]+]]
106
106
// CHECK: error [[FAILURE:bb[0-9]+]]
@@ -115,20 +115,20 @@ entry(%c : @owned $C, %c2 : @owned $C):
115
115
sil [ossa] @convert_function__to_optional__owned_as_guaranteed__3 : $@convention(thin) (@owned C) -> (@error Error) {
116
116
entry(%c : @owned $C):
117
117
%borrowMaybeC = function_ref @borrowMaybeCThrowing : $@convention(thin) (@guaranteed Optional<C>) -> (@error Error)
118
- %borrowC = convert_function %borrowMaybeC to $@convention(thin) (@guaranteed C) -> (@error Error)
118
+ %borrowC = convert_function %borrowMaybeC : $@convention(thin) (@guaranteed Optional<C>) -> (@error Error) to $@convention(thin) (@guaranteed C) -> (@error Error)
119
119
specify_test "sil_combine_instruction @instruction"
120
120
try_apply %borrowC(%c) : $@convention(thin) (@guaranteed C) -> (@error Error),
121
121
normal success,
122
122
error failure
123
123
124
124
success(%void : $()):
125
- destroy_value %c
125
+ destroy_value %c : $C
126
126
%retval = tuple ()
127
- return %retval
127
+ return %retval : $()
128
128
129
129
failure(%error : @owned $Error):
130
- destroy_value %c
131
- throw %error
130
+ destroy_value %c : $C
131
+ throw %error : $Error
132
132
}
133
133
134
134
// CHECK-LABEL: sil [ossa] @convert_function__to_optional__owned_as_guaranteed__4 : {{.*}} {
@@ -138,9 +138,9 @@ failure(%error : @owned $Error):
138
138
// CHECK-SAME: ):
139
139
// CHECK: [[BORROW_MAYBE_C2:%[^,]+]] = function_ref @borrowMaybeC2Throwing
140
140
// CHECK: [[B:%[^,]+]] = begin_borrow [[C]]
141
- // CHECK: [[MAYBE_B:%[^,]+]] = unchecked_ref_cast [[B]] to $Optional<C>
141
+ // CHECK: [[MAYBE_B:%[^,]+]] = unchecked_ref_cast [[B]] : $C to $Optional<C>
142
142
// CHECK: [[B2:%[^,]+]] = begin_borrow [[C2]]
143
- // CHECK: [[MAYBE_B2:%[^,]+]] = unchecked_ref_cast [[B2]] to $Optional<C>
143
+ // CHECK: [[MAYBE_B2:%[^,]+]] = unchecked_ref_cast [[B2]] : $C to $Optional<C>
144
144
// CHECK: try_apply [[BORROW_MAYBE_C2]]([[MAYBE_B]], [[MAYBE_B2]])
145
145
// CHECK: normal [[SUCCESS:bb[0-9]+]]
146
146
// CHECK: error [[FAILURE:bb[0-9]+]]
@@ -159,20 +159,20 @@ failure(%error : @owned $Error):
159
159
sil [ossa] @convert_function__to_optional__owned_as_guaranteed__4 : $@convention(thin) (@owned C, @owned C) -> (@error Error) {
160
160
entry(%c : @owned $C, %c2 : @owned $C):
161
161
%borrowMaybeC2 = function_ref @borrowMaybeC2Throwing : $@convention(thin) (@guaranteed Optional<C>, @guaranteed Optional<C>) -> (@error Error)
162
- %borrowC2 = convert_function %borrowMaybeC2 to $@convention(thin) (@guaranteed C, @guaranteed C) -> (@error Error)
162
+ %borrowC2 = convert_function %borrowMaybeC2 : $@convention(thin) (@guaranteed Optional<C>, @guaranteed Optional<C>) -> (@error Error) to $@convention(thin) (@guaranteed C, @guaranteed C) -> (@error Error)
163
163
specify_test "sil_combine_instruction @instruction"
164
164
try_apply %borrowC2(%c, %c2) : $@convention(thin) (@guaranteed C, @guaranteed C) -> (@error Error),
165
165
normal success,
166
166
error failure
167
167
168
168
success(%void : $()):
169
- destroy_value %c
170
- destroy_value %c2
169
+ destroy_value %c : $C
170
+ destroy_value %c2 : $C
171
171
%retval = tuple ()
172
- return %retval
172
+ return %retval : $()
173
173
174
174
failure(%error : @owned $Error):
175
- destroy_value %c
176
- destroy_value %c2
177
- throw %error
175
+ destroy_value %c : $C
176
+ destroy_value %c2 : $C
177
+ throw %error : $Error
178
178
}
0 commit comments