diff options
author | Zhanyong Wan <wan@google.com> | 2011-02-11 21:24:40 +0000 |
---|---|---|
committer | Zhanyong Wan <wan@google.com> | 2011-02-11 21:24:40 +0000 |
commit | 63cc3a85cc10093f83f76ea9192f77929b58569e (patch) | |
tree | 8144f00064a3c7e625fc6c7b775b243e30646b12 /include | |
parent | 7973f350b78e0bef8567f441f3255c846f5432ac (diff) | |
download | llvm-63cc3a85cc10093f83f76ea9192f77929b58569e.tar.gz llvm-63cc3a85cc10093f83f76ea9192f77929b58569e.tar.bz2 llvm-63cc3a85cc10093f83f76ea9192f77929b58569e.tar.xz |
Adds llvm::sys::path::is_separator() to test whether a char is a path separator
on the host OS. Reviewed by dgregor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125406 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/PathV2.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/PathV2.h b/include/llvm/Support/PathV2.h index 3866e410e6..251563398f 100644 --- a/include/llvm/Support/PathV2.h +++ b/include/llvm/Support/PathV2.h @@ -258,6 +258,12 @@ const StringRef stem(StringRef path); /// @result The extension of \a path. const StringRef extension(StringRef path); +/// @brief Check whether the given char is a path separator on the host OS. +/// +/// @param value a character +/// @result true if \a value is a path separator character on the host OS +bool is_separator(char value); + /// @brief Has root name? /// /// root_name != "" |