mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #78361 from eeckstein/dead-obj-elimination
DeadObjectElimination: handle OSSA instructions when analyzing class destructors
This commit is contained in:
@@ -204,6 +204,10 @@ static DestructorEffects doesDestructorHaveSideEffects(AllocRefInstBase *ARI) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isa<BeginBorrowInst>(I) || isa<EndBorrowInst>(I) || isa<EndLifetimeInst>(I)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// dealloc_ref on self can be ignored, but dealloc_ref on anything else
|
||||
// cannot be eliminated.
|
||||
if (auto *DeallocRef = dyn_cast<DeallocRefInst>(&I)) {
|
||||
|
||||
Reference in New Issue
Block a user