LLVM  5.0.0
Public Member Functions | Static Public Member Functions | List of all members
llvm::object::WasmObjectFile Class Reference

#include "llvm/Object/Wasm.h"

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

Public Member Functions

 WasmObjectFile (MemoryBufferRef Object, Error &Err)
 
const wasm::WasmObjectHeader & getHeader () const
 
const WasmSymbol & getWasmSymbol (const DataRefImpl &Symb) const
 
const WasmSymbol & getWasmSymbol (const SymbolRef &Symbol) const
 
const WasmSection & getWasmSection (const SectionRef &Section) const
 
const wasm::WasmRelocation & getWasmRelocation (const RelocationRef &Ref) const
 
const std::vector
< wasm::WasmSignature > & 
types () const
 
const std::vector< uint32_t > & functionTypes () const
 
const std::vector
< wasm::WasmImport > & 
imports () const
 
const std::vector
< wasm::WasmTable > & 
tables () const
 
const std::vector
< wasm::WasmLimits > & 
memories () const
 
const std::vector
< wasm::WasmGlobal > & 
globals () const
 
const std::vector
< wasm::WasmExport > & 
exports () const
 
const wasm::WasmLinkingData & linkingData () const
 
uint32_t getNumberOfSymbols () const
 
const std::vector
< wasm::WasmElemSegment > & 
elements () const
 
const std::vector< WasmSegment > & dataSegments () const
 
const std::vector
< wasm::WasmFunction > & 
functions () const
 
const ArrayRef< uint8_t > & code () const
 
uint32_t startFunction () const
 
void moveSymbolNext (DataRefImpl &Symb) const override
 
uint32_t getSymbolFlags (DataRefImpl Symb) const override
 
basic_symbol_iterator symbol_begin () const override
 
basic_symbol_iterator symbol_end () const override
 
Expected< StringRef > getSymbolName (DataRefImpl Symb) const override
 
Expected< uint64_t > getSymbolAddress (DataRefImpl Symb) const override
 
uint64_t getSymbolValueImpl (DataRefImpl Symb) const override
 
uint32_t getSymbolAlignment (DataRefImpl Symb) const override
 
uint64_t getCommonSymbolSizeImpl (DataRefImpl Symb) const override
 
Expected< SymbolRef::Type > getSymbolType (DataRefImpl Symb) const override
 
Expected< section_iterator > getSymbolSection (DataRefImpl Symb) const override
 
void moveSectionNext (DataRefImpl &Sec) const override
 
std::error_code getSectionName (DataRefImpl Sec, StringRef &Res) const override
 
uint64_t getSectionAddress (DataRefImpl Sec) const override
 
uint64_t getSectionIndex (DataRefImpl Sec) const override
 
uint64_t getSectionSize (DataRefImpl Sec) const override
 
std::error_code getSectionContents (DataRefImpl Sec, StringRef &Res) const override
 
uint64_t getSectionAlignment (DataRefImpl Sec) const override
 
bool isSectionCompressed (DataRefImpl Sec) const override
 
bool isSectionText (DataRefImpl Sec) const override
 
bool isSectionData (DataRefImpl Sec) const override
 
bool isSectionBSS (DataRefImpl Sec) const override
 
bool isSectionVirtual (DataRefImpl Sec) const override
 
bool isSectionBitcode (DataRefImpl Sec) const override
 
relocation_iterator section_rel_begin (DataRefImpl Sec) const override
 
relocation_iterator section_rel_end (DataRefImpl Sec) const override
 
void moveRelocationNext (DataRefImpl &Rel) const override
 
uint64_t getRelocationOffset (DataRefImpl Rel) const override
 
symbol_iterator getRelocationSymbol (DataRefImpl Rel) const override
 
uint64_t getRelocationType (DataRefImpl Rel) const override
 
void getRelocationTypeName (DataRefImpl Rel, SmallVectorImpl< char > &Result) const override
 
section_iterator section_begin () const override
 
section_iterator section_end () const override
 
uint8_t getBytesInAddress () const override
 The number of bytes used to represent an address in this object file format. More...
 
StringRef getFileFormatName () const override
 
unsigned getArch () const override
 
SubtargetFeatures getFeatures () const override
 
bool isRelocatableObject () const override
 True if this is a relocatable object (.o/.obj). More...
 
- Public Member Functions inherited from llvm::object::ObjectFile
 ObjectFile ()=delete
 
 ObjectFile (const ObjectFile &other)=delete
 
uint64_t getCommonSymbolSize (DataRefImpl Symb) const
 
symbol_iterator_range symbols () const
 
section_iterator_range sections () const
 
virtual void setARMSubArch (Triple &TheTriple) const
 
virtual std::error_code getPlatformFlags (unsigned &Result) const
 Returns platform-specific object flags, if any. More...
 
virtual std::error_code getBuildAttributes (ARMAttributeParser &Attributes) const
 
virtual StringRef mapDebugSectionName (StringRef Name) const
 Maps a debug section name to a standard DWARF section name. More...
 
- Public Member Functions inherited from llvm::object::SymbolicFile
 SymbolicFile (unsigned int Type, MemoryBufferRef Source)
 
 ~SymbolicFile () override
 
basic_symbol_iterator_range symbols () const
 
- Public Member Functions inherited from llvm::object::Binary
 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 bool classof (const Binary *v)
 
- Static Public Member Functions inherited from llvm::object::ObjectFile
static Expected< OwningBinary
< ObjectFile > > 
createObjectFile (StringRef ObjectPath)
 Create ObjectFile from path. More...
 
static Expected
< std::unique_ptr< ObjectFile > > 
createObjectFile (MemoryBufferRef Object, llvm::file_magic Type)
 
static Expected
< std::unique_ptr< ObjectFile > > 
createObjectFile (MemoryBufferRef Object)
 
static bool classof (const Binary *v)
 
static ErrorOr
< std::unique_ptr
< COFFObjectFile > > 
createCOFFObjectFile (MemoryBufferRef Object)
 
static ErrorOr
< std::unique_ptr< ObjectFile > > 
createELFObjectFile (MemoryBufferRef Object)
 
static Expected
< std::unique_ptr
< MachOObjectFile > > 
createMachOObjectFile (MemoryBufferRef Object, uint32_t UniversalCputype=0, uint32_t UniversalIndex=0)
 
static Expected
< std::unique_ptr
< WasmObjectFile > > 
createWasmObjectFile (MemoryBufferRef Object)
 
- Static Public Member Functions inherited from llvm::object::SymbolicFile
static Expected
< std::unique_ptr
< SymbolicFile > > 
createSymbolicFile (MemoryBufferRef Object, llvm::file_magic Type, LLVMContext *Context)
 
static Expected
< std::unique_ptr
< SymbolicFile > > 
createSymbolicFile (MemoryBufferRef Object)
 
static Expected< OwningBinary
< SymbolicFile > > 
createSymbolicFile (StringRef ObjectPath)
 
static bool classof (const Binary *v)
 

Additional Inherited Members

- Public Types inherited from llvm::object::ObjectFile
using symbol_iterator_range = iterator_range< symbol_iterator >
 
using section_iterator_range = iterator_range< section_iterator >
 
- Public Types inherited from llvm::object::SymbolicFile
using basic_symbol_iterator_range = iterator_range< basic_symbol_iterator >
 
- Protected Types inherited from llvm::object::Binary
enum  {
  ID_Archive, ID_MachOUniversalBinary, ID_COFFImportFile, ID_IR,
  ID_StartObjects, ID_COFF, ID_ELF32L, ID_ELF32B,
  ID_ELF64L, ID_ELF64B, ID_MachO32L, ID_MachO32B,
  ID_MachO64L, ID_MachO64B, ID_WinRes, ID_Wasm,
  ID_EndObjects
}
 
- Protected Member Functions inherited from llvm::object::ObjectFile
 ObjectFile (unsigned int Type, MemoryBufferRef Source)
 
const uint8_t * base () const
 
std::error_code printSymbolName (raw_ostream &OS, DataRefImpl Symb) const override
 
virtual section_iterator getRelocatedSection (DataRefImpl Sec) const
 
uint64_t getSymbolValue (DataRefImpl Symb) const
 
- 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 87 of file Wasm.h.

Constructor & Destructor Documentation

WasmObjectFile::WasmObjectFile ( MemoryBufferRef  Object,
Error &  Err 
)

Member Function Documentation

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

Definition at line 98 of file Wasm.h.

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

const ArrayRef<uint8_t>& llvm::object::WasmObjectFile::code ( ) const
inline

Definition at line 122 of file Wasm.h.

const std::vector<WasmSegment>& llvm::object::WasmObjectFile::dataSegments ( ) const
inline

Definition at line 117 of file Wasm.h.

const std::vector<wasm::WasmElemSegment>& llvm::object::WasmObjectFile::elements ( ) const
inline

Definition at line 113 of file Wasm.h.

const std::vector<wasm::WasmExport>& llvm::object::WasmObjectFile::exports ( ) const
inline

Definition at line 106 of file Wasm.h.

const std::vector<wasm::WasmFunction>& llvm::object::WasmObjectFile::functions ( ) const
inline

Definition at line 121 of file Wasm.h.

const std::vector<uint32_t>& llvm::object::WasmObjectFile::functionTypes ( ) const
inline

Definition at line 101 of file Wasm.h.

unsigned WasmObjectFile::getArch ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 960 of file WasmObjectFile.cpp.

References llvm::Triple::wasm32.

uint8_t WasmObjectFile::getBytesInAddress ( ) const
overridevirtual

The number of bytes used to represent an address in this object file format.

Implements llvm::object::ObjectFile.

Definition at line 956 of file WasmObjectFile.cpp.

uint64_t WasmObjectFile::getCommonSymbolSizeImpl ( DataRefImpl  Symb) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 786 of file WasmObjectFile.cpp.

References llvm_unreachable().

SubtargetFeatures WasmObjectFile::getFeatures ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 962 of file WasmObjectFile.cpp.

StringRef WasmObjectFile::getFileFormatName ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 958 of file WasmObjectFile.cpp.

const wasm::WasmObjectHeader & WasmObjectFile::getHeader ( ) const

Definition at line 702 of file WasmObjectFile.cpp.

uint32_t llvm::object::WasmObjectFile::getNumberOfSymbols ( ) const
inline

Definition at line 109 of file Wasm.h.

uint64_t WasmObjectFile::getRelocationOffset ( DataRefImpl  Rel) const
overridevirtual
symbol_iterator WasmObjectFile::getRelocationSymbol ( DataRefImpl  Rel) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 914 of file WasmObjectFile.cpp.

References llvm_unreachable().

uint64_t WasmObjectFile::getRelocationType ( DataRefImpl  Rel) const
overridevirtual
void WasmObjectFile::getRelocationTypeName ( DataRefImpl  Rel,
SmallVectorImpl< char > &  Result 
) const
overridevirtual
uint64_t WasmObjectFile::getSectionAddress ( DataRefImpl  Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 847 of file WasmObjectFile.cpp.

uint64_t WasmObjectFile::getSectionAlignment ( DataRefImpl  Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 868 of file WasmObjectFile.cpp.

std::error_code WasmObjectFile::getSectionContents ( DataRefImpl  Sec,
StringRef &  Res 
) const
overridevirtual
uint64_t WasmObjectFile::getSectionIndex ( DataRefImpl  Sec) const
overridevirtual
std::error_code WasmObjectFile::getSectionName ( DataRefImpl  Sec,
StringRef &  Res 
) const
overridevirtual
uint64_t WasmObjectFile::getSectionSize ( DataRefImpl  Sec) const
overridevirtual
Expected< uint64_t > WasmObjectFile::getSymbolAddress ( DataRefImpl  Symb) const
overridevirtual
uint32_t WasmObjectFile::getSymbolAlignment ( DataRefImpl  Symb) const
overridevirtual

Reimplemented from llvm::object::ObjectFile.

Definition at line 781 of file WasmObjectFile.cpp.

References llvm_unreachable().

uint32_t WasmObjectFile::getSymbolFlags ( DataRefImpl  Symb) const
overridevirtual
Expected< StringRef > WasmObjectFile::getSymbolName ( DataRefImpl  Symb) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 758 of file WasmObjectFile.cpp.

References getWasmSymbol(), and llvm::object::WasmSymbol::Name.

Expected< section_iterator > WasmObjectFile::getSymbolSection ( DataRefImpl  Symb) const
overridevirtual
Expected< SymbolRef::Type > WasmObjectFile::getSymbolType ( DataRefImpl  Symb) const
overridevirtual
uint64_t WasmObjectFile::getSymbolValueImpl ( DataRefImpl  Symb) const
overridevirtual
const wasm::WasmRelocation& llvm::object::WasmObjectFile::getWasmRelocation ( const RelocationRef &  Ref) const
const WasmSection& llvm::object::WasmObjectFile::getWasmSection ( const SectionRef &  Section) const
const WasmSymbol& llvm::object::WasmObjectFile::getWasmSymbol ( const DataRefImpl &  Symb) const
const WasmSymbol& llvm::object::WasmObjectFile::getWasmSymbol ( const SymbolRef &  Symbol) const
const std::vector<wasm::WasmGlobal>& llvm::object::WasmObjectFile::globals ( ) const
inline

Definition at line 105 of file Wasm.h.

const std::vector<wasm::WasmImport>& llvm::object::WasmObjectFile::imports ( ) const
inline

Definition at line 102 of file Wasm.h.

bool WasmObjectFile::isRelocatableObject ( ) const
overridevirtual

True if this is a relocatable object (.o/.obj).

Implements llvm::object::ObjectFile.

Definition at line 966 of file WasmObjectFile.cpp.

bool WasmObjectFile::isSectionBitcode ( DataRefImpl  Sec) const
overridevirtual

Reimplemented from llvm::object::ObjectFile.

Definition at line 888 of file WasmObjectFile.cpp.

bool WasmObjectFile::isSectionBSS ( DataRefImpl  Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 884 of file WasmObjectFile.cpp.

bool WasmObjectFile::isSectionCompressed ( DataRefImpl  Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 872 of file WasmObjectFile.cpp.

bool WasmObjectFile::isSectionData ( DataRefImpl  Sec) const
overridevirtual
bool WasmObjectFile::isSectionText ( DataRefImpl  Sec) const
overridevirtual
bool WasmObjectFile::isSectionVirtual ( DataRefImpl  Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 886 of file WasmObjectFile.cpp.

const wasm::WasmLinkingData& llvm::object::WasmObjectFile::linkingData ( ) const
inline

Definition at line 107 of file Wasm.h.

const std::vector<wasm::WasmLimits>& llvm::object::WasmObjectFile::memories ( ) const
inline

Definition at line 104 of file Wasm.h.

void WasmObjectFile::moveRelocationNext ( DataRefImpl &  Rel) const
overridevirtual
void WasmObjectFile::moveSectionNext ( DataRefImpl &  Sec) const
overridevirtual
void WasmObjectFile::moveSymbolNext ( DataRefImpl &  Symb) const
overridevirtual
section_iterator WasmObjectFile::section_begin ( ) const
overridevirtual
section_iterator WasmObjectFile::section_end ( ) const
overridevirtual
relocation_iterator WasmObjectFile::section_rel_begin ( DataRefImpl  Sec) const
overridevirtual
relocation_iterator WasmObjectFile::section_rel_end ( DataRefImpl  Sec) const
overridevirtual
uint32_t llvm::object::WasmObjectFile::startFunction ( ) const
inline

Definition at line 123 of file Wasm.h.

basic_symbol_iterator WasmObjectFile::symbol_begin ( ) const
overridevirtual
basic_symbol_iterator WasmObjectFile::symbol_end ( ) const
overridevirtual
const std::vector<wasm::WasmTable>& llvm::object::WasmObjectFile::tables ( ) const
inline

Definition at line 103 of file Wasm.h.

const std::vector<wasm::WasmSignature>& llvm::object::WasmObjectFile::types ( ) const
inline

Definition at line 100 of file Wasm.h.


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