16 #ifndef LLVM_SUPPORT_PATH_H 17 #define LLVM_SUPPORT_PATH_H 23 #include <system_error> 180 const Twine &d =
"");
bool is_separator(char value, Style style=Style::native)
Check whether the given char is a path separator on the host OS.
const_iterator end(StringRef path)
Get end iterator over path.
void remove_filename(SmallVectorImpl< char > &path, Style style=Style::native)
Remove the last component from path unless it is the root dir.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
void replace_path_prefix(SmallVectorImpl< char > &Path, const StringRef &OldPrefix, const StringRef &NewPrefix, Style style=Style::native)
Replace matching path prefix with another path.
This class represents lattice values for constants.
reference operator*() const
bool has_extension(const Twine &path, Style style=Style::native)
Has extension?
std::string convert_to_slash(StringRef path, Style style=Style::native)
Replaces backslashes with slashes if Windows.
StringRef remove_leading_dotslash(StringRef path, Style style=Style::native)
Remove redundant leading "./" pieces and consecutive separators.
bool has_stem(const Twine &path, Style style=Style::native)
Has stem?
void append(SmallVectorImpl< char > &path, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="")
Append to path.
reverse_iterator rbegin(StringRef path, Style style=Style::native)
Get reverse begin iterator over path.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
bool is_absolute(const Twine &path, Style style=Style::native)
Is path absolute?
StringRef root_path(StringRef path, Style style=Style::native)
Get root path.
Position
Position to insert a new instruction relative to an existing instruction.
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
bool has_parent_path(const Twine &path, Style style=Style::native)
Has parent path?
bool has_filename(const Twine &path, Style style=Style::native)
Has filename?
StringRef parent_path(StringRef path, Style style=Style::native)
Get parent path.
StringRef get_separator(Style style=Style::native)
Return the preferred separator for this platform.
StringRef root_directory(StringRef path, Style style=Style::native)
Get root directory.
void replace_extension(SmallVectorImpl< char > &path, const Twine &extension, Style style=Style::native)
Replace the file extension of path with extension.
bool remove_dots(SmallVectorImpl< char > &path, bool remove_dot_dot=false, Style style=Style::native)
In-place remove any '.
StringRef root_name(StringRef path, Style style=Style::native)
Get root name.
reference operator*() const
bool has_root_directory(const Twine &path, Style style=Style::native)
Has root directory?
bool has_root_path(const Twine &path, Style style=Style::native)
Has root path?
bool has_relative_path(const Twine &path, Style style=Style::native)
Has relative path?
StringRef filename(StringRef path, Style style=Style::native)
Get filename.
bool is_relative(const Twine &path, Style style=Style::native)
Is path relative?
reverse_iterator rend(StringRef path)
Get reverse end iterator over path.
void system_temp_directory(bool erasedOnReboot, SmallVectorImpl< char > &result)
Get the typical temporary directory for the system, e.g., "/var/tmp" or "C:/TEMP".
StringRef relative_path(StringRef path, Style style=Style::native)
Get relative path.
bool home_directory(SmallVectorImpl< char > &result)
Get the user's home directory.
StringRef stem(StringRef path, Style style=Style::native)
Get stem.
StringRef - Represent a constant reference to a string, i.e.
bool operator==(uint64_t V1, const APInt &V2)
bool has_root_name(const Twine &path, Style style=Style::native)
Has root name?
StringRef extension(StringRef path, Style style=Style::native)
Get extension.