LLVM: lib/Target/WebAssembly/Utils/WebAssemblyTypeUtilities.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_UTILS_WEBASSEMBLYTYPEUTILITIES_H
16#define LLVM_LIB_TARGET_WEBASSEMBLY_UTILS_WEBASSEMBLYTYPEUTILITIES_H
17
24
25namespace llvm {
26
28
29
31 return Ty->isPointerTy() &&
32 Ty->getPointerAddressSpace() ==
34}
35
36
38 return Ty->isPointerTy() &&
39 Ty->getPointerAddressSpace() ==
41}
42
43
47
48
50 return Ty->isArrayTy() &&
52}
53
54
55
57
58
60
61
64
65}
66}
67
68#endif
This file contains the declaration of the WebAssembly-specific type parsing utility functions.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
bool isWebAssemblyExternrefType(const Type *Ty)
Return true if this is a WebAssembly Externref Type.
Definition WebAssemblyTypeUtilities.h:30
@ WASM_ADDRESS_SPACE_EXTERNREF
@ WASM_ADDRESS_SPACE_FUNCREF
bool isWebAssemblyFuncrefType(const Type *Ty)
Return true if this is a WebAssembly Funcref Type.
Definition WebAssemblyTypeUtilities.h:37
wasm::ValType toValType(MVT Type)
bool isWebAssemblyReferenceType(const Type *Ty)
Return true if this is a WebAssembly Reference Type.
Definition WebAssemblyTypeUtilities.h:44
bool isWebAssemblyTableType(const Type *Ty)
Return true if the table represents a WebAssembly table type.
Definition WebAssemblyTypeUtilities.h:49
void wasmSymbolSetType(MCSymbolWasm *Sym, const Type *GlobalVT, ArrayRef< MVT > VTs)
Sets a Wasm Symbol Type.
MVT parseMVT(StringRef Type)
This is an optimization pass for GlobalISel generic memory operations.