Skip to content

Commit df8c61d

Browse files
committed
Don't rebuild the source location -> source file map every time we lookup.
We forgot to update the variables that track when we need a rebuild. Fixes rdar://105092020.
1 parent 70a1f9f commit df8c61d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/AST/Module.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,9 @@ void ModuleDecl::updateSourceFileLocationMap() {
598598
std::sort(sourceFileLocationMap->allSourceFiles.begin(),
599599
sourceFileLocationMap->allSourceFiles.end(),
600600
SourceFileRangeComparison{&getASTContext().SourceMgr});
601+
602+
sourceFileLocationMap->numFiles = files.size();
603+
sourceFileLocationMap->numAuxiliaryFiles = AuxiliaryFiles.size();
601604
}
602605

603606
SourceFile *ModuleDecl::getSourceFileContainingLocation(SourceLoc loc) {

0 commit comments

Comments
 (0)