diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-13 17:20:48 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-13 17:20:48 +0000 |
commit | d8b23109b26f2070e21d5515ed2472ca9ab0111c (patch) | |
tree | ee7abbcf41f5cecd956761c5bcc135a53c6f10ab /lib/Support/WindowsError.cpp | |
parent | 33fe993f2ec3a146e5954db14aa9a751141677f0 (diff) | |
download | llvm-d8b23109b26f2070e21d5515ed2472ca9ab0111c.tar.gz llvm-d8b23109b26f2070e21d5515ed2472ca9ab0111c.tar.bz2 llvm-d8b23109b26f2070e21d5515ed2472ca9ab0111c.tar.xz |
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
Diffstat (limited to 'lib/Support/WindowsError.cpp')
-rw-r--r-- | lib/Support/WindowsError.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |