Skip to content

Commit 8116dfb

Browse files
authored
[InstallAPI] Use unique identifiers for input buffers (#83523)
1 parent 8fd011e commit 8116dfb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang/lib/InstallAPI/Frontend.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ std::unique_ptr<MemoryBuffer> createInputBuffer(const InstallAPIContext &Ctx) {
5151
if (Contents.empty())
5252
return nullptr;
5353

54-
return llvm::MemoryBuffer::getMemBufferCopy(
55-
Contents, "installapi-includes" + getFileExtension(Ctx.LangMode));
54+
SmallString<64> BufferName(
55+
{"installapi-includes-", Ctx.Slice->getTriple().str(), "-",
56+
getName(Ctx.Type), getFileExtension(Ctx.LangMode)});
57+
return llvm::MemoryBuffer::getMemBufferCopy(Contents, BufferName);
5658
}
5759

5860
} // namespace clang::installapi

0 commit comments

Comments
 (0)