diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2023-11-03 18:14:49 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2023-11-03 18:19:33 +0000 |
| commit | bcb685e11945946335c2dc6265779f0226491b49 (patch) | |
| tree | 6a93d2a776e4ca6ec93e1f9e04dbf9692e923b79 /llvm/lib/Support/VirtualFileSystem.cpp | |
| parent | f7cd6194a2320429b1569172b868b21947c37efa (diff) | |
[Support] Use StringRef::starts_with/ends_with instead of startswith/endswith. NFC.
startswith/endswith wrap starts_with/ends_with and will eventually go away (to more closely match string_view)
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
| -rw-r--r-- | llvm/lib/Support/VirtualFileSystem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp index 1f8563ab82f4..367e794d38f6 100644 --- a/llvm/lib/Support/VirtualFileSystem.cpp +++ b/llvm/lib/Support/VirtualFileSystem.cpp @@ -1385,7 +1385,7 @@ RedirectingFileSystem::makeAbsolute(StringRef WorkingDir, std::string Result = std::string(WorkingDir); StringRef Dir(Result); - if (!Dir.endswith(sys::path::get_separator(style))) { + if (!Dir.ends_with(sys::path::get_separator(style))) { Result += sys::path::get_separator(style); } // backslashes '\' are legit path charactors under POSIX. Windows APIs |
