Page MenuHomePhabricator

[lit] Use os.devnull instead of named temp files

Authored by vsk on May 23 2016, 6:22 PM.



Use os.devnull instead of tempfiles when substituting '/dev/null' on Windows machines. This should make the bots just a bit speedier.

I'd appreciate it if someone could test this patch on Windows -- I don't have access to it.

Diff Detail


Event Timeline

vsk updated this revision to Diff 58179.May 23 2016, 6:22 PM
vsk retitled this revision from to [lit] Use os.devnull instead of named temp files.
vsk updated this object.
vsk added reviewers: delcypher, ygao.
vsk added a subscriber: llvm-commits.
ygao edited edge metadata.Jun 2 2016, 11:51 AM

Hi, sorry for the delay.
I tested your change on a 64-bit Windows 7 machine and it works fine. It seems a good idea to use os.devnull instead of a temporary file. Thanks.
I am not very familiar with the code myself to give a LGTM, so a second review would be appreciated.

vsk added a comment.Jun 3 2016, 2:26 PM

@ygao thanks!

I'll leave this up for another day before committing. I'll work through any post-commit feedback as it comes.

This revision was automatically updated to reflect the committed changes.