File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -974,7 +974,7 @@ void ModuleFile::collectBasicSourceFileInfo(
974
974
auto fpStr = StringRef{reinterpret_cast <const char *>(Cursor),
975
975
Fingerprint::DIGEST_LENGTH};
976
976
Cursor += Fingerprint::DIGEST_LENGTH;
977
- // LastModified (seconds since epoch).
977
+ // LastModified (nanoseconds since epoch).
978
978
auto timestamp = endian::readNext<uint64_t , little, unaligned>(Cursor);
979
979
// FileSize (num of bytes).
980
980
auto fileSize = endian::readNext<uint64_t , little, unaligned>(Cursor);
@@ -987,7 +987,8 @@ void ModuleFile::collectBasicSourceFileInfo(
987
987
BasicSourceFileInfo info;
988
988
info.FilePath = filePath;
989
989
info.InterfaceHash = Fingerprint::fromString (fpStr);
990
- info.LastModified = llvm::sys::TimePoint<>(std::chrono::seconds (timestamp));
990
+ info.LastModified =
991
+ llvm::sys::TimePoint<>(std::chrono::nanoseconds (timestamp));
991
992
info.FileSize = fileSize;
992
993
callback (info);
993
994
}
Original file line number Diff line number Diff line change @@ -804,7 +804,7 @@ static void emitFileListRecord(llvm::BitstreamWriter &Out,
804
804
805
805
auto fileID = FWriter.getTextOffset (absolutePath);
806
806
auto fingerprintStr = info.InterfaceHash .getRawValue ();
807
- auto timestamp = std::chrono::duration_cast<std::chrono::seconds >(
807
+ auto timestamp = std::chrono::duration_cast<std::chrono::nanoseconds >(
808
808
info.LastModified .time_since_epoch ())
809
809
.count ();
810
810
@@ -815,9 +815,9 @@ static void emitFileListRecord(llvm::BitstreamWriter &Out,
815
815
// InterfaceHash (fixed length string).
816
816
assert (fingerprintStr.size () == Fingerprint::DIGEST_LENGTH);
817
817
out << fingerprintStr;
818
- // LastModified.
818
+ // LastModified (nanoseconds since epoch) .
819
819
writer.write <uint64_t >(timestamp);
820
- // FileSize.
820
+ // FileSize (num of bytes) .
821
821
writer.write <uint64_t >(info.FileSize );
822
822
}
823
823
You can’t perform that action at this time.
0 commit comments