LLVM API Documentation
#include <Archive.h>
Collaboration diagram for llvm::ArchiveMember:
Constructors | |
ArchiveMember () | |
class | llvm::Archive |
Public Types | |
Types | |
enum | Flags { CompressedFlag = 1, SVR4SymbolTableFlag = 2, BSD4SymbolTableFlag = 4, LLVMSymbolTableFlag = 8, BytecodeFlag = 16, CompressedBytecodeFlag = 32, HasPathFlag = 64, HasLongFilenameFlag = 128, StringTableFlag = 256 } |
Public Member Functions | |
Accessors | |
Archive * | getArchive () const |
Get the archive associated with this member. | |
const sys::Path & | getPath () const |
Get the path to the archive member. | |
unsigned | getUser () const |
Get the user associated with this archive member. | |
unsigned | getGroup () const |
Get the group associated with this archive member. | |
unsigned | getMode () const |
Get the permission mode associated with this archive member. | |
sys::TimeValue | getModTime () const |
Get the time of last modification of the archive member. | |
unsigned | getSize () const |
Get the size of the archive member. | |
unsigned | getMemberSize () const |
Get total on-disk member size. | |
const void * | getData () const |
Get the data content of the archive member. | |
bool | isCompressed () const |
Determine if the member is a compressed regular file. | |
bool | isSVR4SymbolTable () const |
Determine if this member is a SVR4 symbol table. | |
bool | isBSD4SymbolTable () const |
Determine if this member is a BSD4.4 symbol table. | |
bool | isLLVMSymbolTable () const |
Determine if this member is the LLVM symbol table. | |
bool | isStringTable () const |
Determine if this member is the ar(1) string table. | |
bool | isBytecode () const |
Determine if this member is a bytecode file. | |
bool | isCompressedBytecode () const |
Determine if the member is a compressed bytecode file. | |
bool | hasPath () const |
Determine if the member has a path. | |
bool | hasLongFilename () const |
Determin if the member has a long file name. | |
const sys::Path::StatusInfo & | getStatusInfo () const |
Obtain the status info for the archive member. | |
void | replaceWith (const sys::Path &aFile) |
Replace contents of archive member with a new file. | |
ilist methods - do not use | |
const ArchiveMember * | getNext () const |
const ArchiveMember * | getPrev () const |
ArchiveMember * | getNext () |
ArchiveMember * | getPrev () |
void | setPrev (ArchiveMember *p) |
void | setNext (ArchiveMember *n) |
This class is the main class manipulated by users of the Archive class. It holds information about one member of the Archive. It is also the element stored by the Archive's ilist, the Archive's main abstraction. Because of the special requirements of archive files, users are not permitted to construct ArchiveMember instances. You should obtain them from the methods of the Archive class instead.
Definition at line 42 of file Archive.h.
|
|
The default constructor is only used by the Archive's iplist when it constructs the list's sentry node. Definition at line 40 of file Archive.cpp. References llvm::sys::Path::StatusInfo::fileSize, llvm::sys::Path::StatusInfo::group, llvm::sys::Path::StatusInfo::mode, llvm::sys::Path::StatusInfo::modTime, llvm::sys::TimeValue::now(), and llvm::sys::Path::StatusInfo::user. |
|
Get the archive associated with this member.
|
|
Get the data content of the archive member. This method will return a pointer to the in-memory content of the archive member, if it is available. If the data has not been loaded into memory, the return value will be null.
Definition at line 112 of file Archive.h. Referenced by llvm::Archive::findModuleDefiningSymbol(), llvm::Archive::loadArchive(), llvm::Archive::loadSymbolTable(), and llvm::Archive::writeMember(). |
|
Get the group associated with this archive member. The "group" is the owning group of the file per Unix security. This may not have any applicability on non-Unix systems but is a required component of the "ar" file format. Definition at line 84 of file Archive.h. References llvm::sys::Path::StatusInfo::group. Referenced by llvm::Archive::fillHeader(). |
|
Get total on-disk member size. This method returns the total size of the archive member as it appears on disk. This includes the file content, the header, the long file name if any, and the padding. Definition at line 23 of file Archive.cpp. References llvm::sys::Path::StatusInfo::fileSize, llvm::sys::Path::get(), and hasLongFilename(). |
|
Get the permission mode associated with this archive member. The "mode" specifies the access permissions for the file per Unix security. This may not have any applicabiity on non-Unix systems but is a required component of the "ar" file format. Definition at line 90 of file Archive.h. References llvm::sys::Path::StatusInfo::mode. Referenced by llvm::Archive::fillHeader(). |
|
Get the time of last modification of the archive member. This method returns the time at which the archive member was last modified when it was not in the archive. Definition at line 95 of file Archive.h. References llvm::sys::Path::StatusInfo::modTime. Referenced by llvm::Archive::fillHeader(). |
|
|
|
|
|
Get the path to the archive member.
Definition at line 72 of file Archive.h. Referenced by llvm::Archive::fillHeader(), llvm::Archive::findModuleDefiningSymbol(), llvm::Archive::findModulesDefiningSymbols(), and llvm::Archive::writeMember(). |
|
|
|
|
|
Get the size of the archive member.
Definition at line 99 of file Archive.h. References llvm::sys::Path::StatusInfo::fileSize. Referenced by llvm::Archive::findModuleDefiningSymbol(), llvm::Archive::findModulesDefiningSymbols(), llvm::Archive::loadArchive(), llvm::Archive::loadSymbolTable(), and llvm::Archive::writeMember(). |
|
Obtain the status info for the archive member. This method returns the status info (like Unix stat(2)) for the archive member. The status info provides the file's size, permissions, and modification time. The contents of the Path::StatusInfo structure, other than the size and modification time, may not have utility on non-Unix systems.
|
|
Get the user associated with this archive member. The "user" is the owner of the file per Unix security. This may not have any applicability on non-Unix systems but is a required component of the "ar" file format. Definition at line 78 of file Archive.h. References llvm::sys::Path::StatusInfo::user. Referenced by llvm::Archive::fillHeader(). |
|
Determin if the member has a long file name. Long filenames are an artifact of the ar(1) file format which allows up to sixteen characters in its header and doesn't allow a path separator character (/). To avoid this, a "long format" member name is allowed that doesn't have this restriction. This method determines if that "long format" is used for this member.
Definition at line 156 of file Archive.h. References HasLongFilenameFlag. Referenced by getMemberSize(). |
|
Determine if the member has a path.
Definition at line 147 of file Archive.h. References HasPathFlag. |
|
Determine if this member is a BSD4.4 symbol table.
Definition at line 127 of file Archive.h. References BSD4SymbolTableFlag. Referenced by llvm::Archive::fillHeader(), llvm::Archive::loadArchive(), llvm::Archive::loadSymbolTable(), and llvm::Archive::writeMember(). |
|
Determine if this member is a bytecode file.
Definition at line 139 of file Archive.h. References BytecodeFlag. Referenced by llvm::Archive::findModulesDefiningSymbols(), and llvm::Archive::writeMember(). |
|
Determine if the member is a compressed regular file. This method determines if the member is a regular compressed file. Note that compressed bytecode files will yield "false" for this method.
Definition at line 119 of file Archive.h. References CompressedFlag. Referenced by llvm::Archive::writeMember(). |
|
Determine if the member is a compressed bytecode file.
Definition at line 143 of file Archive.h. References CompressedBytecodeFlag. Referenced by llvm::Archive::findModulesDefiningSymbols(), and llvm::Archive::writeMember(). |
|
Determine if this member is the LLVM symbol table.
Definition at line 131 of file Archive.h. References LLVMSymbolTableFlag. Referenced by llvm::Archive::fillHeader(), llvm::Archive::loadArchive(), llvm::Archive::loadSymbolTable(), and llvm::Archive::writeMember(). |
|
Determine if this member is the ar(1) string table.
Definition at line 135 of file Archive.h. References StringTableFlag. Referenced by llvm::Archive::fillHeader(), llvm::Archive::loadArchive(), and llvm::Archive::loadSymbolTable(). |
|
Determine if this member is a SVR4 symbol table.
Definition at line 123 of file Archive.h. References SVR4SymbolTableFlag. Referenced by llvm::Archive::fillHeader(), llvm::Archive::loadArchive(), llvm::Archive::loadSymbolTable(), and llvm::Archive::writeMember(). |
|
Replace contents of archive member with a new file.
This method causes the archive member to be replaced with the contents of the file specified by Definition at line 63 of file Archive.cpp. References ARFILE_BSD4_SYMTAB_NAME, ARFILE_LLVM_SYMTAB_NAME, ARFILE_STRTAB_NAME, ARFILE_SVR4_SYMTAB_NAME, BSD4SymbolTableFlag, llvm::sys::BytecodeFileType, BytecodeFlag, llvm::sys::CompressedBytecodeFileType, CompressedBytecodeFlag, CompressedFlag, llvm::sys::Path::exists(), llvm::sys::Path::get(), llvm::sys::Path::getMagicNumber(), llvm::sys::Path::getStatusInfo(), HasLongFilenameFlag, HasPathFlag, llvm::sys::IdentifyFileType(), LLVMSymbolTableFlag, StringTableFlag, and SVR4SymbolTableFlag. |
|
|
|
|
|
|