@@ -37,32 +37,6 @@ using namespace llvm;
37
37
38
38
#define DEBUG_TYPE " mc"
39
39
40
- #if !defined(NDEBUG)
41
- static std::string toString (wasm::WasmSymbolType type) {
42
- switch (type) {
43
- case wasm::WASM_SYMBOL_TYPE_FUNCTION:
44
- return " WASM_SYMBOL_TYPE_FUNCTION" ;
45
- case wasm::WASM_SYMBOL_TYPE_GLOBAL:
46
- return " WASM_SYMBOL_TYPE_GLOBAL" ;
47
- case wasm::WASM_SYMBOL_TYPE_DATA:
48
- return " WASM_SYMBOL_TYPE_DATA" ;
49
- case wasm::WASM_SYMBOL_TYPE_SECTION:
50
- return " WASM_SYMBOL_TYPE_SECTION" ;
51
- }
52
- llvm_unreachable (" unknown symbol type" );
53
- }
54
- #endif
55
-
56
- static std::string relocTypetoString (uint32_t type) {
57
- switch (type) {
58
- #define WASM_RELOC (NAME, VALUE ) case VALUE: return #NAME;
59
- #include " llvm/BinaryFormat/WasmRelocs.def"
60
- #undef WASM_RELOC
61
- default :
62
- llvm_unreachable (" uknown reloc type" );
63
- }
64
- }
65
-
66
40
namespace {
67
41
68
42
// Went we ceate the indirect function table we start at 1, so that there is
@@ -189,7 +163,7 @@ struct WasmRelocationEntry {
189
163
}
190
164
191
165
void print (raw_ostream &Out) const {
192
- Out << relocTypetoString (Type)
166
+ Out << wasm:: relocTypetoString (Type)
193
167
<< " Off=" << Offset << " , Sym=" << *Symbol << " , Addend=" << Addend
194
168
<< " , FixupSection=" << FixupSection->getSectionName ();
195
169
}
0 commit comments