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

#include "llvm/Object/Archive.h"

Inheritance diagram for llvm::object::Archive:
Inheritance graph
Collaboration diagram for llvm::object::Archive:
Collaboration graph


class  Child
class  ChildFallibleIterator
class  Symbol
class  symbol_iterator

Public Types

enum  Kind {
using child_iterator = fallible_iterator< ChildFallibleIterator >

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
 Binary ()=delete
 Binary (const Binary &other)=delete
virtual ~Binary ()
virtual Error initContent ()
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 isTapiUniversal () const
bool isELF () const
bool isMachO () const
bool isCOFF () const
bool isXCOFF () const
bool isWasm () const
bool isCOFFImportFile () const
bool isIR () const
bool isMinidump () const
bool isTapiFile () const
bool isLittleEndian () const
bool isWinRes () const
Triple::ObjectFormatType getTripleObjectFormat () const

Static Public Member Functions

static Expected< std::unique_ptr< Archive > > create (MemoryBufferRef Source)
static bool classof (Binary const *v)
- Static Public Member Functions inherited from llvm::object::Binary
static Error checkOffset (MemoryBufferRef M, uintptr_t Addr, const uint64_t Size)

Static Public Attributes

static const uint64_t MaxMemberSize = 9999999999
 Size field is 10 decimal digits long. More...

Additional Inherited Members

- Protected Types inherited from llvm::object::Binary
enum  {
  ID_Archive, ID_MachOUniversalBinary, ID_COFFImportFile, ID_IR,
  ID_TapiUniversal, ID_TapiFile, ID_Minidump, ID_WinRes,
  ID_StartObjects, ID_COFF, ID_XCOFF32, ID_XCOFF64,
  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 81 of file Archive.h.

Member Typedef Documentation

◆ child_iterator

Definition at line 172 of file Archive.h.

Member Enumeration Documentation

◆ Kind


Definition at line 221 of file Archive.h.

Constructor & Destructor Documentation

◆ Archive()

Archive::Archive ( MemoryBufferRef  Source,
Error Err 

Definition at line 551 of file Archive.cpp.

Member Function Documentation

◆ child_begin()

Archive::child_iterator Archive::child_begin ( Error Err,
bool  SkipInternal = true 
) const

Definition at line 782 of file Archive.cpp.

◆ child_end()

Archive::child_iterator Archive::child_end ( ) const

Definition at line 798 of file Archive.cpp.

References llvm::fallible_iterator< Underlying >::end().

◆ children()

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

Definition at line 228 of file Archive.h.

◆ classof()

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

Definition at line 240 of file Archive.h.

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

◆ create()

Expected< std::unique_ptr< Archive > > Archive::create ( MemoryBufferRef  Source)

◆ findSym()

Expected< Optional< Archive::Child > > Archive::findSym ( StringRef  name) const

◆ getNumberOfSymbols()

uint32_t Archive::getNumberOfSymbols ( ) const

◆ getStringTable()

StringRef llvm::object::Archive::getStringTable ( ) const

Definition at line 248 of file Archive.h.

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

◆ getSymbolTable()

StringRef llvm::object::Archive::getSymbolTable ( ) const

◆ hasSymbolTable()

bool Archive::hasSymbolTable ( ) const

Definition at line 1002 of file Archive.cpp.

References llvm::StringRef::empty().

Referenced by getNumberOfSymbols(), and symbol_begin().

◆ isEmpty()

bool Archive::isEmpty ( ) const

◆ isThin()

bool llvm::object::Archive::isThin ( ) const

◆ kind()

Kind llvm::object::Archive::kind ( ) const

◆ symbol_begin()

Archive::symbol_iterator Archive::symbol_begin ( ) const

◆ symbol_end()

Archive::symbol_iterator Archive::symbol_end ( ) const

Definition at line 961 of file Archive.cpp.

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

Referenced by findSym(), and symbols().

◆ symbols()

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

Definition at line 235 of file Archive.h.

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

◆ takeThinBuffers()

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

Definition at line 251 of file Archive.h.

References move.

Member Data Documentation

◆ MaxMemberSize

const uint64_t llvm::object::Archive::MaxMemberSize = 9999999999

Size field is 10 decimal digits long.

Definition at line 219 of file Archive.h.

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