remove variadics, default args etc, from tuple patterns, and simplify

the Pattern::clone interface now that the complexity isn't needed.
This also removes support for serializing this state.
This commit is contained in:
Chris Lattner
2015-12-31 20:11:15 -08:00
parent 78be05921d
commit cc3f173040
15 changed files with 51 additions and 267 deletions

View File

@@ -1781,15 +1781,10 @@ namespace {
tupleTypeElts.reserve(tuplePat->getNumElements());
for (unsigned i = 0, e = tuplePat->getNumElements(); i != e; ++i) {
auto &tupleElt = tuplePat->getElement(i);
bool hasEllipsis = tupleElt.hasEllipsis();
Type eltTy = getTypeForPattern(tupleElt.getPattern(),forFunctionParam,
locator.withPathElement(
LocatorPathElt::getTupleElement(i)));
Type varArgBaseTy;
tupleTypeElts.push_back(TupleTypeElt(eltTy, tupleElt.getLabel(),
tupleElt.getDefaultArgKind(),
hasEllipsis));
tupleTypeElts.push_back(TupleTypeElt(eltTy, tupleElt.getLabel()));
}
return TupleType::get(tupleTypeElts, CS.getASTContext());
}