LLVM
8.0.1
|
Namespaces | |
detail | |
fs | |
locale | |
path | |
unicode | |
windows | |
Classes | |
class | DynamicLibrary |
This class provides a portable interface to dynamic libraries which also might be known as shared libraries, shared objects, dynamic shared objects, or dynamic link libraries. More... | |
class | InitializeCOMRAII |
class | Memory |
This class provides various memory handling functions that manipulate MemoryBlock instances. More... | |
class | MemoryBlock |
This class encapsulates the notion of a memory block which has an address and a size. More... | |
class | MutexImpl |
Platform agnostic Mutex class. More... | |
class | OwningMemoryBlock |
Owning version of MemoryBlock. More... | |
class | Process |
A collection of legacy interfaces for querying information about the current executing process. More... | |
struct | ProcessInfo |
This struct encapsulates information about a process. More... | |
class | RWMutexImpl |
Platform agnostic RWMutex class. More... | |
class | SmartMutex |
SmartMutex - A mutex with a compile time constant parameter that indicates whether this mutex should become a no-op when we're not running in multithreaded mode. More... | |
class | SmartRWMutex |
SmartMutex - An R/W mutex with a compile time constant parameter that indicates whether this mutex should become a no-op when we're not running in multithreaded mode. More... | |
class | SmartScopedLock |
struct | SmartScopedReader |
ScopedReader - RAII acquisition of a reader lock. More... | |
struct | SmartScopedWriter |
ScopedWriter - RAII acquisition of a writer lock. More... | |
class | ThreadLocal |
ThreadLocal - A class used to abstract thread-local storage. More... | |
class | ThreadLocalImpl |
struct | UnicodeCharRange |
Represents a closed range of Unicode code points [Lower, Upper]. More... | |
class | UnicodeCharSet |
Holds a reference to an ordered array of UnicodeCharRange and allows to quickly check if a code point is contained in the set represented by this array. More... | |
class | Watchdog |
This class provides an abstraction for a timeout around an operation that must complete in a given amount of time. More... | |
Typedefs | |
typedef uint32_t | cas_flag |
template<typename D = std::chrono::nanoseconds> | |
using | TimePoint = std::chrono::time_point< std::chrono::system_clock, D > |
A time point on the system clock. More... | |
typedef SmartMutex< false > | Mutex |
Mutex - A standard, always enforced mutex. More... | |
typedef SmartScopedLock< false > | ScopedLock |
typedef pid_t | procid_t |
typedef procid_t | process_t |
typedef SmartRWMutex< false > | RWMutex |
typedef SmartScopedReader< false > | ScopedReader |
typedef SmartScopedWriter< false > | ScopedWriter |
using | SignalHandlerCallback = void(*)(void *) |
Enumerations | |
enum | COMThreadingMode { COMThreadingMode::SingleThreaded, COMThreadingMode::MultiThreaded } |
enum | WindowsEncodingMethod { WEM_UTF8, WEM_CurrentCodePage, WEM_UTF16 } |
File encoding options when writing contents that a non-UTF8 tool will read (on Windows systems). More... | |
Functions | |
void | MemoryFence () |
cas_flag | CompareAndSwap (volatile cas_flag *ptr, cas_flag new_value, cas_flag old_value) |
LLVM_ATTRIBUTE_ALWAYS_INLINE std::time_t | toTimeT (TimePoint<> TP) |
Convert a TimePoint to std::time_t. More... | |
LLVM_ATTRIBUTE_ALWAYS_INLINE TimePoint< std::chrono::seconds > | toTimePoint (std::time_t T) |
Convert a std::time_t to a TimePoint. More... | |
LLVM_ATTRIBUTE_ALWAYS_INLINE TimePoint | toTimePoint (std::time_t T, uint32_t nsec) |
Convert a std::time_t + nanoseconds to a TimePoint. More... | |
std::string | StrError () |
Returns a string representation of the errno value, using whatever thread-safe variant of strerror() is available. More... | |
std::string | StrError (int errnum) |
Like the no-argument version above, but uses errnum instead of errno. More... | |
template<typename FailT , typename Fun , typename... Args> | |
auto | RetryAfterSignal (const FailT &Fail, const Fun &F, const Args &... As) -> decltype(F(As...)) |
std::string | getDefaultTargetTriple () |
getDefaultTargetTriple() - Return the default target triple the compiler has been configured to produce code for. More... | |
std::string | getProcessTriple () |
getProcessTriple() - Return an appropriate target triple for generating code to be loaded into the current process, e.g. More... | |
StringRef | getHostCPUName () |
getHostCPUName - Get the LLVM name for the host CPU. More... | |
bool | getHostCPUFeatures (StringMap< bool > &Features) |
getHostCPUFeatures - Get the LLVM names for the host CPU features. More... | |
int | getHostNumPhysicalCores () |
Get the number of physical cores (as opposed to logical cores returned from thread::hardware_concurrency(), which includes hyperthreads). More... | |
ErrorOr< std::string > | findProgramByName (StringRef Name, ArrayRef< StringRef > Paths={}) |
Find the first executable file Name in Paths . More... | |
std::error_code | ChangeStdinToBinary () |
std::error_code | ChangeStdoutToBinary () |
int | ExecuteAndWait (StringRef Program, ArrayRef< StringRef > Args, Optional< ArrayRef< StringRef >> Env=None, ArrayRef< Optional< StringRef >> Redirects={}, unsigned SecondsToWait=0, unsigned MemoryLimit=0, std::string *ErrMsg=nullptr, bool *ExecutionFailed=nullptr) |
This function executes the program using the arguments provided. More... | |
ProcessInfo | ExecuteNoWait (StringRef Program, ArrayRef< StringRef > Args, Optional< ArrayRef< StringRef >> Env, ArrayRef< Optional< StringRef >> Redirects={}, unsigned MemoryLimit=0, std::string *ErrMsg=nullptr, bool *ExecutionFailed=nullptr) |
Similar to ExecuteAndWait, but returns immediately. More... | |
bool | commandLineFitsWithinSystemLimits (StringRef Program, ArrayRef< StringRef > Args) |
Return true if the given arguments fit within system-specific argument length limits. More... | |
bool | commandLineFitsWithinSystemLimits (StringRef Program, ArrayRef< const char *> Args) |
Return true if the given arguments fit within system-specific argument length limits. More... | |
std::error_code | writeFileWithEncoding (StringRef FileName, StringRef Contents, WindowsEncodingMethod Encoding=WEM_UTF8) |
Saves the UTF8-encoded contents string into the file FileName using a specific encoding. More... | |
ProcessInfo | Wait (const ProcessInfo &PI, unsigned SecondsToWait, bool WaitUntilTerminates, std::string *ErrMsg=nullptr) |
This function waits for the process specified by PI to finish. More... | |
void | RunInterruptHandlers () |
This function runs all the registered interrupt handlers, including the removal of files registered by RemoveFileOnSignal. More... | |
bool | RemoveFileOnSignal (StringRef Filename, std::string *ErrMsg=nullptr) |
This function registers signal handlers to ensure that if a signal gets delivered that the named file is removed. More... | |
void | DontRemoveFileOnSignal (StringRef Filename) |
This function removes a file from the list of files to be removed on signal delivery. More... | |
void | PrintStackTraceOnErrorSignal (StringRef Argv0, bool DisableCrashReporting=false) |
When an error signal (such as SIGABRT or SIGSEGV) is delivered to the process, print a stack trace and then exit. More... | |
void | DisableSystemDialogsOnCrash () |
Disable all system dialog boxes that appear when the process crashes. More... | |
void | PrintStackTrace (raw_ostream &OS) |
Print the stack trace using the given raw_ostream object. More... | |
void | RunSignalHandlers () |
void | AddSignalHandler (SignalHandlerCallback FnPtr, void *Cookie) |
Add a function to be called when an abort/kill signal is delivered to the process. More... | |
void | SetInterruptFunction (void(*IF)()) |
This function registers a function to be called when the user "interrupts" the program (typically by pressing ctrl-c). More... | |
uint16_t | SwapByteOrder_16 (uint16_t value) |
SwapByteOrder_16 - This function returns a byte-swapped representation of the 16-bit argument. More... | |
uint32_t | SwapByteOrder_32 (uint32_t value) |
SwapByteOrder_32 - This function returns a byte-swapped representation of the 32-bit argument. More... | |
uint64_t | SwapByteOrder_64 (uint64_t value) |
SwapByteOrder_64 - This function returns a byte-swapped representation of the 64-bit argument. More... | |
unsigned char | getSwappedBytes (unsigned char C) |
signed char | getSwappedBytes (signed char C) |
char | getSwappedBytes (char C) |
unsigned short | getSwappedBytes (unsigned short C) |
signed short | getSwappedBytes (signed short C) |
unsigned int | getSwappedBytes (unsigned int C) |
signed int | getSwappedBytes (signed int C) |
unsigned long | getSwappedBytes (unsigned long C) |
signed long | getSwappedBytes (signed long C) |
unsigned long long | getSwappedBytes (unsigned long long C) |
signed long long | getSwappedBytes (signed long long C) |
float | getSwappedBytes (float C) |
double | getSwappedBytes (double C) |
template<typename T > | |
void | swapByteOrder (T &Value) |
bool | operator< (uint32_t Value, UnicodeCharRange Range) |
bool | operator< (UnicodeCharRange Range, uint32_t Value) |
bool | RunningOnValgrind () |
void | ValgrindDiscardTranslations (const void *Addr, size_t Len) |
std::chrono::microseconds | toDuration (const struct timeval &TV) |
Convert a struct timeval to a duration. More... | |
struct timespec | toTimeSpec (TimePoint<> TP) |
Convert a time point to struct timespec. More... | |
struct timeval | toTimeVal (TimePoint< std::chrono::microseconds > TP) |
Convert a time point to struct timeval. More... | |
std::chrono::nanoseconds | toDuration (FILETIME Time) |
TimePoint | toTimePoint (FILETIME Time) |
FILETIME | toFILETIME (TimePoint<> TP) |
Variables | |
constexpr bool | IsBigEndianHost = false |
static const bool | IsLittleEndianHost = !IsBigEndianHost |
const char | EnvPathSeparator = ':' |
This is the OS-specific separator for PATH like environment variables: More... | |
typedef uint32_t llvm::sys::cas_flag |
typedef SmartMutex<false> llvm::sys::Mutex |
typedef procid_t llvm::sys::process_t |
typedef pid_t llvm::sys::procid_t |
typedef SmartRWMutex<false> llvm::sys::RWMutex |
typedef SmartScopedLock<false> llvm::sys::ScopedLock |
using llvm::sys::SignalHandlerCallback = typedef void (*)(void *) |
using llvm::sys::TimePoint = typedef std::chrono::time_point<std::chrono::system_clock, D> |
A time point on the system clock.
This is provided for two reasons:
|
strong |
void llvm::sys::AddSignalHandler | ( | SignalHandlerCallback | FnPtr, |
void * | Cookie | ||
) |
Add a function to be called when an abort/kill signal is delivered to the process.
The handler can have a cookie passed to it to identify what instance of the handler it is.
Referenced by llvm::dbgs(), and RegisterCrashPrinter().
std::error_code llvm::sys::ChangeStdinToBinary | ( | ) |
Referenced by llvm::MemoryBuffer::getSTDIN().
std::error_code llvm::sys::ChangeStdoutToBinary | ( | ) |
Referenced by getFD().
Return true if the given arguments fit within system-specific argument length limits.
Referenced by commandLineFitsWithinSystemLimits().
bool llvm::sys::commandLineFitsWithinSystemLimits | ( | StringRef | Program, |
ArrayRef< const char *> | Args | ||
) |
Return true if the given arguments fit within system-specific argument length limits.
Definition at line 68 of file Program.cpp.
References A, commandLineFitsWithinSystemLimits(), llvm::SmallVectorImpl< T >::emplace_back(), llvm::SmallVectorImpl< T >::reserve(), and llvm::ArrayRef< T >::size().
sys::cas_flag llvm::sys::CompareAndSwap | ( | volatile cas_flag * | ptr, |
sys::cas_flag | new_value, | ||
sys::cas_flag | old_value | ||
) |
Definition at line 45 of file Atomic.cpp.
Referenced by llvm::call_once().
void llvm::sys::DisableSystemDialogsOnCrash | ( | ) |
Disable all system dialog boxes that appear when the process crashes.
void llvm::sys::DontRemoveFileOnSignal | ( | StringRef | Filename | ) |
This function removes a file from the list of files to be removed on signal delivery.
Referenced by llvm::sys::fs::TempFile::discard(), getHostID(), llvm::sys::fs::TempFile::keep(), and llvm::LockFileManager::~LockFileManager().
int llvm::sys::ExecuteAndWait | ( | StringRef | Program, |
ArrayRef< StringRef > | Args, | ||
Optional< ArrayRef< StringRef >> | Env = None , |
||
ArrayRef< Optional< StringRef >> | Redirects = {} , |
||
unsigned | SecondsToWait = 0 , |
||
unsigned | MemoryLimit = 0 , |
||
std::string * | ErrMsg = nullptr , |
||
bool * | ExecutionFailed = nullptr |
||
) |
This function executes the program using the arguments provided.
The invoked program will inherit the stdin, stdout, and stderr file descriptors, the environment and other configuration settings of the invoking program. This function waits for the program to finish, so should be avoided in library functions that aren't expected to block. Consider using ExecuteNoWait() instead.
Program | Path of the program to be executed. It is presumed this is the result of the findProgramByName method. |
Args | An array of strings that are passed to the program. The first element should be the name of the program. The array should not be terminated by an empty StringRef. |
Env | An optional vector of strings to use for the program's environment. If not provided, the current program's environment will be used. If specified, the vector should not be terminated by an empty StringRef. |
Redirects | An array of optional paths. Should have a size of zero or three. If the array is empty, no redirections are performed. Otherwise, the inferior process's stdin(0), stdout(1), and stderr(2) will be redirected to the corresponding paths, if the optional path is present (not llvm::None ). When an empty path is passed in, the corresponding file descriptor will be disconnected (ie, /dev/null'd) in a portable way. |
SecondsToWait | If non-zero, this specifies the amount of time to wait for the child process to exit. If the time expires, the child is killed and this call returns. If zero, this function will wait until the child finishes or forever if it doesn't. |
MemoryLimit | If non-zero, this specifies max. amount of memory can be allocated by process. If memory usage will be higher limit, the child is killed and this call returns. If zero
|
ErrMsg | If non-zero, provides a pointer to a string instance in which error messages will be returned. If the string is non-empty upon return an error occurred while invoking the program. |
Definition at line 31 of file Program.cpp.
References assert(), Execute(), llvm::sys::ProcessInfo::ReturnCode, and Wait().
Referenced by ExecGraphViewer(), and printSymbolizedStackTrace().
ProcessInfo llvm::sys::ExecuteNoWait | ( | StringRef | Program, |
ArrayRef< StringRef > | Args, | ||
Optional< ArrayRef< StringRef >> | Env, | ||
ArrayRef< Optional< StringRef >> | Redirects = {} , |
||
unsigned | MemoryLimit = 0 , |
||
std::string * | ErrMsg = nullptr , |
||
bool * | ExecutionFailed = nullptr |
||
) |
Similar to ExecuteAndWait, but returns immediately.
Definition at line 52 of file Program.cpp.
References assert(), and Execute().
Referenced by ExecGraphViewer().
ErrorOr<std::string> llvm::sys::findProgramByName | ( | StringRef | Name, |
ArrayRef< StringRef > | Paths = {} |
||
) |
Find the first executable file Name
in Paths
.
This does not perform hashing as a shell would but instead stats each PATH entry individually so should generally be avoided. Core LLVM library functions and options should instead require fully specified paths.
Name | name of the executable to find. If it contains any system slashes, it will be returned as is. |
Paths | optional list of paths to search for Name . If empty it will use the system PATH environment instead. |
Name
in Paths
if it exists. Name
if Name
has slashes in it. Otherwise an error. Referenced by ExecGraphViewer(), and printSymbolizedStackTrace().
std::string llvm::sys::getDefaultTargetTriple | ( | ) |
getDefaultTargetTriple() - Return the default target triple the compiler has been configured to produce code for.
The target triple is a string in the format of: CPU_TYPE-VENDOR-OPERATING_SYSTEM or CPU_TYPE-VENDOR-KERNEL-OPERATING_SYSTEM
Referenced by llvm::LTOCodeGenerator::compile(), llvm::object::MachOObjectFile::getHostArch(), LLVMGetDefaultTargetTriple(), and parseBitcodeFileImpl().
getHostCPUFeatures - Get the LLVM names for the host CPU features.
The particular format of the names are target dependent, and suitable for passing as -mattr to the target which matches the host.
Features | - A string mapping feature names to either true (if enabled) or false (if disabled). This routine makes no guarantees about exactly which features may appear in this map, except that they are all valid LLVM feature names. |
Definition at line 1427 of file Host.cpp.
Referenced by getHostNumPhysicalCores(), and LLVMGetHostCPUFeatures().
StringRef llvm::sys::getHostCPUName | ( | ) |
getHostCPUName - Get the LLVM name for the host CPU.
The particular format of the name is target dependent, and suitable for passing as -mcpu to the target which matches the host.
Definition at line 1143 of file Host.cpp.
References assert(), computeHostNumPhysicalCores(), llvm::count(), llvm::Data, llvm::errs(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFileAsStream(), llvm::SmallSet< T, N, C >::insert(), Name, and llvm::SmallSet< T, N, C >::size().
Referenced by llvm::sys::detail::getHostCPUNameForBPF(), and LLVMGetHostCPUName().
int llvm::sys::getHostNumPhysicalCores | ( | ) |
Get the number of physical cores (as opposed to logical cores returned from thread::hardware_concurrency(), which includes hyperthreads).
Returns -1 if unknown for the current host system.
Definition at line 1215 of file Host.cpp.
References llvm::StringSwitch< T, R >::Case(), computeHostNumPhysicalCores(), llvm::StringSwitch< T, R >::Default(), E, llvm::N86::EBX, getHostCPUFeatures(), getProcCpuinfoContent(), I, P, llvm::SmallVectorBase::size(), and startswith().
Referenced by llvm::heavyweight_hardware_concurrency().
std::string llvm::sys::getProcessTriple | ( | ) |
getProcessTriple() - Return an appropriate target triple for generating code to be loaded into the current process, e.g.
when using the JIT.
Definition at line 1430 of file Host.cpp.
References llvm::Triple::get32BitArchVariant(), llvm::Triple::get64BitArchVariant(), llvm::Triple::isArch32Bit(), llvm::Triple::isArch64Bit(), llvm::Triple::normalize(), and llvm::Triple::str().
Referenced by llvm::orc::JITTargetMachineBuilder::detectHost(), llvm::cl::ResetAllOptionOccurrences(), and llvm::EngineBuilder::selectTarget().
Definition at line 72 of file SwapByteOrder.h.
References C.
Referenced by getSwappedBytes(), llvm::RawInstrProfReader< IntPtrT >::getSymtab(), llvm::RawInstrProfReader< IntPtrT >::hasFormat(), and swapByteOrder().
Definition at line 73 of file SwapByteOrder.h.
References C.
Definition at line 74 of file SwapByteOrder.h.
References C.
Definition at line 76 of file SwapByteOrder.h.
References SwapByteOrder_16().
|
inline |
Definition at line 77 of file SwapByteOrder.h.
References SwapByteOrder_16().
Definition at line 79 of file SwapByteOrder.h.
References SwapByteOrder_32().
|
inline |
Definition at line 80 of file SwapByteOrder.h.
References SwapByteOrder_32().
Definition at line 83 of file SwapByteOrder.h.
References SwapByteOrder_32().
|
inline |
Definition at line 84 of file SwapByteOrder.h.
References C, getSwappedBytes(), SwapByteOrder_32(), and SwapByteOrder_64().
Definition at line 92 of file SwapByteOrder.h.
References SwapByteOrder_64().
|
inline |
Definition at line 95 of file SwapByteOrder.h.
References SwapByteOrder_64().
|
inline |
Definition at line 99 of file SwapByteOrder.h.
References C, and SwapByteOrder_32().
|
inline |
Definition at line 109 of file SwapByteOrder.h.
References C, and SwapByteOrder_64().
void llvm::sys::MemoryFence | ( | ) |
Definition at line 31 of file Atomic.cpp.
Referenced by llvm::call_once().
|
inline |
Definition at line 32 of file UnicodeCharRanges.h.
References llvm::sys::UnicodeCharRange::Lower.
Referenced by llvm::sys::fs::directory_entry::operator!=().
|
inline |
Definition at line 35 of file UnicodeCharRanges.h.
References llvm::sys::UnicodeCharRange::Upper.
void llvm::sys::PrintStackTrace | ( | raw_ostream & | OS | ) |
Print the stack trace using the given raw_ostream
object.
void llvm::sys::PrintStackTraceOnErrorSignal | ( | StringRef | Argv0, |
bool | DisableCrashReporting = false |
||
) |
When an error signal (such as SIGABRT or SIGSEGV) is delivered to the process, print a stack trace and then exit.
Print a stack trace if a fatal signal occurs.
Argv0 | the current binary name, used to find the symbolizer relative to the current binary before searching $PATH; can be StringRef(), in which case we will only search $PATH. |
DisableCrashReporting | if true , disable the normal crash reporting mechanisms on the underlying operating system. |
Referenced by llvm::InitLLVM::InitLLVM().
This function registers signal handlers to ensure that if a signal gets delivered that the named file is removed.
Remove a file if a fatal signal occurs.
Referenced by llvm::sys::fs::TempFile::create(), and getHostID().
|
inline |
Definition at line 34 of file Errno.h.
Referenced by getMemoryBufferForStream(), and getOpenFileImpl().
void llvm::sys::RunInterruptHandlers | ( | ) |
This function runs all the registered interrupt handlers, including the removal of files registered by RemoveFileOnSignal.
Referenced by llvm::PrintFatalError(), llvm::report_fatal_error(), and llvm::MCContext::reportFatalError().
bool llvm::sys::RunningOnValgrind | ( | ) |
Definition at line 33 of file Valgrind.cpp.
Referenced by ValgrindDiscardTranslations().
void llvm::sys::RunSignalHandlers | ( | ) |
Definition at line 61 of file Signals.cpp.
References CallbackAndCookie::Empty, CallbackAndCookie::Executing, I, CallbackAndCookie::Initialized, and MaxSignalHandlerCallbacks.
void llvm::sys::SetInterruptFunction | ( | void(*)() | IF | ) |
This function registers a function to be called when the user "interrupts" the program (typically by pressing ctrl-c).
When the user interrupts the program, the specified interrupt function is called instead of the program being killed, and the interrupt function automatically disabled. Note that interrupt functions are not allowed to call any non-reentrant functions. An null interrupt function pointer disables the current installed function. Note also that the handler may be executed on a different thread on some platforms. Register a function to be called when ctrl-c is pressed.
std::string llvm::sys::StrError | ( | ) |
Returns a string representation of the errno value, using whatever thread-safe variant of strerror() is available.
Be sure to call this immediately after the function that set errno, or errno may have been overwritten by an intervening call.
Definition at line 32 of file Errno.cpp.
Referenced by MakeErrMsg().
std::string llvm::sys::StrError | ( | int | errnum | ) |
Like the no-argument version above, but uses errnum
instead of errno.
Definition at line 37 of file Errno.cpp.
References llvm::raw_ostream::flush().
|
inline |
Definition at line 120 of file SwapByteOrder.h.
References getSwappedBytes().
Referenced by llvm::support::endian::byte_swap(), checkThreadCommand(), llvm::hashing::detail::fetch32(), llvm::hashing::detail::fetch64(), getU(), llvm::MachO::swapStruct(), llvm::RuntimeDyldImpl::writeInt16BE(), llvm::RuntimeDyldImpl::writeInt32BE(), llvm::RuntimeDyldImpl::writeInt64BE(), and writeInteger().
|
inline |
SwapByteOrder_16 - This function returns a byte-swapped representation of the 16-bit argument.
Definition at line 30 of file SwapByteOrder.h.
References llvm::MipsISD::Hi, and llvm::MipsISD::Lo.
Referenced by llvm::ByteSwap_16(), llvm::convertUTF16ToUTF8String(), and getSwappedBytes().
SwapByteOrder_32 - This function returns a byte-swapped representation of the 32-bit argument.
Definition at line 44 of file SwapByteOrder.h.
Referenced by llvm::ByteSwap_32(), getSwappedBytes(), and SwapByteOrder_64().
|
inline |
SwapByteOrder_64 - This function returns a byte-swapped representation of the 64-bit argument.
Definition at line 60 of file SwapByteOrder.h.
References llvm::MipsISD::Hi, llvm::MipsISD::Lo, and SwapByteOrder_32().
Referenced by llvm::ByteSwap_64(), and getSwappedBytes().
|
inline |
|
inline |
Definition at line 193 of file WindowsSupport.h.
|
inline |
Definition at line 214 of file WindowsSupport.h.
|
inline |
Convert a std::time_t to a TimePoint.
Definition at line 45 of file Chrono.h.
References LLVM_ATTRIBUTE_ALWAYS_INLINE.
Referenced by computeMemberData(), and llvm::object::ArchiveMemberHeader::getLastModified().
|
inline |
|
inline |
Definition at line 202 of file WindowsSupport.h.
struct timespec llvm::sys::toTimeSpec | ( | TimePoint<> | TP | ) |
Convert a time point to struct timespec.
Definition at line 84 of file Unix.h.
References llvm::count(), and toTimeT().
|
inline |
Convert a TimePoint to std::time_t.
Definition at line 37 of file Chrono.h.
References LLVM_ATTRIBUTE_ALWAYS_INLINE.
Referenced by llvm::getStructTM(), printRestOfMemberHeader(), toTimeSpec(), and toTimeVal().
struct timeval llvm::sys::toTimeVal | ( | TimePoint< std::chrono::microseconds > | TP | ) |
Convert a time point to struct timeval.
Definition at line 94 of file Unix.h.
References llvm::count(), and toTimeT().
Definition at line 39 of file Valgrind.cpp.
References RunningOnValgrind().
ProcessInfo llvm::sys::Wait | ( | const ProcessInfo & | PI, |
unsigned | SecondsToWait, | ||
bool | WaitUntilTerminates, | ||
std::string * | ErrMsg = nullptr |
||
) |
This function waits for the process specified by PI
to finish.
PI | The child process that should be waited on. |
SecondsToWait | If non-zero, this specifies the amount of time to wait for the child process to exit. If the time expires, the child is killed and this function returns. If zero, this function will perform a non-blocking wait on the child process. |
WaitUntilTerminates | If true, ignores SecondsToWait and waits until child has terminated. |
ErrMsg | If non-zero, provides a pointer to a string instance in which error messages will be returned. If the string is non-empty upon return an error occurred while invoking the program. |
Referenced by llvm::call_once(), ExecuteAndWait(), and readsVCCZ().
std::error_code llvm::sys::writeFileWithEncoding | ( | StringRef | FileName, |
StringRef | Contents, | ||
WindowsEncodingMethod | Encoding = WEM_UTF8 |
||
) |
Saves the UTF8-encoded contents
string into the file FileName
using a specific encoding.
This write file function adds the possibility to choose which encoding to use when writing a text file. On Windows, this is important when writing files with internationalization support with an encoding that is different from the one used in LLVM (UTF-8). We use this when writing response files, since GCC tools on MinGW only understand legacy code pages, and VisualStudio tools only understand UTF-16. For UNIX, using different encodings is silently ignored, since all tools work well with UTF-8. This function assumes that you only use UTF-8 text data and will convert it to your desired encoding before writing to the file.
FIXME: We use EM_CurrentCodePage to write response files for GNU tools in a MinGW/MinGW-w64 environment, which has serious flaws but currently is our best shot to make gcc/ld understand international characters. This should be changed as soon as binutils fix this to support UTF16 on mingw.
This is the OS-specific separator for PATH like environment variables:
Definition at line 30 of file Program.h.
Referenced by llvm::sys::Process::FindInEnvPath().
Definition at line 47 of file Host.h.
Referenced by llvm::FoldingSetNodeID::AddString(), llvm::hashing::detail::fetch32(), llvm::hashing::detail::fetch64(), and llvm::support::endian::system_endianness().
|
static |
Definition at line 50 of file Host.h.
Referenced by llvm::FoldingSetNodeID::AddString(), checkThreadCommand(), llvm::getHostEndianness(), llvm::DWARFContext::getRegisterInfo(), getStruct(), getStructOrErr(), getU(), llvm::DataExtractor::getU24(), getUniversalBinaryStruct(), LLVMInitializeBPFTargetMC(), LoadIntFromMemory(), llvm::yaml::MappingTraits< MachOYAML::Object >::mapping(), parseBPFArch(), StoreIntToMemory(), llvm::ExecutionEngine::StoreValueToMemory(), and writeInteger().