Prevent Cleanup() from running more than once.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237694 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Yaron Keren 2015-05-19 13:31:25 +00:00
parent 7141b3d6f3
commit add5ea661a

View File

@ -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