diff options
author | Martin Storsjö <martin@martin.st> | 2021-10-04 17:17:00 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2021-11-05 10:41:51 +0200 |
commit | a8b54834a186f5570b49b614e31b961a9cf1cbfe (patch) | |
tree | cf9f9891831cdbffdc969e5c657c0a4a69a614b2 /llvm/unittests/Support/CommandLineTest.cpp | |
parent | f95bd18b5faa6a5af4b5786312c373c5b2dce687 (diff) | |
download | llvm-a8b54834a186f5570b49b614e31b961a9cf1cbfe.zip llvm-a8b54834a186f5570b49b614e31b961a9cf1cbfe.tar.gz llvm-a8b54834a186f5570b49b614e31b961a9cf1cbfe.tar.bz2 |
[Support] Add a new path style for Windows with forward slashes
This behaves just like the regular Windows style, with both separator
forms accepted, but with get_separator() returning forward slashes.
Add a more descriptive name for the existing style, keeping the old
name around as an alias initially.
Add a new function `make_preferred()` (like the C++17
`std::filesystem::path` function with the same name), which converts
windows paths to the preferred separator form (while this one works on
any platform and takes a `path::Style` argument).
Contrary to `native()` (just like `make_preferred()` in `std::filesystem`),
this doesn't do anything at all on Posix, it doesn't try to reinterpret
backslashes into forward slashes there.
Differential Revision: https://reviews.llvm.org/D111879
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
0 files changed, 0 insertions, 0 deletions