[lld] [LTO][ELF][lld] Use unique string saver in ELF bitcode symbol parsing (PR #106670)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 00:47:47 PDT 2024
================
@@ -1712,8 +1728,8 @@ BitcodeFile::BitcodeFile(MemoryBufferRef mb, StringRef archiveName,
// symbols later in the link stage). So we append file offset to make
// filename unique.
StringRef name = archiveName.empty()
- ? saver().save(path)
- : saver().save(archiveName + "(" + path::filename(path) +
+ ? saved_symbol(path)
+ : saved_symbol(archiveName + "(" + path::filename(path) +
----------------
minglotus-6 wrote:
I was thinking of `BitcodeFile::saved_symbol` as helper functions to make it more explicit that bitcode file uses unique saver.
Now I use `saver()` or `unique_saver()` from linker context directly (for simpler code) and add comment around to explain the motivation.
https://github.com/llvm/llvm-project/pull/106670
More information about the llvm-commits
mailing list