diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-12-18 20:30:12 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-19 21:12:03 +0000 |
| commit | c9157d925c489f07ba9c0b2ce47e5149b75969a5 (patch) | |
| tree | 08bc4a3d9cad3f9ebffa558ddf140b9d9257b219 /contrib/llvm-project/llvm/lib/Support/Path.cpp | |
| parent | 2a66844f606a35d68ad8a8061f4bea204274b3bc (diff) | |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/Path.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/Support/Path.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/Path.cpp b/contrib/llvm-project/llvm/lib/Support/Path.cpp index 7a57c104ef10..c2456dcac097 100644 --- a/contrib/llvm-project/llvm/lib/Support/Path.cpp +++ b/contrib/llvm-project/llvm/lib/Support/Path.cpp @@ -263,7 +263,7 @@ const_iterator &const_iterator::operator++() { // Root dir. if (was_net || // c:/ - (is_style_windows(S) && Component.endswith(":"))) { + (is_style_windows(S) && Component.ends_with(":"))) { Component = Path.substr(Position, 1); return *this; } @@ -352,7 +352,7 @@ StringRef root_path(StringRef path, Style style) { if (b != e) { bool has_net = b->size() > 2 && is_separator((*b)[0], style) && (*b)[1] == (*b)[0]; - bool has_drive = is_style_windows(style) && b->endswith(":"); + bool has_drive = is_style_windows(style) && b->ends_with(":"); if (has_net || has_drive) { if ((++pos != e) && is_separator((*pos)[0], style)) { @@ -377,7 +377,7 @@ StringRef root_name(StringRef path, Style style) { if (b != e) { bool has_net = b->size() > 2 && is_separator((*b)[0], style) && (*b)[1] == (*b)[0]; - bool has_drive = is_style_windows(style) && b->endswith(":"); + bool has_drive = is_style_windows(style) && b->ends_with(":"); if (has_net || has_drive) { // just {C:,//net}, return the first component. @@ -394,7 +394,7 @@ StringRef root_directory(StringRef path, Style style) { if (b != e) { bool has_net = b->size() > 2 && is_separator((*b)[0], style) && (*b)[1] == (*b)[0]; - bool has_drive = is_style_windows(style) && b->endswith(":"); + bool has_drive = is_style_windows(style) && b->ends_with(":"); if ((has_net || has_drive) && // {C:,//net}, skip to the next component. @@ -514,7 +514,7 @@ static bool starts_with(StringRef Path, StringRef Prefix, } return true; } - return Path.startswith(Prefix); + return Path.starts_with(Prefix); } bool replace_path_prefix(SmallVectorImpl<char> &Path, StringRef OldPrefix, |
