LLVM  4.0.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::object::Archive Class Reference

#include <Archive.h>

Inheritance diagram for llvm::object::Archive:
[legend]
Collaboration diagram for llvm::object::Archive:
[legend]

Classes

class  Child
 
class  child_iterator
 
class  Symbol
 
class  symbol_iterator
 

Public Types

enum  Kind {
  K_GNU, K_MIPS64, K_BSD, K_DARWIN64,
  K_COFF
}
 

Public Member Functions

 Archive (MemoryBufferRef Source, Error &Err)
 
Kind kind () const
 
bool isThin () const
 
child_iterator child_begin (Error &Err, bool SkipInternal=true) const
 
child_iterator child_end () const
 
iterator_range< child_iteratorchildren (Error &Err, bool SkipInternal=true) const
 
symbol_iterator symbol_begin () const
 
symbol_iterator symbol_end () const
 
iterator_range< symbol_iteratorsymbols () const
 
Expected< Optional< Child > > findSym (StringRef name) const
 
bool isEmpty () const
 
bool hasSymbolTable () const
 
StringRef getSymbolTable () const
 
StringRef getStringTable () const
 
uint32_t getNumberOfSymbols () const
 
std::vector< std::unique_ptr
< MemoryBuffer > > 
takeThinBuffers ()
 
- Public Member Functions inherited from llvm::object::Binary
virtual ~Binary ()
 
StringRef getData () const
 
StringRef getFileName () const
 
MemoryBufferRef getMemoryBufferRef () const
 
unsigned int getType () const
 
bool isObject () const
 
bool isSymbolic () const
 
bool isArchive () const
 
bool isMachOUniversalBinary () const
 
bool isELF () const
 
bool isMachO () const
 
bool isCOFF () const
 
bool isWasm () const
 
bool isCOFFImportFile () const
 
bool isIR () const
 
bool isModuleSummaryIndex () const
 
bool isLittleEndian () const
 

Static Public Member Functions

static Expected
< std::unique_ptr< Archive > > 
create (MemoryBufferRef Source)
 
static bool classof (Binary const *v)
 

Additional Inherited Members

- Protected Types inherited from llvm::object::Binary
enum  {
  ID_Archive, ID_MachOUniversalBinary, ID_COFFImportFile, ID_IR,
  ID_ModuleSummaryIndex, ID_StartObjects, ID_COFF, ID_ELF32L,
  ID_ELF32B, ID_ELF64L, ID_ELF64B, ID_MachO32L,
  ID_MachO32B, ID_MachO64L, ID_MachO64B, ID_Wasm,
  ID_EndObjects
}
 
- Protected Member Functions inherited from llvm::object::Binary
 Binary (unsigned int Type, MemoryBufferRef Source)
 
- Static Protected Member Functions inherited from llvm::object::Binary
static unsigned int getELFType (bool isLE, bool is64Bits)
 
static unsigned int getMachOType (bool isLE, bool is64Bits)
 
- Protected Attributes inherited from llvm::object::Binary
MemoryBufferRef Data
 

Detailed Description

Definition at line 76 of file Archive.h.

Member Enumeration Documentation

Enumerator
K_GNU 
K_MIPS64 
K_BSD 
K_DARWIN64 
K_COFF 

Definition at line 211 of file Archive.h.

Constructor & Destructor Documentation

Archive::Archive ( MemoryBufferRef  Source,
Error Err 
)

Member Function Documentation

Archive::child_iterator Archive::child_begin ( Error Err,
bool  SkipInternal = true 
) const
Archive::child_iterator Archive::child_end ( ) const
iterator_range<child_iterator> llvm::object::Archive::children ( Error Err,
bool  SkipInternal = true 
) const
inline

Definition at line 224 of file Archive.h.

References child_begin(), child_end(), and llvm::make_range().

static bool llvm::object::Archive::classof ( Binary const v)
inlinestatic

Definition at line 236 of file Archive.h.

References llvm::object::Binary::isArchive().

Expected< std::unique_ptr< Archive > > Archive::create ( MemoryBufferRef  Source)
static
Expected< Optional< Archive::Child > > Archive::findSym ( StringRef  name) const
uint32_t Archive::getNumberOfSymbols ( ) const
StringRef llvm::object::Archive::getStringTable ( ) const
inline

Definition at line 246 of file Archive.h.

Referenced by llvm::object::ArchiveMemberHeader::getName().

StringRef llvm::object::Archive::getSymbolTable ( ) const
inline
bool Archive::hasSymbolTable ( ) const

Definition at line 976 of file Archive.cpp.

References llvm::StringRef::empty().

Referenced by getNumberOfSymbols(), and symbol_begin().

bool Archive::isEmpty ( ) const

Definition at line 974 of file Archive.cpp.

References llvm::object::Binary::Data, and llvm::MemoryBufferRef::getBufferSize().

Referenced by child_begin().

bool llvm::object::Archive::isThin ( ) const
inline
Kind llvm::object::Archive::kind ( ) const
inline
Archive::symbol_iterator Archive::symbol_begin ( ) const
Archive::symbol_iterator Archive::symbol_end ( ) const

Definition at line 935 of file Archive.cpp.

References getNumberOfSymbols(), and llvm::ARMBuildAttrs::Symbol.

Referenced by findSym(), and symbols().

iterator_range<symbol_iterator> llvm::object::Archive::symbols ( ) const
inline

Definition at line 231 of file Archive.h.

References llvm::make_range(), symbol_begin(), and symbol_end().

std::vector<std::unique_ptr<MemoryBuffer> > llvm::object::Archive::takeThinBuffers ( )
inline

Definition at line 249 of file Archive.h.


The documentation for this class was generated from the following files: