[NFC] Traffic in Fingerprints

This commit is contained in:
Robert Widmann
2020-11-17 21:59:43 -08:00
parent 8e5d64fa55
commit 27d29262b0
24 changed files with 72 additions and 69 deletions

View File

@@ -64,6 +64,17 @@ struct SequenceTraits<
static SourceFileDepGraphNode &element(IO &, NodeVec &vec, size_t index);
};
template <> struct ScalarTraits<swift::Fingerprint> {
static void output(const swift::Fingerprint &fp, void *c, raw_ostream &os) {
os << fp.getRawValue();
}
static StringRef input(StringRef s, void *, swift::Fingerprint &fp) {
fp = swift::Fingerprint{s.str()};
return StringRef();
}
static QuotingType mustQuote(StringRef S) { return needsQuotes(S); }
};
} // namespace yaml
} // namespace llvm