<div dir="ltr">I have a few concerns:<div>1. GetTempPathW is buggy, we should be manually using GetEnvironmentVariableW with TMP, TEMP and USERPROFILE arguments and use the first that exists.</div><div>2. We should make sure that the platform specific pieces live in their respective Path.inc files.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 24, 2014 at 9:44 AM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
> On 2014-Jul-23, at 15:26, Jordan Rose <<a href="mailto:jordan_rose@apple.com">jordan_rose@apple.com</a>> wrote:<br>
><br>
> Hi, all. I noticed recently that llvm::sys::fs::createTemporaryFile does not use llvm::sys::path::system_temp_directory, instead relying on its platform-specific helper TempFile. Is there any reason for this disparity?<br>
><br>
> The two implementations are not in sync, either:<br>
><br>
> - TempDir honors TMPDIR, TMP, TEMP, TEMPDIR, and a configuration-settable P_tmpdir on Unix-y systems. system_temp_directory just honors TMPDIR.<br>
> - TempDir calls ::GetTempPathW on Windows, while system_temp_directory honors TEMP and falls back to C:\\TEMP.<br>
> - system_temp_directory prefers DARWIN_USER_TEMP_DIR on Darwin.<br>
> - system_temp_directory has an option for "temporary directory that persists past reboot", while TempDir is never used for anything but transient files and directories<br>
><br>
> Does anyone mind if I merge the platform-specific bits of TempDir into system_temp_directory? Does anyone have other opinions here?<br>
><br>
> Jordan<br>
<br>
</div>This makes sense to me.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br></div>