[move-only] Teach deinit devirtualization how to handle devirtualizing a deinit of a resilient type.

Specifically, such a type has an @in convention for its deinit and the pass was
setup expecting self to always be @owned.

rdar://109904633
This commit is contained in:
Michael Gottesman
2023-05-26 13:09:48 -07:00
parent 8579c1924d
commit 1d04df9155
3 changed files with 428 additions and 5 deletions

View File

@@ -371,6 +371,11 @@ public:
return getNumIndirectSILResults();
}
/// Returns the index of self.
unsigned getSILArgIndexOfSelf() const {
return getSILArgIndexOfFirstParam() + getNumParameters() - 1;
}
/// Get the index into formal indirect results corresponding to the given SIL
/// indirect result argument index.
unsigned getIndirectFormalResultIndexForSILArg(unsigned argIdx) const {