14#include "llvm/Config/config.h"
34#if defined(HAVE_STRERROR_R) || HAVE_DECL_STRERROR_S
35 const int MaxErrStrLen = 2000;
36 char buffer[MaxErrStrLen];
42#if defined(__GLIBC__) && defined(_GNU_SOURCE)
45 str = strerror_r(errnum, buffer, MaxErrStrLen - 1);
47 strerror_r(errnum, buffer, MaxErrStrLen - 1);
50#elif HAVE_DECL_STRERROR_S
51 strerror_s(buffer, MaxErrStrLen - 1, errnum);
57 str = strerror(errnum);
std::string StrError()
Returns a string representation of the errno value, using whatever thread-safe variant of strerror() ...
This is an optimization pass for GlobalISel generic memory operations.