aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/Path.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-04-26 18:18:09 -0700
committerGitHub <noreply@github.com>2025-04-26 18:18:09 -0700
commit8210cdd764cb0b334f2bc205b316e94480c47c88 (patch)
tree2c8d555403767b4467bd3f6f7d070ac69872e3da /llvm/unittests/Support/Path.cpp
parentfda8b751bd676190251721cb4840e82dd378f3fb (diff)
downloadllvm-8210cdd764cb0b334f2bc205b316e94480c47c88.zip
llvm-8210cdd764cb0b334f2bc205b316e94480c47c88.tar.gz
llvm-8210cdd764cb0b334f2bc205b316e94480c47c88.tar.bz2
[llvm] Use llvm::replace (NFC) (#137481)
Diffstat (limited to 'llvm/unittests/Support/Path.cpp')
-rw-r--r--llvm/unittests/Support/Path.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
index 187f47d..5e0092d 100644
--- a/llvm/unittests/Support/Path.cpp
+++ b/llvm/unittests/Support/Path.cpp
@@ -1055,9 +1055,7 @@ TEST_F(FileSystemTest, CreateDir) {
do {
LongPathWithUnixSeparators.append("/DirNameWith19Charss");
} while (LongPathWithUnixSeparators.size() < 260);
- std::replace(LongPathWithUnixSeparators.begin(),
- LongPathWithUnixSeparators.end(),
- '\\', '/');
+ llvm::replace(LongPathWithUnixSeparators, '\\', '/');
ASSERT_NO_ERROR(fs::create_directories(Twine(LongPathWithUnixSeparators)));
// cleanup
ASSERT_NO_ERROR(fs::remove_directories(Twine(TestDirectory) +
@@ -2442,7 +2440,7 @@ TEST_F(FileSystemTest, widenPath) {
EXPECT_EQ(Result, Expected);
// Check that Unix separators are handled correctly.
- std::replace(Input.begin(), Input.end(), '\\', '/');
+ llvm::replace(Input, '\\', '/');
ASSERT_NO_ERROR(windows::widenPath(Input, Result));
EXPECT_EQ(Result, Expected);