mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user