LLVM API Documentation
#include <Binary.h>
Public Member Functions | |
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 | isIR () const |
bool | isLittleEndian () const |
Protected Types | |
enum | { ID_Archive, ID_MachOUniversalBinary, ID_IR, ID_StartObjects, ID_COFF, ID_ELF32L, ID_ELF32B, ID_ELF64L, ID_ELF64B, ID_MachO32L, ID_MachO32B, ID_MachO64L, ID_MachO64B, 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 |
anonymous enum [protected] |
Binary::Binary | ( | unsigned int | Type, |
MemoryBufferRef | Source | ||
) | [protected] |
Definition at line 30 of file Binary.cpp.
Binary::~Binary | ( | ) | [virtual] |
Definition at line 28 of file Binary.cpp.
StringRef Binary::getData | ( | ) | const |
Definition at line 33 of file Binary.cpp.
References Data, and llvm::MemoryBufferRef::getBuffer().
Referenced by getPtr(), llvm::object::MachOObjectFile::getSectionContents(), llvm::object::MachOObjectFile::getStringTableData(), llvm::object::MachOUniversalBinary::MachOUniversalBinary(), llvm::object::MachOUniversalBinary::ObjectForArch::ObjectForArch(), and llvm::object::MachOObjectFile::ReadULEB128s().
static unsigned int llvm::object::Binary::getELFType | ( | bool | isLE, |
bool | is64Bits | ||
) | [inline, static, protected] |
StringRef Binary::getFileName | ( | ) | const |
Definition at line 35 of file Binary.cpp.
References Data, and llvm::MemoryBufferRef::getBufferIdentifier().
static unsigned int llvm::object::Binary::getMachOType | ( | bool | isLE, |
bool | is64Bits | ||
) | [inline, static, protected] |
Definition at line 70 of file Binary.h.
References ID_MachO32B, ID_MachO32L, ID_MachO64B, and ID_MachO64L.
Referenced by llvm::object::MachOObjectFile::is64Bit().
MemoryBufferRef Binary::getMemoryBufferRef | ( | ) | const |
Definition at line 37 of file Binary.cpp.
References Data.
Referenced by llvm::object::Archive::Child::getAsBinary().
unsigned int llvm::object::Binary::getType | ( | ) | const [inline] |
Definition at line 85 of file Binary.h.
Referenced by llvm::object::ELFObjectFile< ELFT >::classof(), and llvm::object::MachOObjectFile::is64Bit().
bool llvm::object::Binary::isArchive | ( | ) | const [inline] |
Definition at line 96 of file Binary.h.
References ID_Archive.
Referenced by llvm::object::Archive::classof().
bool llvm::object::Binary::isCOFF | ( | ) | const [inline] |
Definition at line 112 of file Binary.h.
References ID_COFF.
Referenced by llvm::object::COFFObjectFile::classof().
bool llvm::object::Binary::isELF | ( | ) | const [inline] |
Definition at line 104 of file Binary.h.
References ID_ELF32L, and ID_ELF64B.
Referenced by llvm::DWARFContextInMemory::DWARFContextInMemory(), and llvm::RuntimeDyldELF::isCompatibleFile().
bool llvm::object::Binary::isIR | ( | ) | const [inline] |
Definition at line 116 of file Binary.h.
References ID_IR.
Referenced by llvm::object::IRObjectFile::classof(), and isSymbolic().
bool llvm::object::Binary::isLittleEndian | ( | ) | const [inline] |
Definition at line 120 of file Binary.h.
References ID_ELF32B, ID_ELF64B, ID_MachO32B, and ID_MachO64B.
Referenced by llvm::object::MachOObjectFile::getPlainRelocationExternal(), getPlainRelocationLength(), getPlainRelocationPCRel(), llvm::object::MachOObjectFile::getPlainRelocationSymbolNum(), getPlainRelocationType(), and getStruct().
bool llvm::object::Binary::isMachO | ( | ) | const [inline] |
Definition at line 108 of file Binary.h.
References ID_MachO32L, and ID_MachO64B.
Referenced by llvm::object::MachOObjectFile::classof(), and llvm::RuntimeDyldMachO::isCompatibleFile().
bool llvm::object::Binary::isMachOUniversalBinary | ( | ) | const [inline] |
Definition at line 100 of file Binary.h.
References ID_MachOUniversalBinary.
Referenced by llvm::object::MachOUniversalBinary::classof().
bool llvm::object::Binary::isObject | ( | ) | const [inline] |
Definition at line 88 of file Binary.h.
References ID_EndObjects, and ID_StartObjects.
Referenced by llvm::object::ObjectFile::classof(), and isSymbolic().
bool llvm::object::Binary::isSymbolic | ( | ) | const [inline] |
Definition at line 92 of file Binary.h.
References isIR(), and isObject().
Referenced by llvm::object::SymbolicFile::classof().
MemoryBufferRef llvm::object::Binary::Data [protected] |
Definition at line 37 of file Binary.h.
Referenced by llvm::object::Archive::Archive(), llvm::object::ObjectFile::base(), llvm::object::Archive::child_begin(), llvm::object::COFFObjectFile::COFFObjectFile(), llvm::object::ObjectFile::createObjectFile(), llvm::object::SymbolicFile::createSymbolicFile(), getData(), getFileName(), getMemoryBufferRef(), llvm::object::Archive::Child::getName(), llvm::object::Archive::Child::getNext(), and llvm::object::MachOUniversalBinary::MachOUniversalBinary().