[Support] [Path] Use std::replace instead of an explicit comparison loop. NFC.
authorMartin Storsjö <martin@martin.st>
Mon, 4 Oct 2021 13:48:07 +0000 (16:48 +0300)
committerMartin Storsjö <martin@martin.st>
Wed, 13 Oct 2021 19:55:14 +0000 (22:55 +0300)
commit2a4b1539e991f289ea62f74a03f3fc6aa49c9c1f
treeb7960220516138440f8359238b3f9c8834f72243
parentd9b9a7f4287019ad7fb5ae35523e81dee36c1b40
[Support] [Path] Use std::replace instead of an explicit comparison loop. NFC.

After 8fc7a907b93a8e9eef96e872f8f926db3ebfe9b6, this loop does
the same as a plain `std::replace`.

Also clarify the comment about what this function does.

Differential Revision: https://reviews.llvm.org/D111730
llvm/include/llvm/Support/Path.h
llvm/lib/Support/Path.cpp