From d8b23109b26f2070e21d5515ed2472ca9ab0111c Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 13 Jun 2014 17:20:48 +0000 Subject: Finishing touch for the std::error_code transition. While std::error_code itself seems to work OK in all platforms, there are few annoying differences with regards to the std::errc enumeration. This patch adds a simple llvm enumeration, which will hopefully avoid build breakages in other platforms and surprises as we get more uses of std::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210920 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/WindowsError.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Support/WindowsError.cpp') diff --git a/lib/Support/WindowsError.cpp b/lib/Support/WindowsError.cpp index e54ac36314..18fdbbda9f 100644 --- a/lib/Support/WindowsError.cpp +++ b/lib/Support/WindowsError.cpp @@ -12,12 +12,12 @@ // errors to generic ones. The one implemented in msvc is too conservative // for llvm, so we do an extra mapping when constructing an error_code // from an windows error. This allows the rest of llvm to simple checks -// like "EC == std::errc::file_exists" and have it work on both posix and +// like "EC == errc::file_exists" and have it work on both posix and // windows. // //===----------------------------------------------------------------------===// - +#include "llvm/Support/Errc.h" #include "llvm/Support/WindowsError.h" #include "llvm/Config/llvm-config.h" @@ -30,7 +30,7 @@ // I'd rather not double the line count of the following. #define MAP_ERR_TO_COND(x, y) \ case x: \ - return std::make_error_code(std::errc::y) + return make_error_code(errc::y) std::error_code llvm::mapWindowsError(unsigned EV) { switch (EV) { -- cgit v1.2.3