llvm::sys

Host system utilities.

Namespaces

NameDescription
fs Filesystem path and open-flag helpers.
locale
path
sandbox
unicode

Types

NameDescription
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. Regardless of the terminology or the operating system interface, this class provides a portable interface that allows dynamic libraries to be loaded and searched for externally defined symbols. This is typically used to provide "plug-in" support. It also allows for symbols to be defined which don't live in any library, but rather the main program itself, useful on Windows where the main executable cannot be searched.
InitializeCOMRAII
Memory This class provides various memory handling functions that manipulate MemoryBlock instances.
MemoryBlock This class encapsulates the notion of a memory block which has an address and a size. It is used by the Memory class (a friend) as the result of various memory allocation operations.
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 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.
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.
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 This class provides an abstraction for a timeout around an operation that must complete in a given amount of time. Failure to complete before the timeout is an unrecoverable situation and no mechanisms to attempt to handle it are provided.

Type Aliases

NameDescription
Mutex Mutex - A standard, always enforced mutex.
RWMutex
ScopedLock
ScopedReader
ScopedWriter
SignalHandlerCallback Callback invoked by AddSignalHandler when an abort/kill signal occurs.
SmartScopedLock
SmartScopedReader
SmartScopedWriter
TimePoint A time point on the system clock.
UtcTime A time point on the UTC clock with duration D (default nanoseconds).
cas_flag
process_t
procid_t

Enums

NameDescription
COMThreadingMode
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. The handler can have a cookie passed to it to identify what instance of the handler it is. The NeedsPOSIXUtilitySignalHandling argument indicates whether POSIX signal handling semantics are followed, so that the signal handler resignals itself to terminate after handling the signal.
ChangeStdinMode
ChangeStdinToBinary
ChangeStdoutMode
ChangeStdoutToBinary
CleanupOnSignal This function does the following: - clean up any temporary files registered with RemoveFileOnSignal() - dump the callstack from the exception context - call any relevant interrupt/signal handlers - create a core/mini dump of the exception context whenever possible Context is a system-specific failure context: it is the signal type on Unix; the ExceptionContext on Windows.
CompareAndSwap
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 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.
ExecuteNoWait Similar to ExecuteAndWait, but returns immediately.
MemoryFence
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
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
SetInfoSignalFunction Registers a function to be called when an "info" signal is delivered to the process.
SetInterruptFunction 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.
SetOneShotPipeSignalFunction Register a one-shot handler for a failed write to a pipe.
StrError StrError overloads
ValgrindDiscardTranslations
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. The particular format of the names are target dependent, and suitable for passing as -mattr to the target which matches the host.
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.
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
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.