Jordan Rose
2014-Jul-25 21:14 UTC
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
On Jul 25, 2014, at 13:44 , Rafael Espíndola <rafael.espindola at gmail.com> wrote:> On 25 July 2014 16:31, David Majnemer <david.majnemer at gmail.com> wrote: >> I have a few concerns: >> 1. GetTempPathW is buggy, we should be manually using >> GetEnvironmentVariableW with TMP, TEMP and USERPROFILE arguments and use the >> first that exists. >> 2. We should make sure that the platform specific pieces live in their >> respective Path.inc files. >> > > But that is orthogonal, no? > > If I understand correctly, Jordan's question is "do we need both > system_temp_directory and TempDir"? I doesn't look like it, it seems > that every user of TempDir could be replaced with > system_temp_directory.Well, part of my original point is that TempDir is smarter than system_temp_directory in a few ways. I suppose the Windows implementation isn't one of them.
David Majnemer
2014-Jul-25 21:57 UTC
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
To be clear, I don't think we need both; I'd like for us to drop one of them. I just want to make sure that that the final state, post merge, works well on all of our platforms. :) On Fri, Jul 25, 2014 at 2:14 PM, Jordan Rose <jordan_rose at apple.com> wrote:> > On Jul 25, 2014, at 13:44 , Rafael Espíndola <rafael.espindola at gmail.com> > wrote: > > > On 25 July 2014 16:31, David Majnemer <david.majnemer at gmail.com> wrote: > >> I have a few concerns: > >> 1. GetTempPathW is buggy, we should be manually using > >> GetEnvironmentVariableW with TMP, TEMP and USERPROFILE arguments and > use the > >> first that exists. > >> 2. We should make sure that the platform specific pieces live in their > >> respective Path.inc files. > >> > > > > But that is orthogonal, no? > > > > If I understand correctly, Jordan's question is "do we need both > > system_temp_directory and TempDir"? I doesn't look like it, it seems > > that every user of TempDir could be replaced with > > system_temp_directory. > > Well, part of my original point is that TempDir is smarter than > system_temp_directory in a few ways. I suppose the Windows implementation > isn't one of them.-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140725/7a46f3f8/attachment.html>
Rafael Espíndola
2014-Aug-09 01:35 UTC
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
On 25 July 2014 17:57, David Majnemer <david.majnemer at gmail.com> wrote:> To be clear, I don't think we need both; I'd like for us to drop one of > them. I just want to make sure that that the final state, post merge, works > well on all of our platforms. :)Cool. The attached patch removes TempDir. It passes all tests, but the OS X case looks a bit suspicious. I first implemented it by given priority to confstr, but we depend on the env variables taking priority for testing the crash report. Is there some way to change what confstr returns? Should we just add a -cc1 command line option for use in test/Driver/crash-report.c? Cheers, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: t.patch Type: application/octet-stream Size: 7482 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140808/344b4fe5/attachment.obj>