[PATCH] D95661: [yaml2obj][wasm] Support numeric relocation type

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 2 18:28:49 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfb7c36636ded: [yaml2obj][wasm] Support numeric relocation type (authored by MaskRay).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95661/new/

https://reviews.llvm.org/D95661

Files:
  llvm/lib/ObjectYAML/WasmYAML.cpp
  llvm/test/ObjectYAML/wasm/event_section.yaml


Index: llvm/test/ObjectYAML/wasm/event_section.yaml
===================================================================
--- llvm/test/ObjectYAML/wasm/event_section.yaml
+++ llvm/test/ObjectYAML/wasm/event_section.yaml
@@ -27,6 +27,9 @@
       - Type:            R_WASM_EVENT_INDEX_LEB
         Index:           1
         Offset:          0x00000006
+      - Type:            10
+        Index:           1
+        Offset:          0x00000006
     Functions:
       - Index:           0
         Locals:
@@ -74,6 +77,9 @@
 # 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:
Index: llvm/lib/ObjectYAML/WasmYAML.cpp
===================================================================
--- llvm/lib/ObjectYAML/WasmYAML.cpp
+++ llvm/lib/ObjectYAML/WasmYAML.cpp
@@ -614,6 +614,7 @@
 #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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95661.320964.patch
Type: text/x-patch
Size: 1324 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210203/9d75a42c/attachment.bin>


More information about the llvm-commits mailing list