From a813d608a943579804eb9f12c8ede2955bb3a777 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 11 Jun 2014 03:58:34 +0000 Subject: Remove windows_error. MSVC doesn't seem to provide any is_error_code_enum enumeration for the windows errors. Fortunately very few places in llvm have to handle raw windows errors, so we can just construct the corresponding error_code directly. llvm-svn: 210631 --- llvm/lib/Support/Windows/Process.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/Support/Windows/Process.inc') diff --git a/llvm/lib/Support/Windows/Process.inc b/llvm/lib/Support/Windows/Process.inc index 006bd800844..9707cf103f2 100644 --- a/llvm/lib/Support/Windows/Process.inc +++ b/llvm/lib/Support/Windows/Process.inc @@ -179,6 +179,10 @@ Optional Process::GetEnv(StringRef Name) { return std::string(Res.data()); } +static error_code windows_error(DWORD E) { + return error_code(E, system_category()); +} + error_code Process::GetArgumentVector(SmallVectorImpl &Args, ArrayRef, -- cgit v1.2.3