[PATCH] D93362: [llvm-elfabi] Support ELF file that lacks .gnu.hash section
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 06:39:20 PST 2021
jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.
I don't think I've got any more comments. Please wait for others too though.
================
Comment at: llvm/include/llvm/Object/ELF.h:567-569
+ "SHT_DYNSYM section has sh_size (" + Twine(Sec.sh_size).str() +
+ ") % sh_entsize (" + Twine(Sec.sh_entsize).str() +
+ ") that is not 0");
----------------
haowei wrote:
> jhenderson wrote:
> > `Twine + Twine` produces a new `Twine`, and IIRC string literals get converted to `Twine`s to allow this to happen. `Twine` is intended for efficient string concatenation, so you concatenate all the `Twine` instances, and then convert it to a string using `.str()` as demonstrated.
> Actually createStringError can take a `const Twine &` parameter directly, so I removed str() since it is not necessary. Does it look good?
Yes, that looks fine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93362/new/
https://reviews.llvm.org/D93362
More information about the llvm-commits
mailing list