Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / demangle.s
blob159c76981f76b28668dfa66b7f02957273a23a25
1 # REQUIRES: x86
3 # RUN: rm -rf %t; split-file %s %t
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/undefined-symbol.s -o %t/undefined-symbol.o
6 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/export-symbols.s -o %t/export-symbols.o
8 # RUN: not %lld %t/undefined-symbol.o -o /dev/null 2>&1 | FileCheck --check-prefix=UNDEF %s
9 # RUN: not %lld -demangle %t/undefined-symbol.o -o /dev/null 2>&1 | \
10 # RUN: FileCheck --check-prefix=DEMANGLE-UNDEF %s
12 # RUN: not %lld -exported_symbol __ZTIN3foo3bar4MethE -exported_symbol __ZTSN3foo3bar4MethE %t/export-symbols.o -o /dev/null 2>&1 | FileCheck --check-prefix=EXPORT %s
13 # RUN: not %lld -demangle -exported_symbol __ZTIN3foo3bar4MethE -exported_symbol __ZTSN3foo3bar4MethE %t/export-symbols.o -o /dev/null 2>&1 | FileCheck --check-prefix=DEMANGLE-EXPORT %s
15 # UNDEF: undefined symbol: __Z1fv
16 # DEMANGLE-UNDEF: undefined symbol: f()
18 # EXPORT-DAG: cannot export hidden symbol __ZTSN3foo3bar4MethE
19 # EXPORT-DAG: cannot export hidden symbol __ZTIN3foo3bar4MethE
21 # DEMANGLE-EXPORT-DAG: cannot export hidden symbol typeinfo name for foo::bar::Meth
22 # DEMANGLE-EXPORT-DAG: cannot export hidden symbol typeinfo for foo::bar::Meth
24 #--- undefined-symbol.s
25 .globl _main
26 _main:
27 callq __Z1fv
28 ret
31 #--- export-symbols.s
32 .globl _main
33 _main:
34 ret
36 .globl __ZTIN3foo3bar4MethE
37 .weak_def_can_be_hidden __ZTIN3foo3bar4MethE
38 .private_extern __ZTIN3foo3bar4MethE
39 __ZTIN3foo3bar4MethE:
40 retq
42 .globl __ZTSN3foo3bar4MethE
43 .weak_def_can_be_hidden __ZTSN3foo3bar4MethE
44 .private_extern __ZTSN3foo3bar4MethE
45 __ZTSN3foo3bar4MethE:
46 retq