Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / dependency-info.s
blob57b0b88ca8fe6d21c0e0a9247f92d7788d20a707
1 # REQUIRES: x86
2 # RUN: rm -rf %t; split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/foo.o %t/foo.s
5 # RUN: %lld -dylib -o %t/libfoo.dylib %t/foo.o
6 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/bar.o %t/bar.s
7 # RUN: llvm-ar csr %t/bar.a %t/bar.o
8 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/main.o %t/main.s
10 # RUN: %lld %t/main.o %t/bar.a %t/libfoo.dylib -lSystem -o %t/test.out -dependency_info %t/deps_info.out
11 # RUN: %python %S/Inputs/DependencyDump.py %t/deps_info.out | FileCheck %s
13 # CHECK: lld-version: {{.*}}LLD {{.*}}
15 # CHECK-DAG: input-file: {{.*}}{{[/\]}}bar.a
16 # CHECK-DAG: input-file: {{.*}}{{[/\]}}libfoo.dylib
17 # CHECK-DAG: input-file: {{.*}}{{[/\]}}libSystem.tbd
18 # CHECK-DAG: input-file: {{.*}}{{[/\]}}main.o
19 # CHECK-DAG: input-file: {{.*}}bar.o
21 # CHECK: not-found: {{.*}}{{[/\]}}libdyld.{{.*}}
22 ## There could be more not-found here but we are not checking those because it's brittle.
24 # CHECK: output-file: {{.*}}{{[/\]}}test.out
26 #--- foo.s
27 .globl __Z3foo
28 __Z3foo:
29 ret
31 #--- bar.s
32 .globl _bar
33 _bar:
34 callq __Z3foo
35 ret
37 #--- main.s
38 .globl _main
39 _main:
40 callq _bar
41 callq __Z3foo
42 ret