mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
b5d8ee26b4
The current implementation of rename uses ReplaceFile if the destination file already exists. According to the documentation for ReplaceFile, the source file is opened without a sharing mode. This means that there is a short interval of time between when ReplaceFile renames the file and when it closes the file during which the destination file cannot be opened. This behaviour is not POSIX compliant because rename is supposed to be atomic. It was also causing intermittent link failures when linking with a ThinLTO cache; the ThinLTO cache implementation expects all cache files to be openable. This patch addresses that problem by re-implementing rename using CreateFile and SetFileInformationByHandle. It is roughly a reimplementation of ReplaceFile with a better sharing policy as well as support for renaming in the case where the destination file does not exist. This implementation is still not fully POSIX. Specifically in the case where the destination file is open at the point when rename is called, there will be a short interval of time during which the destination file will not exist. It isn't clear whether it is possible to avoid this using the Windows API. Differential Revision: https://reviews.llvm.org/D38570 llvm-svn: 315079 |
||
---|---|---|
.. | ||
DynamicLibrary | ||
AlignOfTest.cpp | ||
AllocatorTest.cpp | ||
ARMAttributeParser.cpp | ||
ArrayRecyclerTest.cpp | ||
BinaryStreamTest.cpp | ||
BlockFrequencyTest.cpp | ||
BranchProbabilityTest.cpp | ||
CachePruningTest.cpp | ||
Casting.cpp | ||
Chrono.cpp | ||
CMakeLists.txt | ||
CommandLineTest.cpp | ||
CompressionTest.cpp | ||
ConvertUTFTest.cpp | ||
CrashRecoveryTest.cpp | ||
DataExtractorTest.cpp | ||
DebugTest.cpp | ||
EndianStreamTest.cpp | ||
EndianTest.cpp | ||
ErrnoTest.cpp | ||
ErrorOrTest.cpp | ||
ErrorTest.cpp | ||
FileOutputBufferTest.cpp | ||
formatted_raw_ostream_test.cpp | ||
FormatVariadicTest.cpp | ||
GlobPatternTest.cpp | ||
Host.cpp | ||
LEB128Test.cpp | ||
LineIteratorTest.cpp | ||
LockFileManagerTest.cpp | ||
ManagedStatic.cpp | ||
MathExtrasTest.cpp | ||
MD5Test.cpp | ||
MemoryBufferTest.cpp | ||
MemoryTest.cpp | ||
NativeFormatTests.cpp | ||
ParallelTest.cpp | ||
Path.cpp | ||
ProcessTest.cpp | ||
ProgramTest.cpp | ||
raw_ostream_test.cpp | ||
raw_pwrite_stream_test.cpp | ||
raw_sha1_ostream_test.cpp | ||
RegexTest.cpp | ||
ReplaceFileTest.cpp | ||
ReverseIterationTest.cpp | ||
ScaledNumberTest.cpp | ||
SourceMgrTest.cpp | ||
SpecialCaseListTest.cpp | ||
StringPool.cpp | ||
SwapByteOrderTest.cpp | ||
TargetParserTest.cpp | ||
TarWriterTest.cpp | ||
Threading.cpp | ||
ThreadLocalTest.cpp | ||
ThreadPool.cpp | ||
TimerTest.cpp | ||
TrailingObjectsTest.cpp | ||
TrigramIndexTest.cpp | ||
TypeNameTest.cpp | ||
UnicodeTest.cpp | ||
xxhashTest.cpp | ||
YAMLIOTest.cpp | ||
YAMLParserTest.cpp |