summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-05-19 13:31:25 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-05-19 13:31:25 +0000
commit356aa46de6d6438468f684cf8363b892e9810168 (patch)
treee0cf607eb6038018a386d09622c0c150743b0608 /llvm/lib/Support
parent6168183e04534710c0ec3049dae2eb3ae8f70eec (diff)
downloadbcm5719-llvm-356aa46de6d6438468f684cf8363b892e9810168.tar.gz
bcm5719-llvm-356aa46de6d6438468f684cf8363b892e9810168.zip
Prevent Cleanup() from running more than once.
llvm-svn: 237694
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/Windows/Signals.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc
index d81d3c8b90b..26c3c6e111a 100644
--- a/llvm/lib/Support/Windows/Signals.inc
+++ b/llvm/lib/Support/Windows/Signals.inc
@@ -441,6 +441,9 @@ void llvm::sys::AddSignalHandler(void (*FnPtr)(void *), void *Cookie) {
}
static void Cleanup() {
+ if (CleanupExecuted)
+ return;
+
EnterCriticalSection(&CriticalSection);
// Prevent other thread from registering new files and directories for
OpenPOWER on IntegriCloud