diff options
Diffstat (limited to 'utils/KillTheDoctor/KillTheDoctor.cpp')
-rw-r--r-- | utils/KillTheDoctor/KillTheDoctor.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/KillTheDoctor/KillTheDoctor.cpp b/utils/KillTheDoctor/KillTheDoctor.cpp index f236c5ffc9..2b66066b43 100644 --- a/utils/KillTheDoctor/KillTheDoctor.cpp +++ b/utils/KillTheDoctor/KillTheDoctor.cpp @@ -43,6 +43,7 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/Support/system_error.h" #include "llvm/Support/type_traits.h" +#include "llvm/Support/WindowsError.h" #include <algorithm> #include <cerrno> #include <cstdlib> @@ -169,9 +170,7 @@ namespace { typedef ScopedHandle<FileHandle> FileScopedHandle; } -static error_code windows_error(unsigned E) { - return error_code(E, system_category()); -} +static error_code windows_error(DWORD E) { return mapWindowsError(E); } static error_code GetFileNameFromHandle(HANDLE FileHandle, std::string& Name) { @@ -426,7 +425,7 @@ int main(int argc, char **argv) { if (!success) { ec = windows_error(::GetLastError()); - if (ec == errc::timed_out) { + if (ec == std::errc::timed_out) { errs() << ToolName << ": Process timed out.\n"; ::TerminateProcess(ProcessInfo.hProcess, -1); // Otherwise other stuff starts failing... |