1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

[yaml2obj][wasm] Support numeric relocation type

Differential Revision: https://reviews.llvm.org/D95661
This commit is contained in:
Fangrui Song 2021-02-02 18:28:37 -08:00
parent 8e1ad05752
commit 1494409759
2 changed files with 7 additions and 0 deletions

View File

@ -614,6 +614,7 @@ void ScalarEnumerationTraits<WasmYAML::RelocType>::enumeration(
#define WASM_RELOC(name, value) IO.enumCase(Type, #name, wasm::name);
#include "llvm/BinaryFormat/WasmRelocs.def"
#undef WASM_RELOC
IO.enumFallback<Hex32>(Type);
}
} // end namespace yaml

View File

@ -27,6 +27,9 @@ Sections:
- Type: R_WASM_EVENT_INDEX_LEB
Index: 1
Offset: 0x00000006
- Type: 10
Index: 1
Offset: 0x00000006
Functions:
- Index: 0
Locals:
@ -74,6 +77,9 @@ Sections:
# CHECK-NEXT: - Type: R_WASM_EVENT_INDEX_LEB
# CHECK-NEXT: Index: 1
# CHECK-NEXT: Offset: 0x6
# CHECK-NEXT: - Type: R_WASM_EVENT_INDEX_LEB
# CHECK-NEXT: Index: 1
# CHECK-NEXT: Offset: 0x6
# CHECK-NEXT: Functions:
# CHECK-NEXT: - Index: 0
# CHECK-NEXT: Locals: