mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
llvm::SourceMgr caches the line and column of the last query. It usually scans from that position for subsequent queries. However, if the query is for a position ahead of the last query, it re-scan from the top of the whole buffer. This significally slows down the performance. This change effectively mitigate performance regression introduced in https://github.com/apple/swift/pull/11264 without functional changes.
2.2 KiB
2.2 KiB