Merge pull request #26735 from jrose-apple/heart-healthy

[Serialization] Remove several unnecessary bits of helper logic
This commit is contained in:
Jordan Rose
2019-08-20 16:20:35 -07:00
committed by GitHub
3 changed files with 23 additions and 70 deletions

View File

@@ -1207,11 +1207,12 @@ ModuleDecl::ReverseFullNameIterator::operator++() {
}
void
ModuleDecl::ReverseFullNameIterator::printForward(raw_ostream &out) const {
ModuleDecl::ReverseFullNameIterator::printForward(raw_ostream &out,
StringRef delim) const {
SmallVector<StringRef, 8> elements(*this, {});
swift::interleave(swift::reversed(elements),
[&out](StringRef next) { out << next; },
[&out] { out << '.'; });
[&out, delim] { out << delim; });
}
void