LLVM
8.0.1
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
z
+
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Related Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
y
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
+
Enumerations
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Enumerator
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
lib
BinaryFormat
Wasm.cpp
Go to the documentation of this file.
1
//===-- llvm/BinaryFormat/Wasm.cpp -------------------------------*- C++-*-===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
10
#include "
llvm/BinaryFormat/Wasm.h
"
11
12
std::string
llvm::wasm::toString
(
wasm::WasmSymbolType
type
) {
13
switch
(type) {
14
case
wasm::WASM_SYMBOL_TYPE_FUNCTION
:
15
return
"WASM_SYMBOL_TYPE_FUNCTION"
;
16
case
wasm::WASM_SYMBOL_TYPE_GLOBAL
:
17
return
"WASM_SYMBOL_TYPE_GLOBAL"
;
18
case
wasm::WASM_SYMBOL_TYPE_DATA
:
19
return
"WASM_SYMBOL_TYPE_DATA"
;
20
case
wasm::WASM_SYMBOL_TYPE_SECTION
:
21
return
"WASM_SYMBOL_TYPE_SECTION"
;
22
case
wasm::WASM_SYMBOL_TYPE_EVENT
:
23
return
"WASM_SYMBOL_TYPE_EVENT"
;
24
}
25
llvm_unreachable
(
"unknown symbol type"
);
26
}
27
28
std::string
llvm::wasm::relocTypetoString
(
uint32_t
type
) {
29
switch
(type) {
30
#define WASM_RELOC(NAME, VALUE) \
31
case VALUE: \
32
return #NAME;
33
#include "llvm/BinaryFormat/WasmRelocs.def"
34
#undef WASM_RELOC
35
default
:
36
llvm_unreachable
(
"unknown reloc type"
);
37
}
38
}
llvm::wasm::WasmSymbolType
WasmSymbolType
Definition:
Wasm.h:266
llvm::wasm::WASM_SYMBOL_TYPE_FUNCTION
Definition:
Wasm.h:267
llvm::wasm::WASM_SYMBOL_TYPE_DATA
Definition:
Wasm.h:268
llvm::wasm::WASM_SYMBOL_TYPE_SECTION
Definition:
Wasm.h:270
Wasm.h
llvm::wasm::WASM_SYMBOL_TYPE_GLOBAL
Definition:
Wasm.h:269
llvm::wasm::relocTypetoString
std::string relocTypetoString(uint32_t type)
Definition:
Wasm.cpp:28
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition:
ErrorHandling.h:136
uint32_t
type
llvm::wasm::WASM_SYMBOL_TYPE_EVENT
Definition:
Wasm.h:271
llvm::wasm::toString
std::string toString(wasm::WasmSymbolType type)
Definition:
Wasm.cpp:12
Generated on Sun Dec 20 2020 13:53:52 for LLVM by
1.8.13