LLVM API Documentation
#include <Archive.h>
Inheritance diagram for llvm::ArchiveMember:


Constructors | |
| ArchiveMember () | |
| class | llvm::Archive |
Public Types | |
Types | |
| enum | Flags { CompressedFlag = 1, SVR4SymbolTableFlag = 2, BSD4SymbolTableFlag = 4, LLVMSymbolTableFlag = 8, BitcodeFlag = 16, 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. | |
| uint64_t | 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 | isBitcode () const |
| Determine if this member is a bitcode 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::FileStatus & | getFileStatus () const |
| Obtain the status info for the archive member. | |
| bool | replaceWith (const sys::Path &aFile, std::string *ErrMsg) |
| Replace contents of archive member with a new file. | |
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 43 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 45 of file Archive.cpp. References llvm::sys::FileStatus::fileSize, llvm::sys::Process::GetCurrentGroupId(), llvm::sys::Process::GetCurrentUserId(), llvm::sys::FileStatus::group, llvm::sys::FileStatus::mode, llvm::sys::FileStatus::modTime, llvm::sys::TimeValue::now(), and llvm::sys::FileStatus::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 111 of file Archive.h. Referenced by llvm::Archive::findModuleDefiningSymbol(), 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 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 83 of file Archive.h. 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 28 of file Archive.cpp. References llvm::sys::FileStatus::fileSize, hasLongFilename(), and llvm::sys::Path::toString(). |
|
|
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 89 of file Archive.h. 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 94 of file Archive.h. Referenced by llvm::Archive::fillHeader(). |
|
|
Get the path to the archive member.
Definition at line 71 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 98 of file Archive.h. Referenced by llvm::Archive::findModuleDefiningSymbol(), llvm::Archive::findModulesDefiningSymbols(), llvm::Archive::loadArchive(), llvm::Archive::loadSymbolTable(), and llvm::Archive::writeMember(). |
|
|
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 77 of file Archive.h. 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 149 of file Archive.h. Referenced by getMemberSize(). |
|
|
Determine if the member has a path.
|
|
|
Determine if this member is a bitcode file.
Definition at line 136 of file Archive.h. Referenced by llvm::Archive::findModulesDefiningSymbols(), and llvm::Archive::writeMember(). |
|
|
Determine if this member is a BSD4.4 symbol table.
Definition at line 124 of file Archive.h. Referenced by llvm::Archive::fillHeader(), llvm::Archive::loadArchive(), and llvm::Archive::loadSymbolTable(). |
|
|
Determine if the member is a compressed regular file. This method determines if the member is a regular compressed file.
|
|
|
Determine if this member is the LLVM symbol table.
Definition at line 128 of file Archive.h. Referenced by llvm::Archive::fillHeader(), llvm::Archive::loadArchive(), and llvm::Archive::loadSymbolTable(). |
|
|
Determine if this member is the ar(1) string table.
Definition at line 132 of file Archive.h. Referenced by llvm::Archive::fillHeader(), llvm::Archive::loadArchive(), and llvm::Archive::loadSymbolTable(). |
|
|
Determine if this member is a SVR4 symbol table.
Definition at line 120 of file Archive.h. Referenced by llvm::Archive::fillHeader(), llvm::Archive::loadArchive(), and llvm::Archive::loadSymbolTable(). |
|
||||||||||||
|
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 68 of file Archive.cpp. References llvm::sys::Path::c_str(), llvm::sys::Path::exists(), llvm::sys::PathWithStatus::getFileStatus(), llvm::sys::Path::getMagicNumber(), llvm::sys::IdentifyFileType(), and llvm::sys::Path::toString(). |
|
|
|