Author: Cyndy Ishida Date: 2024-02-29T21:42:43-08:00 New Revision: 8116dfb8b58a65e78e341f09f5728d345f086b7b
URL: https://github.com/llvm/llvm-project/commit/8116dfb8b58a65e78e341f09f5728d345f086b7b DIFF: https://github.com/llvm/llvm-project/commit/8116dfb8b58a65e78e341f09f5728d345f086b7b.diff LOG: [InstallAPI] Use unique identifiers for input buffers (#83523) Added: Modified: clang/lib/InstallAPI/Frontend.cpp Removed: ################################################################################ diff --git a/clang/lib/InstallAPI/Frontend.cpp b/clang/lib/InstallAPI/Frontend.cpp index 9f675ef7d1bd22..133e49230ffa9b 100644 --- a/clang/lib/InstallAPI/Frontend.cpp +++ b/clang/lib/InstallAPI/Frontend.cpp @@ -51,8 +51,10 @@ std::unique_ptr<MemoryBuffer> createInputBuffer(const InstallAPIContext &Ctx) { if (Contents.empty()) return nullptr; - return llvm::MemoryBuffer::getMemBufferCopy( - Contents, "installapi-includes" + getFileExtension(Ctx.LangMode)); + SmallString<64> BufferName( + {"installapi-includes-", Ctx.Slice->getTriple().str(), "-", + getName(Ctx.Type), getFileExtension(Ctx.LangMode)}); + return llvm::MemoryBuffer::getMemBufferCopy(Contents, BufferName); } } // namespace clang::installapi _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits