diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-14 20:27:01 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-14 20:27:01 +0000 |
commit | 55cf815e19691d8a1cda40a331943ebfee9d7255 (patch) | |
tree | 2c6475e3bc9096aa07bab087c1ffb3190a62a164 /include | |
parent | bf841cf3360558d2939c9f1a244a7a7296f846df (diff) | |
download | external_llvm-55cf815e19691d8a1cda40a331943ebfee9d7255.zip external_llvm-55cf815e19691d8a1cda40a331943ebfee9d7255.tar.gz external_llvm-55cf815e19691d8a1cda40a331943ebfee9d7255.tar.bz2 |
Add a simple routine to determine the typical system directory for
temporary data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139725 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/PathV2.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm/Support/PathV2.h b/include/llvm/Support/PathV2.h index 2515633..8dfbd77 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,14 @@ 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. +/// @param Result Holds the resulting path name. +void system_temp_directory(bool erasedOnReboot, SmallVectorImpl<char> &result); + /// @brief Has root name? /// /// root_name != "" |