File tree Expand file tree Collapse file tree 6 files changed +9
-11
lines changed Expand file tree Collapse file tree 6 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -98,9 +98,7 @@ struct BasicDeclLocs {
98
98
99
99
struct BasicSourceFileInfo {
100
100
StringRef FilePath;
101
- // / Used for completion; factors in hashes from type-bodies in order to be sensitive to changes in
102
- // / the intefaces of top-level type members.
103
- Fingerprint InterfaceHashIncludingTypeMembers = Fingerprint::ZERO();
101
+ Fingerprint InterfaceHash = Fingerprint::ZERO();
104
102
llvm::sys::TimePoint<> LastModified = {};
105
103
uint64_t FileSize = 0 ;
106
104
Original file line number Diff line number Diff line change @@ -1553,7 +1553,7 @@ Fingerprint ModuleDecl::getFingerprint() const {
1553
1553
StableHasher hasher = StableHasher::defaultHasher ();
1554
1554
SmallVector<Fingerprint, 16 > FPs;
1555
1555
collectBasicSourceFileInfo ([&](const BasicSourceFileInfo &bsfi) {
1556
- FPs.emplace_back (bsfi.InterfaceHashIncludingTypeMembers );
1556
+ FPs.emplace_back (bsfi.InterfaceHash );
1557
1557
});
1558
1558
1559
1559
// Sort the fingerprints lexicographically so we have a stable hash despite
Original file line number Diff line number Diff line change @@ -262,10 +262,10 @@ bool BasicSourceFileInfo::populate(const SourceFile *SF) {
262
262
FileSize = stat->getSize ();
263
263
264
264
if (SF->hasInterfaceHash ()) {
265
- InterfaceHashIncludingTypeMembers = SF->getInterfaceHashIncludingTypeMembers ();
265
+ InterfaceHash = SF->getInterfaceHashIncludingTypeMembers ();
266
266
} else {
267
267
// FIXME: Parse the file with EnableInterfaceHash option.
268
- InterfaceHashIncludingTypeMembers = Fingerprint::ZERO ();
268
+ InterfaceHash = Fingerprint::ZERO ();
269
269
}
270
270
271
271
return false ;
Original file line number Diff line number Diff line change @@ -978,7 +978,7 @@ void ModuleFile::collectBasicSourceFileInfo(
978
978
while (Cursor < End) {
979
979
// FilePath (byte offset in 'SourceLocsTextData').
980
980
auto fileID = endian::readNext<uint32_t , little, unaligned>(Cursor);
981
- // InterfaceHashIncludingTypeMembers (fixed length string).
981
+ // InterfaceHash (fixed length string).
982
982
auto fpStr = StringRef{reinterpret_cast <const char *>(Cursor),
983
983
Fingerprint::DIGEST_LENGTH};
984
984
Cursor += Fingerprint::DIGEST_LENGTH;
@@ -995,7 +995,7 @@ void ModuleFile::collectBasicSourceFileInfo(
995
995
BasicSourceFileInfo info;
996
996
info.FilePath = filePath;
997
997
if (auto fingerprint = Fingerprint::fromString (fpStr))
998
- info.InterfaceHashIncludingTypeMembers = fingerprint.getValue ();
998
+ info.InterfaceHash = fingerprint.getValue ();
999
999
else {
1000
1000
llvm::errs () << " Unconvertable fingerprint '" << fpStr << " '\n " ;
1001
1001
abort ();
Original file line number Diff line number Diff line change @@ -803,7 +803,7 @@ static void emitFileListRecord(llvm::BitstreamWriter &Out,
803
803
return ;
804
804
805
805
auto fileID = FWriter.getTextOffset (absolutePath);
806
- auto fingerprintStr = info.InterfaceHashIncludingTypeMembers .getRawValue ();
806
+ auto fingerprintStr = info.InterfaceHash .getRawValue ();
807
807
auto timestamp = std::chrono::duration_cast<std::chrono::nanoseconds>(
808
808
info.LastModified .time_since_epoch ())
809
809
.count ();
@@ -812,7 +812,7 @@ static void emitFileListRecord(llvm::BitstreamWriter &Out,
812
812
endian::Writer writer (out, little);
813
813
// FilePath.
814
814
writer.write <uint32_t >(fileID);
815
- // InterfaceHashIncludingTypeMembers (fixed length string).
815
+ // InterfaceHash (fixed length string).
816
816
assert (fingerprintStr.size () == Fingerprint::DIGEST_LENGTH);
817
817
out << fingerprintStr;
818
818
// LastModified (nanoseconds since epoch).
Original file line number Diff line number Diff line change @@ -2518,7 +2518,7 @@ static void printModuleMetadata(ModuleDecl *MD) {
2518
2518
});
2519
2519
MD->collectBasicSourceFileInfo ([&](const BasicSourceFileInfo &info) {
2520
2520
OS << " filepath=" << info.FilePath << " ; " ;
2521
- OS << " hash=" << info.InterfaceHashIncludingTypeMembers .getRawValue () << " ; " ;
2521
+ OS << " hash=" << info.InterfaceHash .getRawValue () << " ; " ;
2522
2522
OS << " mtime=" << info.LastModified << " ; " ;
2523
2523
OS << " size=" << info.FileSize ;
2524
2524
OS << " \n " ;
You can’t perform that action at this time.
0 commit comments