LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
Unix.h File Reference
#include "llvm/Config/config.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 <unistd.h>
#include <sys/param.h>
#include <sys/time.h>
#include <time.h>
#include <sys/wait.h>
#include <dlfcn.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.

Macros

#define WEXITSTATUS(stat_val)   ((unsigned)(stat_val) >> 8)
 
#define WIFEXITED(stat_val)   (((stat_val) & 255) == 0)
 

Functions

static bool MakeErrMsg (std::string *ErrMsg, const std::string &prefix, int errnum=-1)
 Make an error message. More...
 

Macro Definition Documentation

#define WEXITSTATUS (   stat_val)    ((unsigned)(stat_val) >> 8)

Definition at line 55 of file Unix.h.

#define WIFEXITED (   stat_val)    (((stat_val) & 255) == 0)

Definition at line 59 of file Unix.h.

Function Documentation

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

Make an error message.

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. If the error number can be converted to a string, it will be separated from prefix by ": ".

Definition at line 69 of file Unix.h.

References llvm::sys::StrError().