[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / Object / nm-universal-binary.test
blob379f8cdc776dd73a35fe2183f7b202412b08667e
1 RUN: llvm-nm --arch=all %p/Inputs/macho-universal.x86_64.i386 \
2 RUN:         | FileCheck %s -check-prefix CHECK-OBJ
3 RUN: llvm-nm --arch=all %p/Inputs/macho-universal64.x86_64.i386 \
4 RUN:         | FileCheck %s -check-prefix CHECK-64-OBJ
5 RUN: llvm-nm --arch=x86_64 %p/Inputs/macho-universal.x86_64.i386 \
6 RUN:         | FileCheck %s -check-prefix CHECK-OBJ-x86_64
7 RUN: not llvm-nm --arch=armv7m %p/Inputs/macho-universal.x86_64.i386 2>&1 \
8 RUN:         | FileCheck %s --check-prefix=CHECK-OBJ-armv7m --implicit-check-not=error:
9 RUN: not llvm-nm --arch=foobar %p/Inputs/macho-universal.x86_64.i386 2>&1 \
10 RUN:         | FileCheck %s --check-prefix=CHECK-OBJ-foobar --implicit-check-not=error:
11 RUN: llvm-nm --arch=all %p/Inputs/macho-universal-archive.x86_64.i386 \
12 RUN:         | FileCheck %s -check-prefix CHECK-AR
13 RUN: llvm-nm --arch=all %p/Inputs/macho-universal64-archive.x86_64.i386 \
14 RUN:         | FileCheck %s -check-prefix CHECK-64-AR
15 RUN: llvm-nm --arch=i386 %p/Inputs/macho-universal-archive.x86_64.i386 \
16 RUN:         | FileCheck %s -check-prefix CHECK-AR-i386
17 RUN: llvm-nm -o --arch=all %p/Inputs/macho-universal-archive.x86_64.i386 \
18 RUN:         | FileCheck %s -check-prefix CHECK-AR-o
20 CHECK-OBJ: macho-universal.x86_64.i386 (for architecture x86_64):
21 CHECK-OBJ: 0000000100000f60 T _main
22 CHECK-OBJ: macho-universal.x86_64.i386 (for architecture i386):
23 CHECK-OBJ: 00001fa0 T _main
25 CHECK-64-OBJ: macho-universal64.x86_64.i386 (for architecture x86_64):
26 CHECK-64-OBJ: 0000000100000f60 T _main
27 CHECK-64-OBJ: macho-universal64.x86_64.i386 (for architecture i386):
28 CHECK-64-OBJ: 00001fa0 T _main
30 CHECK-OBJ-x86_64: 0000000100000000 T __mh_execute_header
31 CHECK-OBJ-x86_64: 0000000100000f60 T _main
32 CHECK-OBJ-x86_64:                  U dyld_stub_binder
34 CHECK-OBJ-armv7m: error: file: {{.*}} does not contain architecture
36 CHECK-OBJ-foobar: error: for the --arch option: Unknown architecture named 'foobar'
38 CHECK-AR: macho-universal-archive.x86_64.i386(hello.o) (for architecture x86_64):
39 CHECK-AR: 0000000000000068 s EH_frame0
40 CHECK-AR: 000000000000003b s L_.str
41 CHECK-AR: 0000000000000000 T _main
42 CHECK-AR: 0000000000000080 S _main.eh
43 CHECK-AR:                  U _printf
44 CHECK-AR: macho-universal-archive.x86_64.i386(foo.o) (for architecture i386):
45 CHECK-AR: 00000008 D _bar
46 CHECK-AR: 00000000 T _foo
48 CHECK-64-AR: macho-universal64-archive.x86_64.i386(foo.o) (for architecture i386):
49 CHECK-64-AR: 00000008 D _bar
50 CHECK-64-AR: 00000000 T _foo
51 CHECK-64-AR: macho-universal64-archive.x86_64.i386(hello.o) (for architecture x86_64):
52 CHECK-64-AR: 0000000000000068 s EH_frame0
53 CHECK-64-AR: 000000000000003b s L_.str
54 CHECK-64-AR: 0000000000000000 T _main
55 CHECK-64-AR: 0000000000000080 S _main.eh
56 CHECK-64-AR:                  U _printf
58 CHECK-AR-i386: macho-universal-archive.x86_64.i386(foo.o):
59 CHECK-AR-i386: 00000008 D _bar
60 CHECK-AR-i386: 00000000 T _foo
62 CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 0000000000000068 s EH_frame0
63 CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 000000000000003b s L_.str
64 CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 0000000000000000 T _main
65 CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 0000000000000080 S _main.eh
66 CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o:                  U _printf
67 CHECK-AR-o: (for architecture i386):{{.*}}/macho-universal-archive.x86_64.i386:foo.o: 00000008 D _bar
68 CHECK-AR-o: (for architecture i386):{{.*}}/macho-universal-archive.x86_64.i386:foo.o: 00000000 T _foo