[llvm] r237694 - Prevent Cleanup() from running more than once.
Yaron Keren
yaron.keren at gmail.com
Tue May 19 06:31:25 PDT 2015
Author: yrnkrn
Date: Tue May 19 08:31:25 2015
New Revision: 237694
URL: http://llvm.org/viewvc/llvm-project?rev=237694&view=rev
Log:
Prevent Cleanup() from running more than once.
Modified:
llvm/trunk/lib/Support/Windows/Signals.inc
Modified: llvm/trunk/lib/Support/Windows/Signals.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Signals.inc?rev=237694&r1=237693&r2=237694&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Signals.inc (original)
+++ llvm/trunk/lib/Support/Windows/Signals.inc Tue May 19 08:31:25 2015
@@ -441,6 +441,9 @@ void llvm::sys::AddSignalHandler(void (*
}
static void Cleanup() {
+ if (CleanupExecuted)
+ return;
+
EnterCriticalSection(&CriticalSection);
// Prevent other thread from registering new files and directories for
More information about the llvm-commits
mailing list