2 ;; Test we can infer the e_machine value EM_AARCH64 from a bitcode file.
4 ; RUN: split-file %s %t
5 ; RUN: llvm-as %t/le.s -o %t/le.o
6 ; RUN: ld.lld %t/le.o -o %t/le
7 ; RUN: llvm-readobj -h %t/le | FileCheck %s --check-prefixes=CHECK,LE
9 ; RUN: llvm-as %t/be.s -o %t/be.o
10 ; RUN: ld.lld %t/be.o -o %t/be
11 ; RUN: llvm-readobj -h %t/be | FileCheck %s --check-prefixes=CHECK,BE
13 ; CHECK: Class: 64-bit
14 ; LE: DataEncoding: LittleEndian
15 ; BE: DataEncoding: BigEndian
16 ; CHECK: Machine: EM_AARCH64
19 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
20 target triple = "aarch64-unknown-linux-gnu"
22 define void @_start() {
28 target datalayout = "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
29 target triple = "aarch64_be-unknown-linux-gnu"
31 define void @_start() {