[PATCH] D47659: Give same-named members unique timestamps on Darwin in llvm-ar.
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 4 09:28:43 PDT 2018
JDevlieghere added inline comments.
================
Comment at: llvm/lib/Object/ArchiveWriter.cpp:467
+ // See also the functions that handle the lookup:
+ // in lldb/ ObjectContainerBSDArchive::Archive::FindObject()
+ // in llvm/tools/dsymutil: BinaryHolder::GetArchiveMemberBuffers().
----------------
Spurious space in lldb path.
================
Comment at: llvm/lib/Object/ArchiveWriter.cpp:473
+ if (UniqueTimestamps) {
+ for (const NewArchiveMember &M : NewMembers) {
+ FilenameCount[M.MemberName]++;
----------------
You could omit the braces as per the style guide.
================
Comment at: llvm/lib/Object/ArchiveWriter.cpp:501
+ // Increment timestamp for each file of a given name.
+ ModTime = sys::toTimePoint(FilenameCount[M.MemberName]++);
+ else
----------------
I wonder if we should include the original timestamp in the calculation? I don't know if it's worth the extra work of keeping track of these artificial ones, as we'd need to ensure they don't crash with real timestamps.
https://reviews.llvm.org/D47659
More information about the llvm-commits
mailing list