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) | |
download | llvm-bcb685e11945946335c2dc6265779f0226491b49.zip llvm-bcb685e11945946335c2dc6265779f0226491b49.tar.gz llvm-bcb685e11945946335c2dc6265779f0226491b49.tar.bz2 |
[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 1f8563a..367e794d 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 |