2 ## Test default "-X" option and environment variable "OBJECT_MODE" on AIX OS.
4 # RUN: yaml2obj -DFLAG=0x1DF %s -o %t_xcoff32.o
5 # RUN: yaml2obj -DFLAG=0x1F7 %s -o %t_xcoff64.o
7 # RUN: unset OBJECT_MODE
8 # RUN: env OBJECT_MODE=any llvm-ar -q -c %t.a %t_xcoff32.o %t_xcoff64.o
10 ## Test default "-X" option.
11 # RUN: llvm-nm --format=just-symbols %t_xcoff32.o %t_xcoff64.o | \
12 # RUN: FileCheck -DFILE32=%t_xcoff32.o --check-prefixes=XCOFF32 %s --implicit-check-not={{.}}
14 ## Test environment variable "OBJECT_MODE".
15 # RUN: env OBJECT_MODE=32 llvm-nm --format=just-symbols %t_xcoff32.o %t_xcoff64.o | \
16 # RUN: FileCheck -DFILE32=%t_xcoff32.o --check-prefixes=XCOFF32 %s --implicit-check-not={{.}}
17 # RUN: env OBJECT_MODE=64 llvm-nm --format=just-symbols %t_xcoff32.o %t_xcoff64.o | \
18 # RUN: FileCheck -DFILE64=%t_xcoff64.o --check-prefixes=XCOFF64 %s --implicit-check-not={{.}}
19 # RUN: env OBJECT_MODE=32_64 llvm-nm --format=just-symbols %t_xcoff32.o %t_xcoff64.o | \
20 # RUN: FileCheck --check-prefixes=XCOFF32,XCOFF64 %s -DFILE32=%t_xcoff32.o -DFILE64=%t_xcoff64.o --match-full-lines
21 # RUN: env OBJECT_MODE=any llvm-nm --format=just-symbols %t_xcoff32.o %t_xcoff64.o | \
22 # RUN: FileCheck --check-prefixes=XCOFF32,XCOFF64 %s -DFILE32=%t_xcoff32.o -DFILE64=%t_xcoff64.o --match-full-lines
23 # RUN: env OBJECT_MODE=32 llvm-nm --format=just-symbols %t.a | \
24 # RUN: FileCheck -DFILE=%basename_t --check-prefixes=ARC32 %s --implicit-check-not={{.}}
25 # RUN: env OBJECT_MODE=64 llvm-nm --format=just-symbols %t.a | \
26 # RUN: FileCheck -DFILE=%basename_t --check-prefixes=ARC64 %s --implicit-check-not={{.}}
28 ## Test -X option overrides environment variable "OBJECT_MODE".
29 # RUN: env OBJECT_MODE=any llvm-nm -X32 --format=just-symbols %t_xcoff32.o %t_xcoff64.o | \
30 # RUN: FileCheck -DFILE32=%t_xcoff32.o --check-prefixes=XCOFF32 %s --implicit-check-not={{.}}
31 # RUN: env OBJECT_MODE=any llvm-nm -X64 --format=just-symbols %t_xcoff32.o %t_xcoff64.o | \
32 # RUN: FileCheck -DFILE64=%t_xcoff64.o --check-prefixes=XCOFF64 %s --implicit-check-not={{.}}
33 # RUN: env OBJECT_MODE=any llvm-nm -X32_64 --format=just-symbols %t_xcoff32.o %t_xcoff64.o | \
34 # RUN: FileCheck --check-prefixes=XCOFF32,XCOFF64 %s -DFILE32=%t_xcoff32.o -DFILE64=%t_xcoff64.o --match-full-lines
35 # RUN: env OBJECT_MODE=32 llvm-nm -Xany --format=just-symbols %t_xcoff32.o %t_xcoff64.o | \
36 # RUN: FileCheck --check-prefixes=XCOFF32,XCOFF64 %s -DFILE32=%t_xcoff32.o -DFILE64=%t_xcoff64.o --match-full-lines
38 # XCOFF32: [[FILE32]]:
39 # XCOFF32-NEXT: var_0x1DF
40 # XCOFF64: [[FILE64]]:
41 # XCOFF64-NEXT: var_0x1F7
43 # ARC32: [[FILE]].tmp_xcoff32.o:
44 # ARC32-NEXT: var_0x1DF
45 # ARC64: [[FILE]].tmp_xcoff64.o:
46 # ARC64-NEXT: var_0x1F7