[Lldb-commits] [clang] [lld] [lldb] [llvm] [ObjectYAML][MachO] Require IsLittleEndian (PR #238122)

Oskar Wirga via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 3 10:48:10 PST 2026


================
@@ -0,0 +1,42 @@
+## yaml2obj requires IsLittleEndian in every Mach-O document and fat slice,
----------------
oskarwirga wrote:

> Do we have testing that IsLittleEndian is respected correctly?

Yes, `llvm/test/ObjectYAML/MachO/BigEndian.yaml` does `yaml2obj | obj2yaml | FileCheck` with `IsLittleEndian: false` and a big-endian magic. obj2yaml detects byte order from the actual binary, so that FileCheck would fail if yaml2obj ignored the key.

> do we have testing that shows that obj2yaml now always emits IsLittleEndian?

Half, that test proves the `false` case, but not the `true` case. I'll amend to add a round-trip run asserting `IsLittleEndian: true` shows up in obj2yaml's output.

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


More information about the lldb-commits mailing list