[PATCH] D55860: [Object] Deduplicate long archive member names
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 19 07:57:51 PST 2018
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lib/Object/ArchiveWriter.cpp:276-277
+ MemberNames[M.MemberName] = NamePos;
+ } else
+ NamePos = it->second;
+ }
----------------
nit: if previous `if` is enclosed with {}, so should be `else`.
================
Comment at: lib/Object/ArchiveWriter.cpp:449
+ // Deduplicate long member names in the string table and reuse earlier name
+ // offsets. This is especially important for COFF Import libraries.
+ StringMap<uint64_t> MemberNames;
----------------
I'd think "important" is a bit too strong. Maybe I'd say something like doing this saves space especially for COFF import libraries where all members have the same filename.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55860/new/
https://reviews.llvm.org/D55860
More information about the llvm-commits
mailing list