LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::sys Namespace Reference


Classes

class  DynamicLibrary
 Portable dynamic library abstraction. More...
class  MappedFile
 An abstraction for memory mapped files. More...
class  MemoryBlock
 Memory block abstraction. More...
class  Memory
 An abstraction for memory operations. More...
class  Path
 An abstraction for operating system paths. 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...
struct  MappedFileInfo

Enumerations

enum  LLVMFileType { UnknownFileType = 0, BytecodeFileType = 1, CompressedBytecodeFileType = 2, ArchiveFileType = 3 }
 This enumeration delineates the kinds of files that LLVM knows about. More...

Functions

LLVMFileType IdentifyFileType (const char *magic, unsigned length)
void RemoveFileOnSignal (const Path &Filename)
 Remove a file if a fatal signal occurs.
void RemoveDirectoryOnSignal (const Path &path)
 Remove a directory if a fatal signal occurs.
void PrintStackTraceOnErrorSignal ()
 Print a stack trace if a fatal signal occurs.
void PreventCoreFiles ()
 Prevent core file generation.
TimeValue operator+ (const TimeValue &tv1, const TimeValue &tv2)
TimeValue operator- (const TimeValue &tv1, const TimeValue &tv2)
static bool IsLibrary (Path &path, const std::string &basename)

Variables

static PathTempDirectory = NULL


Enumeration Type Documentation

enum llvm::sys::LLVMFileType
 

This enumeration delineates the kinds of files that LLVM knows about.

Enumerator:
UnknownFileType  Unrecognized file.
BytecodeFileType  Uncompressed bytecode file.
CompressedBytecodeFileType  Compressed bytecode file.
ArchiveFileType  ar style archive file

Definition at line 534 of file Path.h.


Function Documentation

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 26 of file Path.cpp.

References ArchiveFileType, BytecodeFileType, CompressedBytecodeFileType, and UnknownFileType.

Referenced by llvm::Archive::addFileBefore(), llvm::Archive::parseMemberHeader(), and llvm::ArchiveMember::replaceWith().

static bool llvm::sys::IsLibrary Path &  path,
const std::string &  basename
[inline, static]
 

Definition at line 126 of file Win32/Path.cpp.

References llvm::sys::Path::appendFile(), llvm::sys::Path::appendSuffix(), llvm::sys::Path::clear(), llvm::sys::Path::elideFile(), llvm::sys::Path::elideSuffix(), llvm::sys::Path::GetDLLSuffix(), and llvm::sys::Path::readable().

Referenced by llvm::sys::Path::GetLibraryPath().

TimeValue llvm::sys::operator+ const TimeValue &  tv1,
const TimeValue &  tv2
[inline]
 

Adds two TimeValue objects together.

Returns:
The sum of the two operands as a new TimeValue

Definition at line 360 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.

Returns:
The difference of the two operands as a new TimeValue

Definition at line 366 of file TimeValue.h.

References llvm::sys::TimeValue::nanos_, llvm::sys::TimeValue::normalize(), and llvm::sys::TimeValue::seconds_.

void llvm::sys::PreventCoreFiles  ) 
 

Prevent core file generation.

This function makes the necessary calls to the operating system to prevent core files or any other kind of large memory dumps that can occur when a program fails.

Definition at line 23 of file Unix/SysConfig.cpp.

References ThrowErrno().

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.

Definition at line 163 of file Unix/Signals.cpp.

References KillSigs, KillSigsEnd, and llvm::RegisterHandler().

void llvm::sys::RemoveDirectoryOnSignal const Path &  path  ) 
 

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.

Definition at line 148 of file Unix/Signals.cpp.

References DirectoriesToRemove, IntSigs, IntSigsEnd, llvm::sys::Path::isDirectory(), KillSigs, KillSigsEnd, and llvm::RegisterHandler().

void llvm::sys::RemoveFileOnSignal const Path &  Filename  ) 
 

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.

Definition at line 137 of file Unix/Signals.cpp.

References FilesToRemove, llvm::sys::Path::get(), IntSigs, IntSigsEnd, KillSigs, KillSigsEnd, and llvm::RegisterHandler().

Referenced by llvm::Archive::writeToDisk().


Variable Documentation

Path* llvm::sys::TempDirectory = NULL [static]
 

Definition at line 71 of file Win32/Path.cpp.