diff options
Diffstat (limited to 'include/llvm/Support/PathV2.h')
-rw-r--r-- | include/llvm/Support/PathV2.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/llvm/Support/PathV2.h b/include/llvm/Support/PathV2.h index 2515633..6d38c95 100644 --- a/include/llvm/Support/PathV2.h +++ b/include/llvm/Support/PathV2.h @@ -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. @@ -264,6 +264,17 @@ const StringRef extension(StringRef path); /// @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 != "" |