r310137 - [Support] Use FILE_SHARE_DELETE to fix RemoveFileOnSignal on Windows
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 4 14:52:00 PDT 2017
Author: rnk
Date: Fri Aug 4 14:52:00 2017
New Revision: 310137
URL: http://llvm.org/viewvc/llvm-project?rev=310137&view=rev
Log:
[Support] Use FILE_SHARE_DELETE to fix RemoveFileOnSignal on Windows
Summary:
Tools like clang that use RemoveFileOnSignal on their output files
weren't actually able to clean up their outputs before this change. Now
the call to llvm::sys::fs::remove succeeds and the temporary file is
deleted. This is a stop-gap to fix clang before implementing the
solution outlined in PR34070.
Reviewers: davide
Subscribers: llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D36337
Added:
cfe/trunk/test/Frontend/remove-file-on-signal.c
Added: cfe/trunk/test/Frontend/remove-file-on-signal.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/remove-file-on-signal.c?rev=310137&view=auto
==============================================================================
--- cfe/trunk/test/Frontend/remove-file-on-signal.c (added)
+++ cfe/trunk/test/Frontend/remove-file-on-signal.c Fri Aug 4 14:52:00 2017
@@ -0,0 +1,7 @@
+// RUN: rm -rf %t && mkdir -p %t && cd %t
+// RUN: not --crash %clang_cc1 %s -emit-llvm -o foo.ll
+// RUN: ls . | FileCheck %s --allow-empty
+// CHECK-NOT: foo.ll
+
+#pragma clang __debug crash
+FOO
More information about the cfe-commits
mailing list