mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
DeadObjectElimination: handle OSSA instructions when analyzing class destructors
Handle typical patterns which are generated by SILGen.
This commit is contained in:
@@ -172,6 +172,7 @@ SILValue swift::stripCasts(SILValue v) {
|
||||
if (auto *svi = dyn_cast<SingleValueInstruction>(v)) {
|
||||
if (isIdentityPreservingRefCast(svi) ||
|
||||
isa<UncheckedTrivialBitCastInst>(v) || isa<MarkDependenceInst>(v) ||
|
||||
isa<UncheckedOwnershipConversionInst>(v) ||
|
||||
isa<BeginAccessInst>(v)) {
|
||||
v = cast<SingleValueInstruction>(v)->getOperand(0);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user