aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Support/PathV2.h5
-rw-r--r--lib/Support/PathV2.cpp2
2 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/Support/PathV2.h b/include/llvm/Support/PathV2.h
index 8dfbd77..6d38c95 100644
--- a/include/llvm/Support/PathV2.h
+++ b/include/llvm/Support/PathV2.h
@@ -268,7 +268,10 @@ bool is_separator(char value);
/// "/var/tmp" or "C:/TEMP"
///
/// @param erasedOnReboot Whether to favor a path that is erased on reboot
-/// rather than one that potentially persists longer.
+/// 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);
diff --git a/lib/Support/PathV2.cpp b/lib/Support/PathV2.cpp
index 4d969fe..b7dfe4f 100644
--- a/lib/Support/PathV2.cpp
+++ b/lib/Support/PathV2.cpp
@@ -510,7 +510,7 @@ void system_temp_directory(bool erasedOnReboot, SmallVectorImpl<char> &result) {
const char *DefaultResult;
#ifdef LLVM_ON_WIN32
(void)erasedOnReboot;
- DefaultResult = "C:\TEMP";
+ DefaultResult = "C:\\TEMP";
#else
if (erasedOnReboot)
DefaultResult = "/tmp";