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
36 .globl __ZTIN3foo3bar4MethE
37 .weak_def_can_be_hidden __ZTIN3foo3bar4MethE
38 .private_extern __ZTIN3foo3bar4MethE
42 .globl __ZTSN3foo3bar4MethE
43 .weak_def_can_be_hidden __ZTSN3foo3bar4MethE
44 .private_extern __ZTSN3foo3bar4MethE