Update the comment for system_temp_directory() to indicate when it
[oota-llvm.git] / include / llvm / Support / PathV2.h
index 976fa6a7b2576a345bf329139f2e9d8c69678e4d..6d38c95715589b9656240e358e89b7e49aaaa7e2 100644 (file)
@@ -187,7 +187,7 @@ const StringRef root_name(StringRef path);
 /// @result The root directory of \a path if it has one, otherwise
 ///               "".
 const StringRef root_directory(StringRef path);
-
+  
 /// @brief Get root path.
 ///
 /// Equivalent to root_name + root_directory.
@@ -244,15 +244,6 @@ const StringRef filename(StringRef path);
 /// @result The stem of \a path.
 const StringRef stem(StringRef path);
 
-/// Convert path to a canonical form, resolving symbolic links and removing
-/// unnecessary path elements (e.g., "foo/../", "./"). 
-///
-/// @param path A path that is going to be canonicalized by resolving symlinks
-/// and removing unnecessary path elements (e.g., "./").
-///
-/// @param buffer The resulting canonical path.
-void canonical(const char *path, SmallVectorImpl<char> &result);
-  
 /// @brief Get extension.
 ///
 /// If filename contains a dot but not solely one or two dots, result is the
@@ -267,6 +258,23 @@ void canonical(const char *path, SmallVectorImpl<char> &result);
 /// @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 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
+/// rather than one that potentially persists longer. This parameter will be
+/// ignored if the user or system has set the typical environment variable
+/// (e.g., TEMP on Windows, TMPDIR on *nix) to specify a temporary directory.
+///
+/// @param Result Holds the resulting path name.
+void system_temp_directory(bool erasedOnReboot, SmallVectorImpl<char> &result);
+
 /// @brief Has root name?
 ///
 /// root_name != ""