Skip to content

Commit c07b3b0

Browse files
authored
NFC: add operator<< for SubstitutionMap. (swiftlang#32637)
This facilitates debugging.
1 parent 7b54e8b commit c07b3b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/swift/AST/SubstitutionMap.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,12 @@ class SubstitutionMap {
286286
Type lookupSubstitution(CanSubstitutableType type) const;
287287
};
288288

289+
inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
290+
const SubstitutionMap &subs) {
291+
subs.dump(OS);
292+
return OS;
293+
}
294+
289295
/// A function object suitable for use as a \c TypeSubstitutionFn that
290296
/// queries an underlying \c SubstitutionMap.
291297
struct QuerySubstitutionMap {

0 commit comments

Comments
 (0)