Moving FileManager::removeDotPaths to llvm::sys::path::remove_dots
[oota-llvm.git] / include / llvm / Support / Path.h
index 1e56be4a5fc44213e623788e322632994873ffcf..955cc991d9b7ed01b2b5e6ab3cdf388a4b1f06c7 100644 (file)
@@ -423,6 +423,13 @@ bool is_relative(const Twine &path);
 /// @result The cleaned-up \a path.
 StringRef remove_leading_dotslash(StringRef path);
 
 /// @result The cleaned-up \a path.
 StringRef remove_leading_dotslash(StringRef path);
 
+/// @brief In-place remove any './' and optionally '../' components from a path.
+///
+/// @param path processed path
+/// @param remove_dot_dot specify if '../' should be removed
+/// @result True if path was changed
+bool remove_dots(SmallVectorImpl<char> &path, bool remove_dot_dot = false);
+
 } // end namespace path
 } // end namespace sys
 } // end namespace llvm
 } // end namespace path
 } // end namespace sys
 } // end namespace llvm