#include #include #include #include #include #include #include #include #include #include #include #include ">

LLVM: lib/Support/Unix/Unix.h File Reference (original) (raw)

#include "llvm/Config/config.h"
#include "[llvm/Support/Chrono.h](Chrono%5F8h%5Fsource.html)"
#include "[llvm/Support/Errno.h](Errno%5F8h%5Fsource.html)"
#include "[llvm/Support/ErrorHandling.h](llvm%5F2Support%5F2ErrorHandling%5F8h%5Fsource.html)"
#include <assert.h>
#include <cerrno>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/time.h>
#include <time.h>
#include <dlfcn.h>
#include <fcntl.h>

Go to the source code of this file.

Namespaces
namespace llvm
This is an optimization pass for GlobalISel generic memory operations.
namespace llvm::sys
Functions
static bool MakeErrMsg (std::string *ErrMsg, const std::string &prefix, int errnum=-1)
This function builds an error message into ErrMsg using the prefix string and the Unix error number given by errnum.
static void ReportErrnumFatal (const char *Msg, int errnum)
std::chrono::microseconds llvm::sys::toDuration (const struct timeval &TV)
Convert a struct timeval to a duration.
struct timespec llvm::sys::toTimeSpec (TimePoint<> TP)
Convert a time point to struct timespec.
struct timeval llvm::sys::toTimeVal (TimePoint< std::chrono::microseconds > TP)
Convert a time point to struct timeval.

MakeErrMsg()

This function builds an error message into ErrMsg using the prefix string and the Unix error number given by errnum.

If errnum is -1, the default then the value of errno is used. Make an error message

If the error number can be converted to a string, it will be separated from prefix by ": ".

Definition at line 52 of file Unix.h.

References llvm::sys::StrError().

Referenced by ReportErrnumFatal().

ReportErrnumFatal()

void ReportErrnumFatal ( const char * Msg, int errnum ) inlinestatic