[PATCH] D117644: [ELF] Remove StringRefZ
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 19 01:17:37 PST 2022
arichardson added inline comments.
================
Comment at: lld/ELF/Symbols.h:250
uint8_t stOther, uint8_t type)
- : file(file), nameData(name.data), nameSize(name.size), binding(binding),
- type(type), stOther(stOther), symbolKind(k), visibility(stOther & 3),
+ : file(file), nameData(name.data()), nameSize(name.size()),
+ binding(binding), type(type), stOther(stOther), symbolKind(k),
----------------
MaskRay wrote:
> alexander-shaposhnikov wrote:
> > it looks like in both cases this code tries to "unpack" a StringRef into nameData and nameSize
> > (here and inside setName) - maybe just store StringRef itself ?
> The idea is to use 32-bit nameSize to save some space...
It might be worth adding that as comment above the two fields since I had the same thought.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117644/new/
https://reviews.llvm.org/D117644
More information about the llvm-commits
mailing list