diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2015-05-19 13:31:25 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2015-05-19 13:31:25 +0000 |
commit | 356aa46de6d6438468f684cf8363b892e9810168 (patch) | |
tree | e0cf607eb6038018a386d09622c0c150743b0608 /llvm/lib/Support | |
parent | 6168183e04534710c0ec3049dae2eb3ae8f70eec (diff) | |
download | bcm5719-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.inc | 3 |
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 |