[PATCH] D97600: [lld-macho] Implement options -rename_section -rename_segment
Greg McGary via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 21:44:28 PST 2021
gkm marked 4 inline comments as done.
gkm added inline comments.
================
Comment at: lld/MachO/Config.h:29-30
+using NamePair = std::pair<llvm::StringRef, llvm::StringRef>;
+using SectionRenameMap = std::map<NamePair, NamePair>;
+using SegmentRenameMap = std::map<llvm::StringRef, llvm::StringRef>;
+
----------------
int3 wrote:
> try to avoid `std::map` in general (as per the [[ https://llvm.org/docs/ProgrammersManual.html#map-like-containers-std-map-densemap-etc | LLVM programmer's manual ]]). In this case we could use a DenseMap of NamePair and a DenseMap of CachedHashStringRef respectively
Why `CachedHashStringRef` ? Is that supposed to give us some code sharing, at the expense of clarity?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97600/new/
https://reviews.llvm.org/D97600
More information about the llvm-commits
mailing list