Index: lib/LTO/ThinLTOCodeGenerator.cpp =================================================================== --- lib/LTO/ThinLTOCodeGenerator.cpp +++ lib/LTO/ThinLTOCodeGenerator.cpp @@ -535,7 +535,9 @@ } // end anonymous namespace void ThinLTOCodeGenerator::addModule(StringRef Identifier, StringRef Data) { - ThinLTOBuffer Buffer(Data, Identifier); + std::string Id = + (Twine(Identifier) + "_" + std::to_string(Modules.size())).str(); + ThinLTOBuffer Buffer(Data, std::move(Id)); LLVMContext Context; StringRef TripleStr; ErrorOr TripleOrErr = expectedToErrorOrAndEmitErrors(