LLVM  8.0.1
Classes | Enumerations | Functions | Variables
llvm::wasm Namespace Reference

Classes

struct  WasmDataReference
 
struct  WasmDataSegment
 
struct  WasmDylinkInfo
 
struct  WasmElemSegment
 
struct  WasmEvent
 
struct  WasmEventType
 
struct  WasmExport
 
struct  WasmFunction
 
struct  WasmFunctionName
 
struct  WasmGlobal
 
struct  WasmGlobalType
 
struct  WasmImport
 
struct  WasmInitExpr
 
struct  WasmInitFunc
 
struct  WasmLimits
 
struct  WasmLinkingData
 
struct  WasmLocalDecl
 
struct  WasmObjectHeader
 
struct  WasmRelocation
 
struct  WasmSignature
 
struct  WasmSymbolInfo
 
struct  WasmTable
 

Enumerations

enum  : unsigned {
  WASM_SEC_CUSTOM = 0, WASM_SEC_TYPE = 1, WASM_SEC_IMPORT = 2, WASM_SEC_FUNCTION = 3,
  WASM_SEC_TABLE = 4, WASM_SEC_MEMORY = 5, WASM_SEC_GLOBAL = 6, WASM_SEC_EXPORT = 7,
  WASM_SEC_START = 8, WASM_SEC_ELEM = 9, WASM_SEC_CODE = 10, WASM_SEC_DATA = 11,
  WASM_SEC_DATACOUNT = 12, WASM_SEC_EVENT = 13
}
 
enum  : unsigned {
  WASM_TYPE_I32 = 0x7F, WASM_TYPE_I64 = 0x7E, WASM_TYPE_F32 = 0x7D, WASM_TYPE_F64 = 0x7C,
  WASM_TYPE_V128 = 0x7B, WASM_TYPE_FUNCREF = 0x70, WASM_TYPE_EXCEPT_REF = 0x68, WASM_TYPE_FUNC = 0x60,
  WASM_TYPE_NORESULT = 0x40
}
 
enum  : unsigned {
  WASM_EXTERNAL_FUNCTION = 0x0, WASM_EXTERNAL_TABLE = 0x1, WASM_EXTERNAL_MEMORY = 0x2, WASM_EXTERNAL_GLOBAL = 0x3,
  WASM_EXTERNAL_EVENT = 0x4
}
 
enum  : unsigned {
  WASM_OPCODE_END = 0x0b, WASM_OPCODE_GLOBAL_GET = 0x23, WASM_OPCODE_I32_CONST = 0x41, WASM_OPCODE_I64_CONST = 0x42,
  WASM_OPCODE_F32_CONST = 0x43, WASM_OPCODE_F64_CONST = 0x44
}
 
enum  : unsigned { WASM_LIMITS_FLAG_HAS_MAX = 0x1, WASM_LIMITS_FLAG_IS_SHARED = 0x2 }
 
enum  : unsigned { WASM_NAMES_FUNCTION = 0x1, WASM_NAMES_LOCAL = 0x2 }
 
enum  : unsigned { WASM_SEGMENT_INFO = 0x5, WASM_INIT_FUNCS = 0x6, WASM_COMDAT_INFO = 0x7, WASM_SYMBOL_TABLE = 0x8 }
 
enum  : unsigned { WASM_COMDAT_DATA = 0x0, WASM_COMDAT_FUNCTION = 0x1 }
 
enum  WasmSymbolType : unsigned {
  WASM_SYMBOL_TYPE_FUNCTION = 0x0, WASM_SYMBOL_TYPE_DATA = 0x1, WASM_SYMBOL_TYPE_GLOBAL = 0x2, WASM_SYMBOL_TYPE_SECTION = 0x3,
  WASM_SYMBOL_TYPE_EVENT = 0x4
}
 
enum  WasmEventAttribute : unsigned { WASM_EVENT_ATTRIBUTE_EXCEPTION = 0x0 }
 
enum  : unsigned
 
enum  ValType {
  ValType::I32 = WASM_TYPE_I32, ValType::I64 = WASM_TYPE_I64, ValType::F32 = WASM_TYPE_F32, ValType::F64 = WASM_TYPE_F64,
  ValType::V128 = WASM_TYPE_V128, ValType::EXCEPT_REF = WASM_TYPE_EXCEPT_REF
}
 

Functions

bool operator== (const WasmSignature &LHS, const WasmSignature &RHS)
 
bool operator!= (const WasmSignature &LHS, const WasmSignature &RHS)
 
bool operator== (const WasmGlobalType &LHS, const WasmGlobalType &RHS)
 
bool operator!= (const WasmGlobalType &LHS, const WasmGlobalType &RHS)
 
std::string toString (wasm::WasmSymbolType type)
 
std::string relocTypetoString (uint32_t type)
 

Variables

const char WasmMagic [] = {'\0', 'a', 's', 'm'}
 
const uint32_t WasmVersion = 0x1
 
const uint32_t WasmMetadataVersion = 0x2
 
const uint32_t WasmPageSize = 65536
 
const unsigned WASM_SYMBOL_BINDING_MASK = 0x3
 
const unsigned WASM_SYMBOL_VISIBILITY_MASK = 0xc
 
const unsigned WASM_SYMBOL_BINDING_GLOBAL = 0x0
 
const unsigned WASM_SYMBOL_BINDING_WEAK = 0x1
 
const unsigned WASM_SYMBOL_BINDING_LOCAL = 0x2
 
const unsigned WASM_SYMBOL_VISIBILITY_DEFAULT = 0x0
 
const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN = 0x4
 
const unsigned WASM_SYMBOL_UNDEFINED = 0x10
 
const unsigned WASM_SYMBOL_EXPLICIT_NAME = 0x40
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : unsigned
Enumerator
WASM_SEC_CUSTOM 
WASM_SEC_TYPE 
WASM_SEC_IMPORT 
WASM_SEC_FUNCTION 
WASM_SEC_TABLE 
WASM_SEC_MEMORY 
WASM_SEC_GLOBAL 
WASM_SEC_EXPORT 
WASM_SEC_START 
WASM_SEC_ELEM 
WASM_SEC_CODE 
WASM_SEC_DATA 
WASM_SEC_DATACOUNT 
WASM_SEC_EVENT 

Definition at line 191 of file Wasm.h.

◆ anonymous enum

anonymous enum : unsigned
Enumerator
WASM_TYPE_I32 
WASM_TYPE_I64 
WASM_TYPE_F32 
WASM_TYPE_F64 
WASM_TYPE_V128 
WASM_TYPE_FUNCREF 
WASM_TYPE_EXCEPT_REF 
WASM_TYPE_FUNC 
WASM_TYPE_NORESULT 

Definition at line 209 of file Wasm.h.

◆ anonymous enum

anonymous enum : unsigned
Enumerator
WASM_EXTERNAL_FUNCTION 
WASM_EXTERNAL_TABLE 
WASM_EXTERNAL_MEMORY 
WASM_EXTERNAL_GLOBAL 
WASM_EXTERNAL_EVENT 

Definition at line 222 of file Wasm.h.

◆ anonymous enum

anonymous enum : unsigned
Enumerator
WASM_OPCODE_END 
WASM_OPCODE_GLOBAL_GET 
WASM_OPCODE_I32_CONST 
WASM_OPCODE_I64_CONST 
WASM_OPCODE_F32_CONST 
WASM_OPCODE_F64_CONST 

Definition at line 231 of file Wasm.h.

◆ anonymous enum

anonymous enum : unsigned
Enumerator
WASM_LIMITS_FLAG_HAS_MAX 
WASM_LIMITS_FLAG_IS_SHARED 

Definition at line 240 of file Wasm.h.

◆ anonymous enum

anonymous enum : unsigned
Enumerator
WASM_NAMES_FUNCTION 
WASM_NAMES_LOCAL 

Definition at line 246 of file Wasm.h.

◆ anonymous enum

anonymous enum : unsigned
Enumerator
WASM_SEGMENT_INFO 
WASM_INIT_FUNCS 
WASM_COMDAT_INFO 
WASM_SYMBOL_TABLE 

Definition at line 252 of file Wasm.h.

◆ anonymous enum

anonymous enum : unsigned
Enumerator
WASM_COMDAT_DATA 
WASM_COMDAT_FUNCTION 

Definition at line 260 of file Wasm.h.

◆ anonymous enum

anonymous enum : unsigned

Definition at line 292 of file Wasm.h.

◆ ValType

enum llvm::wasm::ValType
strong
Enumerator
I32 
I64 
F32 
F64 
V128 
EXCEPT_REF 

Definition at line 299 of file Wasm.h.

◆ WasmEventAttribute

Enumerator
WASM_EVENT_ATTRIBUTE_EXCEPTION 

Definition at line 275 of file Wasm.h.

◆ WasmSymbolType

Enumerator
WASM_SYMBOL_TYPE_FUNCTION 
WASM_SYMBOL_TYPE_DATA 
WASM_SYMBOL_TYPE_GLOBAL 
WASM_SYMBOL_TYPE_SECTION 
WASM_SYMBOL_TYPE_EVENT 

Definition at line 266 of file Wasm.h.

Function Documentation

◆ operator!=() [1/2]

bool llvm::wasm::operator!= ( const WasmSignature LHS,
const WasmSignature RHS 
)
inline

Definition at line 326 of file Wasm.h.

◆ operator!=() [2/2]

bool llvm::wasm::operator!= ( const WasmGlobalType LHS,
const WasmGlobalType RHS 
)
inline

Definition at line 334 of file Wasm.h.

References relocTypetoString(), and toString().

◆ operator==() [1/2]

bool llvm::wasm::operator== ( const WasmSignature LHS,
const WasmSignature RHS 
)
inline

◆ operator==() [2/2]

bool llvm::wasm::operator== ( const WasmGlobalType LHS,
const WasmGlobalType RHS 
)
inline

◆ relocTypetoString()

std::string llvm::wasm::relocTypetoString ( uint32_t  type)

Definition at line 28 of file Wasm.cpp.

References llvm_unreachable.

Referenced by operator!=().

◆ toString()

std::string llvm::wasm::toString ( wasm::WasmSymbolType  type)

Variable Documentation

◆ WASM_SYMBOL_BINDING_GLOBAL

const unsigned llvm::wasm::WASM_SYMBOL_BINDING_GLOBAL = 0x0

Definition at line 282 of file Wasm.h.

Referenced by llvm::object::WasmSymbol::isBindingGlobal().

◆ WASM_SYMBOL_BINDING_LOCAL

const unsigned llvm::wasm::WASM_SYMBOL_BINDING_LOCAL = 0x2

Definition at line 284 of file Wasm.h.

Referenced by llvm::object::WasmSymbol::isBindingLocal(), and isInSymtab().

◆ WASM_SYMBOL_BINDING_MASK

const unsigned llvm::wasm::WASM_SYMBOL_BINDING_MASK = 0x3

Definition at line 279 of file Wasm.h.

Referenced by llvm::object::WasmSymbol::getBinding().

◆ WASM_SYMBOL_BINDING_WEAK

const unsigned llvm::wasm::WASM_SYMBOL_BINDING_WEAK = 0x1

Definition at line 283 of file Wasm.h.

Referenced by llvm::object::WasmSymbol::isBindingWeak(), and isInSymtab().

◆ WASM_SYMBOL_EXPLICIT_NAME

const unsigned llvm::wasm::WASM_SYMBOL_EXPLICIT_NAME = 0x40

Definition at line 288 of file Wasm.h.

Referenced by addData(), and isInSymtab().

◆ WASM_SYMBOL_UNDEFINED

const unsigned llvm::wasm::WASM_SYMBOL_UNDEFINED = 0x10

◆ WASM_SYMBOL_VISIBILITY_DEFAULT

const unsigned llvm::wasm::WASM_SYMBOL_VISIBILITY_DEFAULT = 0x0

Definition at line 285 of file Wasm.h.

◆ WASM_SYMBOL_VISIBILITY_HIDDEN

const unsigned llvm::wasm::WASM_SYMBOL_VISIBILITY_HIDDEN = 0x4

Definition at line 286 of file Wasm.h.

Referenced by llvm::object::WasmSymbol::isHidden(), and isInSymtab().

◆ WASM_SYMBOL_VISIBILITY_MASK

const unsigned llvm::wasm::WASM_SYMBOL_VISIBILITY_MASK = 0xc

Definition at line 280 of file Wasm.h.

Referenced by llvm::object::WasmSymbol::getVisibility().

◆ WasmMagic

const char llvm::wasm::WasmMagic[] = {'\0', 'a', 's', 'm'}

Definition at line 25 of file Wasm.h.

◆ WasmMetadataVersion

const uint32_t llvm::wasm::WasmMetadataVersion = 0x2

Definition at line 29 of file Wasm.h.

Referenced by addData().

◆ WasmPageSize

const uint32_t llvm::wasm::WasmPageSize = 65536

Definition at line 31 of file Wasm.h.

Referenced by addData().

◆ WasmVersion

const uint32_t llvm::wasm::WasmVersion = 0x1

Definition at line 27 of file Wasm.h.