[lld] [LTO][ELF][lld] Use unique string saver in ELF bitcode symbol parsing (PR #106670)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 08:07:12 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) +
----------------
teresajohnson wrote:

Why not just use unique_saver().save() directly like you do below on line 1764?

https://github.com/llvm/llvm-project/pull/106670


More information about the llvm-commits mailing list