nickdesaulniers added inline comments.
================ Comment at: llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:58-80 + std::string OldName = Name.str(); std::string NewName = (Name + ModuleId).str(); if (const auto *C = ExportGV.getComdat()) if (C->getName() == Name) RenamedComdats.try_emplace(C, ExportM.getOrInsertComdat(NewName)); ---------------- Can you avoid making a copy of the OldName by doing the `appendToCompilerUsed` BEFORE making the dangling reference via `ExportGV.setName(NewName);`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104058/new/ https://reviews.llvm.org/D104058 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits