LLVM  6.0.0svn
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
llvm::object::Binary Class Reference

#include "llvm/Object/Binary.h"

Inheritance diagram for llvm::object::Binary:
Inheritance graph
[legend]
Collaboration diagram for llvm::object::Binary:
Collaboration graph
[legend]

Public Member Functions

 Binary ()=delete
 
 Binary (const Binary &other)=delete
 
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 isLittleEndian () const
 
bool isWinRes () const
 
Triple::ObjectFormatType getTripleObjectFormat () const
 

Static Public Member Functions

static std::error_code checkOffset (MemoryBufferRef M, uintptr_t Addr, const uint64_t Size)
 

Protected Types

enum  {
  ID_Archive, ID_MachOUniversalBinary, ID_COFFImportFile, ID_IR,
  ID_WinRes, 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

 Binary (unsigned int Type, MemoryBufferRef Source)
 

Static Protected Member Functions

static unsigned int getELFType (bool isLE, bool is64Bits)
 
static unsigned int getMachOType (bool isLE, bool is64Bits)
 

Protected Attributes

MemoryBufferRef Data
 

Detailed Description

Definition at line 32 of file Binary.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
ID_Archive 
ID_MachOUniversalBinary 
ID_COFFImportFile 
ID_IR 
ID_WinRes 
ID_StartObjects 
ID_COFF 
ID_ELF32L 
ID_ELF32B 
ID_ELF64L 
ID_ELF64B 
ID_MachO32L 
ID_MachO32B 
ID_MachO64L 
ID_MachO64B 
ID_Wasm 
ID_EndObjects 

Definition at line 41 of file Binary.h.

Constructor & Destructor Documentation

◆ Binary() [1/3]

Binary::Binary ( unsigned int  Type,
MemoryBufferRef  Source 
)
protected

Definition at line 36 of file Binary.cpp.

References llvm::Data.

◆ Binary() [2/3]

llvm::object::Binary::Binary ( )
delete

Referenced by getMachOType().

◆ Binary() [3/3]

llvm::object::Binary::Binary ( const Binary other)
delete

◆ ~Binary()

Binary::~Binary ( )
virtualdefault

Referenced by getMachOType().

Member Function Documentation

◆ checkOffset()

static std::error_code llvm::object::Binary::checkOffset ( MemoryBufferRef  M,
uintptr_t  Addr,
const uint64_t  Size 
)
inlinestatic

◆ getData()

StringRef Binary::getData ( ) const

◆ getELFType()

static unsigned int llvm::object::Binary::getELFType ( bool  isLE,
bool  is64Bits 
)
inlinestaticprotected

◆ getFileName()

StringRef Binary::getFileName ( ) const

◆ getMachOType()

static unsigned int llvm::object::Binary::getMachOType ( bool  isLE,
bool  is64Bits 
)
inlinestaticprotected

◆ getMemoryBufferRef()

MemoryBufferRef Binary::getMemoryBufferRef ( ) const

◆ getTripleObjectFormat()

Triple::ObjectFormatType llvm::object::Binary::getTripleObjectFormat ( ) const
inline

◆ getType()

unsigned int llvm::object::Binary::getType ( ) const
inline

Definition at line 92 of file Binary.h.

Referenced by llvm::object::ELFObjectFile< ELFT >::classof().

◆ isArchive()

bool llvm::object::Binary::isArchive ( ) const
inline

Definition at line 101 of file Binary.h.

References ID_Archive.

Referenced by llvm::object::Archive::classof().

◆ isCOFF()

bool llvm::object::Binary::isCOFF ( ) const
inline

◆ isCOFFImportFile()

bool llvm::object::Binary::isCOFFImportFile ( ) const
inline

Definition at line 123 of file Binary.h.

References ID_COFFImportFile.

Referenced by llvm::object::COFFImportFile::classof(), and isSymbolic().

◆ isELF()

bool llvm::object::Binary::isELF ( ) const
inline

◆ isIR()

bool llvm::object::Binary::isIR ( ) const
inline

Definition at line 127 of file Binary.h.

References ID_IR.

Referenced by llvm::object::IRObjectFile::classof(), and isSymbolic().

◆ isLittleEndian()

bool llvm::object::Binary::isLittleEndian ( ) const
inline

◆ isMachO()

bool llvm::object::Binary::isMachO ( ) const
inline

◆ isMachOUniversalBinary()

bool llvm::object::Binary::isMachOUniversalBinary ( ) const
inline

Definition at line 105 of file Binary.h.

References ID_MachOUniversalBinary.

Referenced by llvm::object::MachOUniversalBinary::classof().

◆ isObject()

bool llvm::object::Binary::isObject ( ) const
inline

◆ isSymbolic()

bool llvm::object::Binary::isSymbolic ( ) const
inline

Definition at line 99 of file Binary.h.

References isCOFFImportFile(), isIR(), and isObject().

Referenced by llvm::object::SymbolicFile::classof().

◆ isWasm()

bool llvm::object::Binary::isWasm ( ) const
inline

Definition at line 121 of file Binary.h.

References ID_Wasm.

Referenced by llvm::object::WasmObjectFile::classof().

◆ isWinRes()

bool llvm::object::Binary::isWinRes ( ) const
inline

Definition at line 136 of file Binary.h.

References ID_WinRes.

Referenced by llvm::object::WindowsResource::classof().

Member Data Documentation

◆ Data

MemoryBufferRef llvm::object::Binary::Data
protected

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