[Type checker] Requestify the formation of an abstract generic signature

Introduce a request to form an abstract generic signature given a
base signature, additional generic parameters, and additional
requirements. It is meant to provide a caching layer in front of the
generic signature builder.

Switch one direct client of the generic signature builder over to this
mechanism, the formation of a generic signature for an existential
type.
This commit is contained in:
Doug Gregor
2019-08-22 15:39:09 -07:00
parent 364c926180
commit a23a4353cb
13 changed files with 163 additions and 10 deletions

View File

@@ -121,6 +121,20 @@ namespace swift {
}
out << "}";
}
template<typename T>
void simple_display(llvm::raw_ostream &out,
const llvm::SmallVectorImpl<T> &vec) {
out << "{";
bool first = true;
for (const T &value : vec) {
if (first) first = false;
else out << ", ";
simple_display(out, value);
}
out << "}";
}
}
#endif // SWIFT_BASIC_SIMPLE_DISPLAY_H