LLVM  6.0.0svn
Namespaces | Functions
Unix.h File Reference
#include "llvm/Config/config.h"
#include "llvm/Support/Chrono.h"
#include "llvm/Support/Errno.h"
#include <algorithm>
#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/param.h>
#include <sys/time.h>
#include <time.h>
#include <dlfcn.h>
#include <fcntl.h>
Include dependency graph for Unix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 
 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. More...
 
std::chrono::microseconds llvm::sys::toDuration (const struct timeval &TV)
 Convert a struct timeval to a duration. More...
 
struct timespec llvm::sys::toTimeSpec (TimePoint<> TP)
 Convert a time point to struct timespec. More...
 
struct timeval llvm::sys::toTimeVal (TimePoint< std::chrono::microseconds > TP)
 Convert a time point to struct timeval. More...
 

Function Documentation

◆ MakeErrMsg()

static bool MakeErrMsg ( std::string *  ErrMsg,
const std::string &  prefix,
int  errnum = -1 
)
inlinestatic

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 63 of file Unix.h.

References llvm::sys::StrError().