14 #include "llvm/Config/config.h" 34 #endif // HAVE_ERRNO_H 40 #if defined(HAVE_STRERROR_R) || HAVE_DECL_STRERROR_S 41 const int MaxErrStrLen = 2000;
42 char buffer[MaxErrStrLen];
46 #ifdef HAVE_STRERROR_R 48 #if defined(__GLIBC__) && defined(_GNU_SOURCE) 51 str = strerror_r(errnum, buffer, MaxErrStrLen - 1);
53 strerror_r(errnum, buffer, MaxErrStrLen - 1);
56 #elif HAVE_DECL_STRERROR_S // "Windows Secure API" 57 strerror_s(buffer, MaxErrStrLen - 1, errnum);
59 #elif defined(HAVE_STRERROR) 63 str = strerror(errnum);
68 stream <<
"Error #" << errnum;
This class represents lattice values for constants.
std::string StrError()
Returns a string representation of the errno value, using whatever thread-safe variant of strerror() ...
A raw_ostream that writes to an std::string.