llvm.org GIT mirror llvm / 087c5bc
Fix KillTheDoctor after r210725. We don't map these windows errors to generic ones since errc::timed_out is not defined on mingw. Just use the raw windows error value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210910 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
1 changed file(s) with 5 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
3636 #include "llvm/ADT/StringRef.h"
3737 #include "llvm/ADT/Twine.h"
3838 #include "llvm/Support/CommandLine.h"
39 #include "llvm/Support/Errc.h"
3940 #include "llvm/Support/ManagedStatic.h"
4041 #include "llvm/Support/PrettyStackTrace.h"
4142 #include "llvm/Support/Signals.h"
423424 success = WaitForDebugEvent(&DebugEvent, TimeLeft);
424425
425426 if (!success) {
426 ec = windows_error(::GetLastError());
427
428 if (ec == std::errc::timed_out) {
427 DWORD LastError = ::GetLastError();
428 ec = windows_error(LastError);
429
430 if (LastError == ERROR_SEM_TIMEOUT || LastError == WSAETIMEDOUT) {
429431 errs() << ToolName << ": Process timed out.\n";
430432 ::TerminateProcess(ProcessInfo.hProcess, -1);
431433 // Otherwise other stuff starts failing...