Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LLD calls this on every source file string in every object file when writing PDBs, so it is somewhat hot. Avoid rewriting paths that do not contain path traversal components (./..). Use find_first_not_of(separators) directly instead of using the path iterators. The path component iterators appear to be slow, and directly searching for slashes makes it easier to find double separators that need to be canonicalized. I discovered that the VFS relies on remote_dots to not canonicalize early slashes (/foo or C:/foo) on Windows, so I had to leave that behavior behind with unit tests for it. This is undesirable, but I claim that my change is NFC.
- Loading branch information
Showing
3 changed files
with
68 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters