1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/lib/Support/Windows
Amy Huang a1e25da87d Recommit "Fix tmp files being left on Windows builds." with a fix for
incorrect std::string use. (Also remove redundant call to
RemoveFileOnSignal.)

Clang writes object files by first writing to a .tmp file and then
renaming to the final .obj name. On Windows, if a compile is killed
partway through the .tmp files don't get deleted.

Currently it seems like RemoveFileOnSignal takes care of deleting the
tmp files on Linux, but on Windows we need to call
setDeleteDisposition on tmp files so that they are deleted when
closed.

This patch switches to using TempFile to create the .tmp files we write
when creating object files, since it uses setDeleteDisposition on Windows.
This change applies to both Linux and Windows for consistency.

Differential Revision: https://reviews.llvm.org/D102876

This reverts commit 20797b129f844d4b12ffb2b12cf33baa2d42985c.
2021-06-02 16:50:37 -07:00
..
COM.inc
DynamicLibrary.inc
explicit_symbols.inc
Host.inc
Memory.inc
Path.inc Recommit "Fix tmp files being left on Windows builds." with a fix for 2021-06-02 16:50:37 -07:00
Process.inc [Windows] Use TerminateProcess to exit without running destructors 2021-05-22 23:41:40 +03:00
Program.inc [SystemZ][z/OS][Windows] Add new functions that set Text/Binary mode for Stdin and Stdout based on OpenFlags 2021-04-16 08:09:19 -04:00
Signals.inc Pass -fcrash-diagnostics-dir along to LLVM 2021-04-06 09:30:52 -07:00
Threading.inc Re-land [Support] On Windows, take the affinity mask into account 2021-01-14 17:03:22 -05:00
ThreadLocal.inc
Watchdog.inc