LLVM API Documentation
Classes | |
| class | DynamicLibrary |
| class | MemoryBlock |
| Memory block abstraction. More... | |
| class | Memory |
| An abstraction for memory operations. More... | |
| class | Mutex |
| Platform agnostic Mutex class. More... | |
| class | FileStatus |
| File status structure. More... | |
| class | Path |
| An abstraction for operating system paths. More... | |
| class | PathWithStatus |
| Path with file status class. More... | |
| class | Process |
| An abstraction for operating system processes. More... | |
| class | Program |
| An abstraction for finding and executing programs. More... | |
| class | TimeValue |
| Provides an abstraction for a fixed point in time. More... | |
Enumerations | |
| enum | LLVMFileType { Unknown_FileType = 0, Bitcode_FileType, Archive_FileType, ELF_Relocatable_FileType, ELF_Executable_FileType, ELF_SharedObject_FileType, ELF_Core_FileType, Mach_O_Object_FileType, Mach_O_Executable_FileType, Mach_O_FixedVirtualMemorySharedLib_FileType, Mach_O_Core_FileType, Mach_O_PreloadExectuable_FileType, Mach_O_DynamicallyLinkedSharedLib_FileType, Mach_O_DynamicLinker_FileType, Mach_O_Bundle_FileType, Mach_O_DynamicallyLinkedSharedLibStub_FileType, COFF_FileType } |
| This enumeration delineates the kinds of files that LLVM knows about. More... | |
Functions | |
| void | SetupAlarm (unsigned seconds) |
| void | TerminateAlarm () |
| int | AlarmStatus () |
| bool | hasDisassembler (void) |
| std::string | disassembleBuffer (uint8_t *start, size_t length, uint64_t pc=0) |
| bool | littleEndianHost () |
| bool | bigEndianHost () |
| std::string | osName () |
| std::string | osVersion () |
| LLVMFileType | IdentifyFileType (const char *magic, unsigned length) |
| bool | CopyFile (const Path &Dest, const Path &Src, std::string *ErrMsg) |
| Copy one file to another. | |
| bool | RemoveFileOnSignal (const Path &Filename, std::string *ErrMsg=0) |
| Remove a file if a fatal signal occurs. | |
| bool | RemoveDirectoryOnSignal (const Path &path, std::string *ErrMsg=0) |
| Remove a directory if a fatal signal occurs. | |
| void | PrintStackTraceOnErrorSignal () |
| Print a stack trace if a fatal signal occurs. | |
| void | SetInterruptFunction (void(*IF)()) |
| Register a function to be called when ctrl-c is pressed. | |
| TimeValue | operator+ (const TimeValue &tv1, const TimeValue &tv2) |
| TimeValue | operator- (const TimeValue &tv1, const TimeValue &tv2) |
Variables | |
| const char | PathSeparator |
This enumeration delineates the kinds of files that LLVM knows about.
| Unknown_FileType | Unrecognized file. |
| Bitcode_FileType | Bitcode file. |
| Archive_FileType | ar style archive file |
| ELF_Relocatable_FileType | ELF Relocatable object file. |
| ELF_Executable_FileType | ELF Executable image. |
| ELF_SharedObject_FileType | ELF dynamically linked shared lib. |
| ELF_Core_FileType | ELF core image. |
| Mach_O_Object_FileType | Mach-O Object file. |
| Mach_O_Executable_FileType | Mach-O Executable. |
| Mach_O_FixedVirtualMemorySharedLib_FileType | Mach-O Shared Lib, FVM. |
| Mach_O_Core_FileType | Mach-O Core File. |
| Mach_O_PreloadExectuable_FileType | Mach-O Preloaded Executable. |
| Mach_O_DynamicallyLinkedSharedLib_FileType | Mach-O dynlinked shared lib. |
| Mach_O_DynamicLinker_FileType | The Mach-O dynamic linker. |
| Mach_O_Bundle_FileType | Mach-O Bundle file. |
| Mach_O_DynamicallyLinkedSharedLibStub_FileType | Mach-O Shared lib stub. |
| COFF_FileType | COFF object file or lib. |
| int llvm::sys::AlarmStatus | ( | ) |
This function acquires the status of the alarm.
Referenced by llvm::SlowOperationInformer::progress().
| bool llvm::sys::bigEndianHost | ( | ) | [inline] |
| bool llvm::sys::CopyFile | ( | const Path & | Dest, | |
| const Path & | Src, | |||
| std::string * | ErrMsg | |||
| ) |
Copy one file to another.
This function can be used to copy the file specified by Src to the file specified by Dest. If an error occurs, Dest is removed.
| std::string llvm::sys::disassembleBuffer | ( | uint8_t * | start, | |
| size_t | length, | |||
| uint64_t | pc = 0 | |||
| ) |
This function provides some "glue" code to call external disassembler libraries.
Definition at line 39 of file Disassembler.cpp.
| bool llvm::sys::hasDisassembler | ( | void | ) |
This function returns true, if there is possible to use some external disassembler library. False otherwise.
Definition at line 29 of file Disassembler.cpp.
| LLVMFileType llvm::sys::IdentifyFileType | ( | const char * | magic, | |
| unsigned | length | |||
| ) |
This utility function allows any memory block to be examined in order to determine its file type.
Definition at line 55 of file Path.cpp.
References Archive_FileType, Bitcode_FileType, COFF_FileType, ELF_Core_FileType, ELF_Executable_FileType, ELF_Relocatable_FileType, ELF_SharedObject_FileType, Mach_O_Bundle_FileType, Mach_O_Core_FileType, Mach_O_DynamicallyLinkedSharedLib_FileType, Mach_O_DynamicallyLinkedSharedLibStub_FileType, Mach_O_DynamicLinker_FileType, Mach_O_Executable_FileType, Mach_O_FixedVirtualMemorySharedLib_FileType, Mach_O_Object_FileType, Mach_O_PreloadExectuable_FileType, type, and Unknown_FileType.
Referenced by llvm::Archive::addFileBefore(), llvm::sys::Path::isBitcodeFile(), llvm::sys::Path::isDynamicLibrary(), llvm::Linker::LinkInFile(), llvm::Linker::LinkInLibrary(), llvm::Archive::parseMemberHeader(), and llvm::ArchiveMember::replaceWith().
| bool llvm::sys::littleEndianHost | ( | ) | [inline] |
Definition at line 22 of file Host.h.
References c.
Referenced by bigEndianHost(), LoadIntFromMemory(), llvm::ExecutionEngine::LoadValueFromMemory(), StoreIntToMemory(), and llvm::ExecutionEngine::StoreValueToMemory().
| TimeValue llvm::sys::operator+ | ( | const TimeValue & | tv1, | |
| const TimeValue & | tv2 | |||
| ) | [inline] |
Adds two TimeValue objects together.
Definition at line 367 of file TimeValue.h.
References llvm::sys::TimeValue::nanos_, llvm::sys::TimeValue::normalize(), and llvm::sys::TimeValue::seconds_.
| TimeValue llvm::sys::operator- | ( | const TimeValue & | tv1, | |
| const TimeValue & | tv2 | |||
| ) | [inline] |
Subtracts two TimeValue objects.
Definition at line 373 of file TimeValue.h.
References llvm::sys::TimeValue::nanos_, llvm::sys::TimeValue::normalize(), and llvm::sys::TimeValue::seconds_.
| std::string llvm::sys::osName | ( | ) |
osName() - Return the name of the host operating system or "" if unknown.
| std::string llvm::sys::osVersion | ( | ) |
osVersion() - Return the operating system version as a string or "" if unknown.
| void llvm::sys::PrintStackTraceOnErrorSignal | ( | ) |
Print a stack trace if a fatal signal occurs.
When an error signal (such as SIBABRT or SIGSEGV) is delivered to the process, print a stack trace and then exit.
| bool llvm::sys::RemoveDirectoryOnSignal | ( | const Path & | path, | |
| std::string * | ErrMsg = 0 | |||
| ) |
Remove a directory if a fatal signal occurs.
This function registers a signal handler to ensure that if a fatal signal gets delivered to the process that the named directory and all its contents are removed.
| bool llvm::sys::RemoveFileOnSignal | ( | const Path & | Filename, | |
| std::string * | ErrMsg = 0 | |||
| ) |
Remove a file if a fatal signal occurs.
This function registers signal handlers to ensure that if a signal gets delivered that the named file is removed.
Referenced by llvm::Archive::writeToDisk().
| void llvm::sys::SetInterruptFunction | ( | void(*)() | IF | ) |
Register a function to be called when ctrl-c is pressed.
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.
| void llvm::sys::SetupAlarm | ( | unsigned | seconds | ) |
This function registers an alarm to trigger some number of seconds in the future. When that time arrives, the AlarmStatus function will begin to return 1 instead of 0. The user must poll the status of the alarm by making occasional calls to AlarmStatus. If the user sends an interrupt signal, AlarmStatus will begin returning -1, even if the alarm event occurred.
| seconds | Number of seconds in future when alarm arrives |
Referenced by llvm::SlowOperationInformer::SlowOperationInformer().
| void llvm::sys::TerminateAlarm | ( | ) |
This function terminates the alarm previously set up
Referenced by llvm::SlowOperationInformer::~SlowOperationInformer().
| const char llvm::sys::PathSeparator |
This is the OS-specific path separator: a colon on Unix or a semicolon on Windows.
Referenced by getPathList().