File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
lib/SILOptimizer/Mandatory Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -347,6 +347,11 @@ static bool isStoreCopy(SILValue value) {
347
347
if (!copyInst->hasOneUse ())
348
348
return false ;
349
349
350
+ auto *user = value->getSingleUse ()->getUser ();
351
+ auto *storeInst = dyn_cast<StoreInst>(user);
352
+ if (!storeInst)
353
+ return false ;
354
+
350
355
auto source = copyInst->getOperand ();
351
356
if (source->getOwnershipKind () == OwnershipKind::Guaranteed) {
352
357
// [in_guaranteed_begin_apply_results] If any root of the source is a
@@ -367,8 +372,7 @@ static bool isStoreCopy(SILValue value) {
367
372
}
368
373
}
369
374
370
- auto *user = value->getSingleUse ()->getUser ();
371
- return isa<StoreInst>(user);
375
+ return true ;
372
376
}
373
377
374
378
void ValueStorageMap::insertValue (SILValue value, SILValue storageAddress) {
You can’t perform that action at this time.
0 commit comments