summaryrefslogtreecommitdiff
path: root/lib/Support/Windows/Process.inc
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-11 03:58:34 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-11 03:58:34 +0000
commite5e77d1cd85037d91116a6483ce74fe99b483341 (patch)
treebc169c2bc99d3ee7368f2aea502d28ce7babac92 /lib/Support/Windows/Process.inc
parent7456ad12403c8bf4bb30cd00ba2d26ad5af19c46 (diff)
downloadllvm-e5e77d1cd85037d91116a6483ce74fe99b483341.tar.gz
llvm-e5e77d1cd85037d91116a6483ce74fe99b483341.tar.bz2
llvm-e5e77d1cd85037d91116a6483ce74fe99b483341.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210631 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Windows/Process.inc')
-rw-r--r--lib/Support/Windows/Process.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Support/Windows/Process.inc b/lib/Support/Windows/Process.inc
index 006bd80084..9707cf103f 100644
--- a/lib/Support/Windows/Process.inc
+++ b/lib/Support/Windows/Process.inc
@@ -179,6 +179,10 @@ Optional<std::string> 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<const char *> &Args,
ArrayRef<const char *>,