llvm-project/llvm/lib/Support/Windows
Rafael Espindola 20569e96e9 Delete temp file if rename fails.
Without this when lld failed to replace the output file it would leave
the temporary behind. The problem is that the existing logic is

- cancel the delete flag
- rename

We have to cancel first to avoid renaming and then crashing and
deleting the old version. What is missing then is deleting the
temporary file if the rename fails.

This can be an issue on both unix and windows, but I am not sure how
to cause the rename to fail reliably on unix. I think it can be done
on ZFS since it has an ACL system similar to what windows uses, but
adding support for checking that in llvm-lit is probably not worth it.

llvm-svn: 319786
2017-12-05 16:40:56 +00:00
..
COM.inc
DynamicLibrary.inc Allow clients to specify search order of DynamicLibraries. 2017-07-12 21:22:45 +00:00
Host.inc Update the Windows version of updateTripleOSVersion to account for 2017-07-07 10:08:52 +00:00
Memory.inc [Support] Support NetBSD PaX MPROTECT in sys::Memory. 2017-11-16 23:04:44 +00:00
Mutex.inc Remove more name space pollution from .inc files 2017-03-31 14:26:44 +00:00
Path.inc Delete temp file if rename fails. 2017-12-05 16:40:56 +00:00
Process.inc [Support] env vars with empty values on windows 2017-08-18 16:55:44 +00:00
Program.inc Convenience/safety fix for llvm::sys::Execute(And|No)Wait 2017-09-13 17:03:37 +00:00
RWMutex.inc Remove more name space pollution from .inc files 2017-03-31 14:26:44 +00:00
Signals.inc Support: WOA64 and WOA Signals 2017-08-03 23:12:33 +00:00
ThreadLocal.inc Remove more name space pollution from .inc files 2017-03-31 14:26:44 +00:00
Threading.inc Fix C2712 build error on Windows 2017-03-07 20:09:46 +00:00
Watchdog.inc
WindowsSupport.h Fix one place where I missed a commented requirement for a particular 2017-06-06 12:11:24 +00:00
explicit_symbols.inc