reference operator*() const { return Component; }
pointer operator->() const { return &Component; }
const_iterator &operator++(); // preincrement
- const_iterator &operator++(int); // postincrement
bool operator==(const const_iterator &RHS) const;
bool operator!=(const const_iterator &RHS) const { return !(*this == RHS); }
reference operator*() const { return Component; }
pointer operator->() const { return &Component; }
reverse_iterator &operator++(); // preincrement
- reverse_iterator &operator++(int); // postincrement
bool operator==(const reverse_iterator &RHS) const;
bool operator!=(const reverse_iterator &RHS) const { return !(*this == RHS); }
};
/// @result The root directory of \a path if it has one, otherwise
/// "".
StringRef root_directory(StringRef path);
-
+
/// @brief Get root path.
///
/// Equivalent to root_name + root_directory.
/// @result StringRef of the preferred separator, null-terminated.
StringRef get_separator();
-/// @brief Get the typical temporary directory for the system, e.g.,
+/// @brief Get the typical temporary directory for the system, e.g.,
/// "/var/tmp" or "C:/TEMP"
///
/// @param erasedOnReboot Whether to favor a path that is erased on reboot
/// @result True if the path is relative, false if it is not.
bool is_relative(const Twine &path);
+/// @brief Remove redundant leading "./" pieces and consecutive separators.
+///
+/// @param path Input path.
+/// @result The cleaned-up \a path.
+StringRef remove_leading_dotslash(StringRef path);
+
} // end namespace path
} // end namespace sys
} // end namespace llvm