diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc index 32477de5184b98..1621f4a54b7963 100644 --- a/llvm/lib/Support/Windows/Signals.inc +++ b/llvm/lib/Support/Windows/Signals.inc @@ -731,6 +731,11 @@ static bool GetDumpType(HKEY Key, MINIDUMP_TYPE &ResultType) { /// 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;