forked from OSchip/llvm-project
Update the comment for system_temp_directory() to indicate when it
will ignore the erasedOnReboot option, and properly escape the backslash in "C:\TEMP". Thanks to Aaron and Francois. llvm-svn: 139755
This commit is contained in:
parent
801e06b768
commit
8b74454619
|
@ -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);
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue