Commit 3f9286b
Automerge: Fix stmt-seq-macho.test for little endian platforms (#137017)
The test YAML was created on a little-endian system, so its data is
stored in little-endian order. When the test runs on a big-endian host,
yaml2obj defaults to the host’s byte order, misreading the file as
big-endian and causing a failure.
This change explicitly marks the YAML as little-endian, guaranteeing
that yaml2obj always uses the correct byte order, no matter which
machine runs the test.
The reason that during creation, obj2yaml doesn't specify the endianness
is because the endianness is set as an optional parameter and therefore
it won't be specified if it matches the platform default. Ref:
https://github.com/llvm/llvm-project/blob/d7215c0ee2e4bca1ce87b956335ef6a2cddaf16f/llvm/lib/ObjectYAML/MachOYAML.cpp#L1051 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | | - | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| |||
1564 | 1567 | | |
1565 | 1568 | | |
1566 | 1569 | | |
| 1570 | + | |
1567 | 1571 | | |
1568 | 1572 | | |
1569 | 1573 | | |
| |||
0 commit comments