@@ -832,7 +832,7 @@ FileID SourceManager::getFileIDLocal(SourceLocation::UIntTy SLocOffset) const {
832
832
// SLocOffset.
833
833
unsigned LessIndex = 0 ;
834
834
// upper bound of the search range.
835
- unsigned GreaterIndex = LocalSLocEntryTable .size ();
835
+ unsigned GreaterIndex = LocalLocOffsetTable .size ();
836
836
// Use the LastFileIDLookup to prune the search space.
837
837
if (LastLookupStartOffset < SLocOffset)
838
838
LessIndex = LastFileIDLookup.ID ;
@@ -848,11 +848,11 @@ FileID SourceManager::getFileIDLocal(SourceLocation::UIntTy SLocOffset) const {
848
848
FileID Res = FileID::get (int (GreaterIndex));
849
849
// Remember it. We have good locality across FileID lookups.
850
850
LastFileIDLookup = Res;
851
- LastLookupStartOffset = LocalSLocEntryTable [GreaterIndex]. getOffset () ;
851
+ LastLookupStartOffset = LocalLocOffsetTable [GreaterIndex];
852
852
LastLookupEndOffset =
853
- GreaterIndex + 1 >= LocalSLocEntryTable .size ()
853
+ GreaterIndex + 1 >= LocalLocOffsetTable .size ()
854
854
? NextLocalOffset
855
- : LocalSLocEntryTable [GreaterIndex + 1 ]. getOffset () ;
855
+ : LocalLocOffsetTable [GreaterIndex + 1 ];
856
856
NumLinearScans += NumProbes + 1 ;
857
857
return Res;
858
858
}
@@ -873,8 +873,8 @@ FileID SourceManager::getFileIDLocal(SourceLocation::UIntTy SLocOffset) const {
873
873
// At this point, LessIndex is the index of the *first element greater than*
874
874
// SLocOffset. The element we are actually looking for is the one immediately
875
875
// before it.
876
- LastLookupStartOffset = LocalSLocEntryTable [LessIndex - 1 ]. getOffset () ;
877
- LastLookupEndOffset = LocalSLocEntryTable [LessIndex]. getOffset () ;
876
+ LastLookupStartOffset = LocalLocOffsetTable [LessIndex - 1 ];
877
+ LastLookupEndOffset = LocalLocOffsetTable [LessIndex];
878
878
return LastFileIDLookup = FileID::get (LessIndex - 1 );
879
879
}
880
880
0 commit comments