diff options
| author | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-11-01 00:34:09 +0000 |
|---|---|---|
| committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-11-01 00:34:09 +0000 |
| commit | be6f003275fe9d897ff3cb2088fa212f02c93532 (patch) | |
| tree | 52ae93baaca30023fbb0548bfdcea2b178440ce9 /llvm/lib/Support/Errno.cpp | |
| parent | 366bd863356c6a8b2fa7e7c3a4b1d0183ed6b224 (diff) | |
| download | bcm5719-llvm-be6f003275fe9d897ff3cb2088fa212f02c93532.tar.gz bcm5719-llvm-be6f003275fe9d897ff3cb2088fa212f02c93532.zip | |
[Support] Fix StrError on Windows to actually return the error string...
llvm-svn: 167191
Diffstat (limited to 'llvm/lib/Support/Errno.cpp')
| -rw-r--r-- | llvm/lib/Support/Errno.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Support/Errno.cpp b/llvm/lib/Support/Errno.cpp index 00be43b7503..730220f47d9 100644 --- a/llvm/lib/Support/Errno.cpp +++ b/llvm/lib/Support/Errno.cpp @@ -53,8 +53,10 @@ std::string StrError(int errnum) { str = buffer; # endif #elif HAVE_DECL_STRERROR_S // "Windows Secure API" - if (errnum) + if (errnum) { strerror_s(buffer, MaxErrStrLen - 1, errnum); + str = buffer; + } #elif defined(HAVE_STRERROR) // Copy the thread un-safe result of strerror into // the buffer as fast as possible to minimize impact |

