[PATCH] D36827: Changed createTemporaryFile without FD to actually create a file.

Ilya Biryukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 05:45:11 PDT 2017


ilya-biryukov created this revision.

This commit changes semantics of createUniqueFile and
createTemporaryFile variants that do not return file descriptors.
Previously they only checked if files exist, therefore being subject
to race conditions. Now they will create an empty file to avoid them.

Functions that do not create a file are now called
getPotentiallyUniqueTempFileName and getPotentiallyUniqueFileName.


https://reviews.llvm.org/D36827

Files:
  include/llvm/Support/FileSystem.h
  lib/Support/Path.cpp
  tools/dsymutil/dsymutil.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36827.111505.patch
Type: text/x-patch
Size: 5879 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170817/6862873b/attachment.bin>


More information about the llvm-commits mailing list