Skip to content

Commit 83e5d54

Browse files
committed
[Serialization] Rename helper struct to match its use
Once upon a time this /was/ an OffsetAndKind pair, but it's been a DeclAndOffset pair since my last refactoring. No functionality change.
1 parent 57b1ea8 commit 83e5d54

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/Serialization/Deserialization.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ StringRef swift::getNameOfModule(const ModuleFile *MF) {
5757
}
5858

5959
namespace {
60-
struct OffsetAndKind {
60+
struct DeclAndOffset {
6161
const Decl *D;
6262
uint64_t offset;
6363
};
6464

65-
static raw_ostream &operator<<(raw_ostream &os, OffsetAndKind &&pair) {
65+
static raw_ostream &operator<<(raw_ostream &os, DeclAndOffset &&pair) {
6666
return os << Decl::getKindName(pair.D->getKind())
6767
<< "Decl @ " << pair.offset;
6868
}
@@ -97,13 +97,13 @@ namespace {
9797
os << "While deserializing ";
9898

9999
if (auto VD = dyn_cast<ValueDecl>(DeclOrOffset.get())) {
100-
os << "'" << VD->getBaseName() << "' (" << OffsetAndKind{VD, offset}
100+
os << "'" << VD->getBaseName() << "' (" << DeclAndOffset{VD, offset}
101101
<< ")";
102102
} else if (auto ED = dyn_cast<ExtensionDecl>(DeclOrOffset.get())) {
103103
os << "extension of '" << ED->getExtendedType() << "' ("
104-
<< OffsetAndKind{ED, offset} << ")";
104+
<< DeclAndOffset{ED, offset} << ")";
105105
} else {
106-
os << OffsetAndKind{DeclOrOffset.get(), offset};
106+
os << DeclAndOffset{DeclOrOffset.get(), offset};
107107
}
108108
}
109109
os << " in '" << getNameOfModule(MF) << "'\n";

0 commit comments

Comments
 (0)