[PATCH] D102964: [lld-macho] Implement cstring deduplication
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 7 16:03:16 PDT 2021
alexshap added inline comments.
================
Comment at: lld/MachO/InputSection.h:76
+protected:
+ InputSection(Kind kind) : sectionKind(kind) {}
+
----------------
explicit
================
Comment at: lld/MachO/InputSection.h:124
+ // Find the StringPiece that contains this offset.
+ const StringPiece *getStringPiece(uint64_t off) const;
+ // Split at each null byte.
----------------
khm, wouldn't
```
const StringPiece &getStringPiece(uint64_t offset) const
```
be a cleaner interface ?
================
Comment at: lld/MachO/InputSection.h:142
+
+ std::vector<StringPiece> pieces;
};
----------------
does it need to be `public` ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102964/new/
https://reviews.llvm.org/D102964
More information about the llvm-commits
mailing list