@@ -110,12 +110,12 @@ bb0:
110
110
}
111
111
112
112
protocol P {
113
- func foo() -> Int
113
+ func foo() -> Int64
114
114
}
115
115
116
116
struct X : P {
117
- var xx : Int
118
- func foo() -> Int
117
+ var xx : Int64
118
+ func foo() -> Int64
119
119
}
120
120
121
121
// CHECK-LABEL: sil @promote_over_control_flow
@@ -125,13 +125,13 @@ struct X : P {
125
125
// CHECK-NEXT: apply
126
126
// CHECK-NOT: open_existential_addr
127
127
// CHECK: return
128
- sil @promote_over_control_flow : $@convention(thin) () -> Int {
128
+ sil @promote_over_control_flow : $@convention(thin) () -> Int64 {
129
129
bb0:
130
130
%2 = alloc_stack $P, let, name "p"
131
131
%3 = init_existential_addr %2 : $*P, $X
132
132
%6 = integer_literal $Builtin.Int64, 27
133
- %7 = struct $Int (%6 : $Builtin.Int64)
134
- %8 = struct $X (%7 : $Int )
133
+ %7 = struct $Int64 (%6 : $Builtin.Int64)
134
+ %8 = struct $X (%7 : $Int64 )
135
135
store %8 to %3 : $*X
136
136
cond_br undef, bb1, bb2
137
137
@@ -140,55 +140,55 @@ bb1:
140
140
141
141
bb2:
142
142
%10 = open_existential_addr %2 : $*P to $*@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P
143
- %11 = witness_method $@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P, #P.foo!1, %10 : $*@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int
144
- %12 = apply %11<@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P>(%10) : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int
143
+ %11 = witness_method $@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P, #P.foo!1, %10 : $*@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int64
144
+ %12 = apply %11<@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P>(%10) : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int64
145
145
destroy_addr %2 : $*P
146
146
dealloc_stack %2 : $*P
147
- return %12 : $Int
147
+ return %12 : $Int64
148
148
}
149
149
150
150
// CHECK-LABEL: sil @existential_is_overwritten_by_store
151
151
// CHECK: open_existential_addr
152
152
// CHECK-NEXT: witness_method
153
153
// CHECK-NEXT: apply
154
- sil @existential_is_overwritten_by_store : $@convention(thin) (P) -> Int {
154
+ sil @existential_is_overwritten_by_store : $@convention(thin) (P) -> Int64 {
155
155
bb0(%0 : $P):
156
156
%2 = alloc_stack $P, let, name "p"
157
157
%3 = init_existential_addr %2 : $*P, $X
158
158
%6 = integer_literal $Builtin.Int64, 27
159
- %7 = struct $Int (%6 : $Builtin.Int64)
160
- %8 = struct $X (%7 : $Int )
159
+ %7 = struct $Int64 (%6 : $Builtin.Int64)
160
+ %8 = struct $X (%7 : $Int64 )
161
161
store %8 to %3 : $*X
162
162
destroy_addr %2 : $*P
163
163
store %0 to %2 : $*P
164
164
%10 = open_existential_addr %2 : $*P to $*@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P
165
- %11 = witness_method $@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P, #P.foo!1, %10 : $*@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int
166
- %12 = apply %11<@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P>(%10) : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int
165
+ %11 = witness_method $@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P, #P.foo!1, %10 : $*@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int64
166
+ %12 = apply %11<@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P>(%10) : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int64
167
167
dealloc_stack %2 : $*P
168
- return %12 : $Int
168
+ return %12 : $Int64
169
169
}
170
170
171
171
// CHECK-LABEL: sil @existential_is_overwritten_by_call
172
172
// CHECK: open_existential_addr
173
173
// CHECK-NEXT: witness_method
174
174
// CHECK-NEXT: apply
175
175
// CHECK: return
176
- sil @existential_is_overwritten_by_call : $@convention(thin) () -> Int {
176
+ sil @existential_is_overwritten_by_call : $@convention(thin) () -> Int64 {
177
177
bb0:
178
178
%2 = alloc_stack $P, let, name "p"
179
179
%3 = init_existential_addr %2 : $*P, $X
180
180
%6 = integer_literal $Builtin.Int64, 27
181
- %7 = struct $Int (%6 : $Builtin.Int64)
182
- %8 = struct $X (%7 : $Int )
181
+ %7 = struct $Int64 (%6 : $Builtin.Int64)
182
+ %8 = struct $X (%7 : $Int64 )
183
183
store %8 to %3 : $*X
184
184
destroy_addr %2 : $*P
185
185
%f = function_ref @write_p : $@convention(thin) (@out P) -> ()
186
186
%a = apply %f(%2) : $@convention(thin) (@out P) -> ()
187
187
%10 = open_existential_addr %2 : $*P to $*@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P
188
- %11 = witness_method $@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P, #P.foo!1, %10 : $*@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int
189
- %12 = apply %11<@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P>(%10) : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int
188
+ %11 = witness_method $@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P, #P.foo!1, %10 : $*@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int64
189
+ %12 = apply %11<@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P>(%10) : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int64
190
190
dealloc_stack %2 : $*P
191
- return %12 : $Int
191
+ return %12 : $Int64
192
192
}
193
193
194
194
// CHECK-LABEL: sil @existential_is_not_overwritten_by_call
@@ -197,29 +197,29 @@ bb0:
197
197
// CHECK-NEXT: apply
198
198
// CHECK-NOT: open_existential_addr
199
199
// CHECK: return
200
- sil @existential_is_not_overwritten_by_call : $@convention(thin) () -> Int {
200
+ sil @existential_is_not_overwritten_by_call : $@convention(thin) () -> Int64 {
201
201
bb0:
202
202
%2 = alloc_stack $P, let, name "p"
203
203
%3 = init_existential_addr %2 : $*P, $X
204
204
%6 = integer_literal $Builtin.Int64, 27
205
- %7 = struct $Int (%6 : $Builtin.Int64)
206
- %8 = struct $X (%7 : $Int )
205
+ %7 = struct $Int64 (%6 : $Builtin.Int64)
206
+ %8 = struct $X (%7 : $Int64 )
207
207
store %8 to %3 : $*X
208
208
%f = function_ref @read_p : $@convention(thin) (@in P) -> ()
209
209
%a = apply %f(%2) : $@convention(thin) (@in P) -> ()
210
210
%10 = open_existential_addr %2 : $*P to $*@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P
211
- %11 = witness_method $@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P, #P.foo!1, %10 : $*@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int
212
- %12 = apply %11<@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P>(%10) : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int
211
+ %11 = witness_method $@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P, #P.foo!1, %10 : $*@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int64
212
+ %12 = apply %11<@opened("C22498FA-CABF-11E5-B9A9-685B35C48C83") P>(%10) : $@convention(witness_method) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> Int64
213
213
destroy_addr %2 : $*P
214
214
dealloc_stack %2 : $*P
215
- return %12 : $Int
215
+ return %12 : $Int64
216
216
}
217
217
218
218
sil @write_p : $@convention(thin) (@out P) -> ()
219
219
220
220
sil @read_p : $@convention(thin) (@in P) -> ()
221
221
222
- sil @foo_witness : $@convention(witness_method) (@in_guaranteed X) -> Int
222
+ sil @foo_witness : $@convention(witness_method) (@in_guaranteed X) -> Int64
223
223
224
224
sil_witness_table hidden X: P module nix {
225
225
method #P.foo!1: @foo_witness
0 commit comments