[PATCH] D154341: use StringMap in llvm-dwp when merging debug_str.dwo section
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 5 11:38:16 PDT 2023
dblaikie added a comment.
In D154341#4471422 <https://reviews.llvm.org/D154341#4471422>, @zhuna8616 wrote:
> My bad... I forgot to convert `const char *` to `StringRef`.
>
> StringRef alone doesn't seem to do any copy. StringMap copies the key into the map. The old implementation uses `const char *` and has none of such problem. I can think of no other way to it if we persist using StringMap.
Yeah - maybe lld has something that can be generalized and avoids this issue. I think it also has multithreading in string merging too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154341/new/
https://reviews.llvm.org/D154341
More information about the llvm-commits
mailing list