diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc --- a/llvm/lib/Support/Windows/Signals.inc +++ b/llvm/lib/Support/Windows/Signals.inc @@ -731,6 +731,11 @@ /// otherwise. static std::error_code WINAPI WriteWindowsDumpFile(PMINIDUMP_EXCEPTION_INFORMATION ExceptionInfo) { + struct ScopedCriticalSection { + ScopedCriticalSection() { EnterCriticalSection(&CriticalSection); } + ~ScopedCriticalSection() { LeaveCriticalSection(&CriticalSection); } + } SCS; + using namespace llvm; using namespace llvm::sys;