[llvm] [GOFF] Refactor writing GOFF records (PR #93855)

Kevin P. Neal via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 12:17:35 PDT 2024


================
@@ -0,0 +1,18 @@
+# RUN: yaml2obj %s | od -v -An -tx1 | FileCheck --ignore-case %s
+
+## Verify that the GOFF header record is correct, with all fields having a
+## value. No other record is written.
+
+# CHECK:      03 f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+# CHECK-NEXT: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+# CHECK-NEXT: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+# CHECK-NEXT: 00 00 00 01 00 03 00 00 00 00 00 00 03 33 ff 00
+# CHECK-NEXT: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+
+# CHECK-EMPTY:
+
+--- !GOFF
+- ModuleHeader:
+    ArchitectureLevel: 1
+    PropertiesLength: 3
+    Properties: 0333ff
----------------
kpneal wrote:

Are module properties documented anywhere? The only example I've ever seen was GOFF produced by the Binder, and that GOFF had module properties that were english text. Given that, it doesn't seem right to treat this field as an opaque sequence of bytes in the yaml. 

https://github.com/llvm/llvm-project/pull/93855


More information about the llvm-commits mailing list