Skip to content

Commit c4e3f41

Browse files
committed
[Textual SIL] Recognize auto gen'd locations.
1 parent a191795 commit c4e3f41

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/SIL/Parser/ParseSIL.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2127,8 +2127,14 @@ bool SILParser::parseSILLocation(SILLocation &Loc) {
21272127
if (parseInteger(Column, diag::sil_invalid_column_in_sil_location))
21282128
return true;
21292129

2130-
Loc = RegularLocation(SILLocation::FilenameAndLocation::alloc(Line, Column,
2131-
P.Context.getIdentifier(File).str().data(), SILMod));
2130+
auto fnl = SILLocation::FilenameAndLocation::alloc(Line, Column,
2131+
P.Context.getIdentifier(File).str().data(), SILMod);
2132+
2133+
Loc = RegularLocation(fnl);
2134+
2135+
if (*fnl == *SILLocation::getCompilerGeneratedLoc())
2136+
Loc.markAutoGenerated();
2137+
21322138
return false;
21332139
}
21342140

0 commit comments

Comments
 (0)