@@ -147,7 +147,7 @@ private func findInitStores(of object: Value,
147
147
return false
148
148
}
149
149
default :
150
- if !isValidUseOfObject( use. instruction ) {
150
+ if !isValidUseOfObject( use) {
151
151
return false
152
152
}
153
153
}
@@ -184,7 +184,7 @@ private func findStores(toTailAddress tailAddr: Value, tailElementIndex: Int, st
184
184
return false
185
185
}
186
186
default :
187
- if !isValidUseOfObject( use. instruction ) {
187
+ if !isValidUseOfObject( use) {
188
188
return false
189
189
}
190
190
}
@@ -198,7 +198,7 @@ private func findStores(inUsesOf address: Value, index: Int, stores: inout [Stor
198
198
if !handleStore( store, index: index, stores: & stores) {
199
199
return false
200
200
}
201
- } else if !isValidUseOfObject( use. instruction ) {
201
+ } else if !isValidUseOfObject( use) {
202
202
return false
203
203
}
204
204
}
@@ -215,7 +215,8 @@ private func handleStore(_ store: StoreInst, index: Int, stores: inout [StoreIns
215
215
return false
216
216
}
217
217
218
- private func isValidUseOfObject( _ inst: Instruction ) -> Bool {
218
+ private func isValidUseOfObject( _ use: Operand ) -> Bool {
219
+ let inst = use. instruction
219
220
switch inst {
220
221
case is DebugValueInst ,
221
222
is LoadInst ,
@@ -240,7 +241,7 @@ private func isValidUseOfObject(_ inst: Instruction) -> Bool {
240
241
is RefTailAddrInst ,
241
242
is RefElementAddrInst :
242
243
for use in ( inst as! SingleValueInstruction ) . uses {
243
- if !isValidUseOfObject( use. instruction ) {
244
+ if !isValidUseOfObject( use) {
244
245
return false
245
246
}
246
247
}
0 commit comments