llvm::sys

Host system utilities.

Namespaces

NameDescription
fs Filesystem path and open-flag helpers.
locale Utilities for measuring display width and testing printable characters.
path Path parsing and manipulation utilities (TR2/boost-filesystem style).
sandbox Thread-local controls for detecting unexpected host filesystem IO.
unicode Utilities for querying Unicode character properties and names.

Types

NameDescription
DynamicLibrary Portable interface to load and search dynamic libraries.
InitializeCOMRAII RAII helper that initializes COM for the current thread.
Memory This class provides various memory handling functions that manipulate MemoryBlock instances.
MemoryBlock Memory block with an address and a size.
OwningMemoryBlock Owning version of MemoryBlock.
Process A collection of legacy interfaces for querying information about the current executing process.
ProcessInfo This struct encapsulates information about a process.
ProcessStatistics This struct encapsulates information about a process execution.
SmartMutex Mutex that optionally becomes a no-op outside multithreaded mode.
SmartRWMutex An R/W mutex that can become a no-op when not multithreaded.
UnicodeCharRange Represents a closed range of Unicode code points [Lower, Upper].
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.
UtcClock Clock whose time points represent UTC instants for formatting.
Watchdog Abstraction for a timeout around an operation that must complete in time.

Type Aliases

NameDescription
Mutex Mutex - A standard, always enforced mutex.
RWMutex A standard, always-enforced reader/writer mutex.
ScopedLock RAII lock guard for Mutex.
ScopedReader RAII acquisition of a reader lock on a RWMutex.
ScopedWriter RAII acquisition of a writer lock on a RWMutex.
SignalHandlerCallback Callback invoked by AddSignalHandler when an abort/kill signal occurs.
SmartScopedLock RAII lock guard for SmartMutex.
SmartScopedReader RAII shared (reader) lock guard for SmartRWMutex.
SmartScopedWriter RAII exclusive (writer) lock guard for SmartRWMutex.
TimePoint A time point on the system clock.
UtcTime A time point on the UTC clock with duration D (default nanoseconds).
cas_flag Integer type used as the value type for legacy compare-and-swap.
process_t Platform-native process handle type.
procid_t Process identifier type.

Enums

NameDescription
COMThreadingMode Threading model used when initializing COM on Windows.
WindowsEncodingMethod File encoding options when writing contents that a non-UTF8 tool will read (on Windows systems). For UNIX, we always use UTF-8.

Functions

NameDescription
AddSignalHandler Add a function to be called when an abort/kill signal is delivered to the process.
ChangeStdinMode Change stdin to the mode described by Flags.
ChangeStdinToBinary Change stdin to binary mode.
ChangeStdoutMode Change stdout to the mode described by Flags.
ChangeStdoutToBinary Change stdout to binary mode.
CleanupOnSignal Clean up temporary files, dump the stack, run handlers, and create a crash dump after a fatal signal.
CompareAndSwap Atomically compares the value at ptr with old_value and stores new_value if they are equal.
DefaultOneShotPipeSignalHandler On Unix systems and Windows, this function exits with an "IO error" exit code.
DisableSystemDialogsOnCrash Disable all system dialog boxes that appear when the process crashes.
DontRemoveFileOnSignal This function removes a file from the list of files to be removed on signal delivery.
ExecuteAndWait Execute a program and wait for it to finish.
ExecuteNoWait Similar to ExecuteAndWait, but returns immediately.
MemoryFence Issues a full memory fence that orders preceding and following accesses.
PrintStackTrace Print the stack trace using the given raw_ostream object.
PrintStackTraceOnErrorSignal 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.
RemoveFileOnSignal 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.
RetryAfterSignal Invokes F with As, retrying when interrupted by a signal.
RunInterruptHandlers This function runs all the registered interrupt handlers, including the removal of files registered by RemoveFileOnSignal.
RunSignalHandlers Run all registered signal handlers added via AddSignalHandler.
RunningOnValgrind Returns true if Valgrind is controlling this process.
SetInfoSignalFunction Registers a function to be called when an "info" signal is delivered to the process.
SetInterruptFunction Register a function to be called when the user interrupts the program.
SetOneShotPipeSignalFunction Register a one-shot handler for a failed write to a pipe.
StrError StrError overloads
ValgrindDiscardTranslations Discards Valgrind's translation of code in the given address range.
Wait This function waits for the process specified by PI to finish.
commandLineFitsWithinSystemLimits Return true if the given arguments fit within system-specific argument length limits.
findProgramByName Find the first executable file Name in Paths.
getDefaultTargetTriple getDefaultTargetTriple() - Return the default target triple the compiler has been configured to produce code for.
getHostCPUFeatures getHostCPUFeatures - Get the LLVM names for the host CPU features.
getHostCPUName getHostCPUName - Get the LLVM name for the host CPU.
getProcessTriple getProcessTriple() - Return an appropriate target triple for generating code to be loaded into the current process, e.g. when using the JIT.
getSwappedBytes getSwappedBytes overloads
printArg Print a command argument, and optionally quote it.
printDefaultTargetAndDetectedCPU This is a function compatible with cl::AddExtraVersionPrinter, which adds info about the current target triple and detected CPU.
swapByteOrder Reverse the byte order of Value in place.
toTimePoint toTimePoint overloads
toTimeT toTimeT overloads
toUtcTime Convert a std::time_t to a UtcTime.
unregisterHandlers Unregister previously installed signal handlers, restoring prior behavior.
writeFileWithEncoding Saves the UTF8-encoded contents string into the file FileName using a specific encoding.
operator<< Stream insertion operators
operator< Less-than operators

Variables

NameDescription
EnvPathSeparator OS-specific separator for PATH-like environment variables.
IsBigEndianHost True if this host stores multi-byte values most-significant byte first.
IsLittleEndianHost True if this host stores multi-byte values least-significant byte first.