diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2021-09-15 20:48:57 -0400 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2021-10-29 11:46:44 -0700 |
commit | 4e4883e1f394f7c47ff3adee48039aa8374bb8d0 (patch) | |
tree | ae16f9ea2e10878a1cf37f8f6b26164cb0cb03da /llvm/lib/Support/GraphWriter.cpp | |
parent | d0e9879d9627c82a9c1b97cdf0d8da8829905574 (diff) | |
download | llvm-4e4883e1f394f7c47ff3adee48039aa8374bb8d0.zip llvm-4e4883e1f394f7c47ff3adee48039aa8374bb8d0.tar.gz llvm-4e4883e1f394f7c47ff3adee48039aa8374bb8d0.tar.bz2 |
Support: Expose sys::path::is_style_{posix,windows,native}()
Expose three helpers in namespace llvm::sys::path to detect the
path rules followed by sys::path::Style.
- is_style_posix()
- is_style_windows()
- is_style_native()
This are constexpr functions that that will allow a bunch of
path-related code to stop checking `_WIN32`.
Originally I looked at adding system_style(), analogous to
sys::endian::system_endianness(), but future patches (from others) will
add more Windows style variants for slash preferences. These helpers
should be resilient to that change, allowing callers to detect basic
path rules.
Differential Revision: https://reviews.llvm.org/D112288
Diffstat (limited to 'llvm/lib/Support/GraphWriter.cpp')
0 files changed, 0 insertions, 0 deletions