Skip to content

Commit 1c9662d

Browse files
alx32Alex B
authored andcommitted
Fix stmt-seq-macho.test for little endian platforms
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.
1 parent 99e4b39 commit 1c9662d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/test/tools/dsymutil/ARM/stmt-seq-macho.test

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,15 @@ ld64.lld \
8383

8484
# Convert executable to YAML for the test
8585
echo "#--- stmt_seq_macho.o.yaml"
86-
obj2yaml stmt_seq_macho.o
86+
obj2yaml stmt_seq_macho.o | sed '1a IsLittleEndian: true'
8787
echo ""
8888
echo "#--- stmt_seq_macho.exe.yaml"
89-
obj2yaml stmt_seq_macho.exe
89+
obj2yaml stmt_seq_macho.exe | sed '1a IsLittleEndian: true'
9090

9191
#--- stmt-seq-macho.yaml
9292
#--- stmt_seq_macho.o.yaml
9393
--- !mach-o
94+
IsLittleEndian: true
9495
FileHeader:
9596
magic: 0xFEEDFACF
9697
cputype: 0x100000C
@@ -1564,6 +1565,7 @@ DWARF:
15641565

15651566
#--- stmt_seq_macho.exe.yaml
15661567
--- !mach-o
1568+
IsLittleEndian: true
15671569
FileHeader:
15681570
magic: 0xFEEDFACF
15691571
cputype: 0x100000C

0 commit comments

Comments
 (0)