[Basic] Don't rewrite source buffer copy multiple times

The on-disc buffer file name was not recorded correctly.

rdar://130478685
This commit is contained in:
Rintaro Ishizaki
2024-07-09 14:36:56 -07:00
parent ad61e531a3
commit 90c2975d66
4 changed files with 9 additions and 9 deletions

View File

@@ -71,7 +71,7 @@ public:
/// The name of the source file on disk that was created to hold the
/// contents of this file for external clients.
StringRef onDiskBufferCopyFileName = StringRef();
mutable StringRef onDiskBufferCopyFileName = StringRef();
/// Contains the ancestors of this source buffer, starting with the root source
/// buffer and ending at this source buffer.
@@ -209,8 +209,7 @@ public:
bool hasGeneratedSourceInfo(unsigned bufferID);
/// Retrieve the generated source information for the given buffer.
std::optional<GeneratedSourceInfo>
getGeneratedSourceInfo(unsigned bufferID) const;
const GeneratedSourceInfo *getGeneratedSourceInfo(unsigned bufferID) const;
/// Retrieve the list of ancestors of the given source buffer, starting with
/// the root buffer and proceding to the given buffer ID at the end.