Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / reexport-stub.s
bloba1706d19a14cf8a3966e7f75cd6f928c0477f361
1 # REQUIRES: x86
2 # RUN: mkdir -p %t
4 ## This test verifies that a non-TBD dylib can re-export a TBD library.
6 # RUN: echo "" | llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/reexporter.o
7 # RUN: %lld -dylib -lc++ -sub_library libc++ \
8 # RUN: %t/reexporter.o -o %t/libreexporter.dylib
9 # RUN: llvm-objdump --macho --all-headers %t/libreexporter.dylib | FileCheck %s --check-prefix=DYLIB-HEADERS
10 # DYLIB-HEADERS: cmd LC_REEXPORT_DYLIB
11 # DYLIB-HEADERS-NOT: Load command
12 # DYLIB-HEADERS: name /usr/lib/libc++.dylib
14 # RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %s -o %t/test.o
15 # RUN: %lld -o %t/test -lSystem -L%t -lreexporter %t/test.o
16 # RUN: llvm-objdump --bind --no-show-raw-insn -d %t/test | FileCheck %s
18 # CHECK: Bind table:
19 # CHECK-DAG: __DATA __data {{.*}} pointer 0 libc++abi ___gxx_personality_v0
21 .text
22 .globl _main
24 _main:
25 ret
27 .data
28 .quad ___gxx_personality_v0