1## Check we can produce 32/64 bits outputs with a different endianness. 2 3# RUN: yaml2obj -D BITS=64 -D ENCODE=LSB %s | llvm-readobj --file-headers - | \ 4# RUN: FileCheck %s --check-prefix=LE64 5# RUN: yaml2obj -D BITS=64 -D ENCODE=MSB %s | llvm-readobj --file-headers - | \ 6# RUN: FileCheck %s --check-prefix=BE64 7# RUN: yaml2obj -D BITS=32 -D ENCODE=LSB %s | llvm-readobj --file-headers - | \ 8# RUN: FileCheck %s --check-prefix=LE32 9# RUN: yaml2obj -D BITS=32 -D ENCODE=MSB %s | llvm-readobj --file-headers - | \ 10# RUN: FileCheck %s --check-prefix=BE32 11 12# LE64: Class: 64-bit (0x2) 13# LE64-NEXT: DataEncoding: LittleEndian (0x1) 14 15# BE64: Class: 64-bit (0x2) 16# BE64-NEXT: DataEncoding: BigEndian (0x2) 17 18# LE32: Class: 32-bit (0x1) 19# LE32-NEXT: DataEncoding: LittleEndian (0x1) 20 21# BE32: Class: 32-bit (0x1) 22# BE32-NEXT: DataEncoding: BigEndian (0x2) 23 24# RUN: not yaml2obj --docnum=1 -D BITS=16 -D ENCODE=LSB %s 2>&1 | FileCheck --check-prefix=BAD %s 25# RUN: not yaml2obj --docnum=1 -D BITS=32 -D ENCODE= %s 2>&1 | FileCheck --check-prefix=BAD %s 26 27# BAD: error: unknown enumerated scalar 28 29--- !ELF 30FileHeader: !FileHeader 31 Class: ELFCLASS[[BITS]] 32 Data: ELFDATA2[[ENCODE]] 33 Type: ET_EXEC 34