Skip to content

Commit

Permalink
[yaml2obj][wasm] Support numeric relocation type
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D95661
  • Loading branch information
MaskRay committed Feb 3, 2021
1 parent 8178a55 commit fb7c366
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions llvm/lib/ObjectYAML/WasmYAML.cpp
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions llvm/test/ObjectYAML/wasm/event_section.yaml
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit fb7c366

Please sign in to comment.