[sil] Add support for the destructure_{struct,tuple} instructions.

rdar://31521023
This commit is contained in:
Michael Gottesman
2017-10-05 13:26:26 -07:00
committed by Michael Gottesman
parent 6df5462ee2
commit 36a8d0d5c0
21 changed files with 382 additions and 28 deletions

View File

@@ -243,6 +243,14 @@ ValueOwnershipKind::ValueOwnershipKind(StringRef S) {
Value = Result.getValue();
}
ValueOwnershipKind
ValueOwnershipKind::getProjectedOwnershipKind(SILModule &M,
SILType Proj) const {
if (Proj.isTrivial(M))
return ValueOwnershipKind::Trivial;
return *this;
}
ValueOwnershipKind SILValue::getOwnershipKind() const {
// Once we have multiple return values, this must be changed.
sil::ValueOwnershipKindClassifier Classifier;