[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

@@ -907,7 +907,7 @@ ModuleDecl::getOriginalLocation(SourceLoc loc) const {
SourceLoc startLoc = loc;
unsigned startBufferID = bufferID;
while (std::optional<GeneratedSourceInfo> info =
while (const GeneratedSourceInfo *info =
SM.getGeneratedSourceInfo(bufferID)) {
switch (info->kind) {
#define MACRO_ROLE(Name, Description) \