One second thought: keep the interface to computeTupleShuffle consistent:

change its implementation to take a list of TupleTypeElt for both the
from/to tuple type, but provider a convenience wrapper that takes the
from/to tuple type as TupleType's.


Swift SVN r31733
This commit is contained in:
Chris Lattner
2015-09-06 22:23:25 +00:00
parent 17c3ebbd49
commit ce7bcc3bea
5 changed files with 24 additions and 15 deletions

View File

@@ -755,8 +755,7 @@ ConstraintSystem::matchTupleTypes(TupleType *tuple1, TupleType *tuple2,
// Compute the element shuffles for conversions.
SmallVector<int, 16> sources;
SmallVector<unsigned, 4> variadicArguments;
if (computeTupleShuffle(tuple1->getElements(), tuple2,
sources, variadicArguments))
if (computeTupleShuffle(tuple1, tuple2, sources, variadicArguments))
return SolutionKind::Error;
// Check each of the elements.