aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/VirtualFileSystem.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2023-11-03 18:14:49 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2023-11-03 18:19:33 +0000
commitbcb685e11945946335c2dc6265779f0226491b49 (patch)
tree6a93d2a776e4ca6ec93e1f9e04dbf9692e923b79 /llvm/lib/Support/VirtualFileSystem.cpp
parentf7cd6194a2320429b1569172b868b21947c37efa (diff)
downloadllvm-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.cpp2
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